* [FFmpeg-devel] [PATCH] libavutil/avstring: av_match_list: Update API documentation
@ 2025-01-22 21:59 Alexander Strasser via ffmpeg-devel
2025-01-22 22:19 ` epirat07
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Strasser via ffmpeg-devel @ 2025-01-22 21:59 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Alexander Strasser
Since av_match_list was added in commit 0d92b0d5f445d4f2 , this
function changed its semantics shortly after, especially with
commit 3c0b98dced394da3 .
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
---
libavutil/avstring.h | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/libavutil/avstring.h b/libavutil/avstring.h
index fc095349d2..133d021632 100644
--- a/libavutil/avstring.h
+++ b/libavutil/avstring.h
@@ -409,9 +409,21 @@ int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end,
unsigned int flags);
/**
- * Check if a name is in a list.
- * @returns 0 if not found, or the 1 based index where it has been found in the
- * list.
+ * Check if one of the given names is in a list.
+ *
+ * Check if any of the names, given in parameter name, is found at least
+ * once in the parameter list.
+ *
+ * In both parameters, multiple names must be separated by the character
+ * given in parameter separator.
+ *
+ * This is in line e.g. with the rule used for naming demuxers.
+ *
+ * @param name Contains names searched for in list.
+ * @param list List of names that is searched in.
+ * @param separator Character that separates items in the given lists.
+ *
+ * @returns 0 if no match was found, otherwise 1.
*/
int av_match_list(const char *name, const char *list, char separator);
--
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] libavutil/avstring: av_match_list: Update API documentation
2025-01-22 21:59 [FFmpeg-devel] [PATCH] libavutil/avstring: av_match_list: Update API documentation Alexander Strasser via ffmpeg-devel
@ 2025-01-22 22:19 ` epirat07
2025-01-23 20:46 ` Alexander Strasser via ffmpeg-devel
0 siblings, 1 reply; 3+ messages in thread
From: epirat07 @ 2025-01-22 22:19 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Alexander Strasser
On 22 Jan 2025, at 22:59, Alexander Strasser via ffmpeg-devel wrote:
> Since av_match_list was added in commit 0d92b0d5f445d4f2 , this
> function changed its semantics shortly after, especially with
> commit 3c0b98dced394da3 .
>
> Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
> ---
> libavutil/avstring.h | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
>
> diff --git a/libavutil/avstring.h b/libavutil/avstring.h
> index fc095349d2..133d021632 100644
> --- a/libavutil/avstring.h
> +++ b/libavutil/avstring.h
> @@ -409,9 +409,21 @@ int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end,
> unsigned int flags);
>
> /**
> - * Check if a name is in a list.
> - * @returns 0 if not found, or the 1 based index where it has been found in the
> - * list.
> + * Check if one of the given names is in a list.
> + *
> + * Check if any of the names, given in parameter name, is found at least
You can use @p to refer to parameters, like: "given in @p name".
> + * once in the parameter list.
> + *
> + * In both parameters, multiple names must be separated by the character
> + * given in parameter separator.
> + *
> + * This is in line e.g. with the rule used for naming demuxers.
> + *
> + * @param name Contains names searched for in list.
> + * @param list List of names that is searched in.
> + * @param separator Character that separates items in the given lists.
> + *
> + * @returns 0 if no match was found, otherwise 1.
> */
> int av_match_list(const char *name, const char *list, char separator);
>
Looks good otherwise, thanks for clarifying the documentation!
> --
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] libavutil/avstring: av_match_list: Update API documentation
2025-01-22 22:19 ` epirat07
@ 2025-01-23 20:46 ` Alexander Strasser via ffmpeg-devel
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Strasser via ffmpeg-devel @ 2025-01-23 20:46 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Alexander Strasser
On 2025-01-22 23:19 +0100, epirat07@gmail.com wrote:
>
> On 22 Jan 2025, at 22:59, Alexander Strasser via ffmpeg-devel wrote:
>
> > Since av_match_list was added in commit 0d92b0d5f445d4f2 , this
> > function changed its semantics shortly after, especially with
> > commit 3c0b98dced394da3 .
> >
> > Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
> > ---
> > libavutil/avstring.h | 18 +++++++++++++++---
> > 1 file changed, 15 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavutil/avstring.h b/libavutil/avstring.h
> > index fc095349d2..133d021632 100644
> > --- a/libavutil/avstring.h
> > +++ b/libavutil/avstring.h
> > @@ -409,9 +409,21 @@ int av_utf8_decode(int32_t *codep, const uint8_t **bufp, const uint8_t *buf_end,
> > unsigned int flags);
> >
> > /**
> > - * Check if a name is in a list.
> > - * @returns 0 if not found, or the 1 based index where it has been found in the
> > - * list.
> > + * Check if one of the given names is in a list.
> > + *
> > + * Check if any of the names, given in parameter name, is found at least
>
> You can use @p to refer to parameters, like: "given in @p name".
Good idea! Sent v2.
[...]
Thanks
Alexander
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-23 20:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-22 21:59 [FFmpeg-devel] [PATCH] libavutil/avstring: av_match_list: Update API documentation Alexander Strasser via ffmpeg-devel
2025-01-22 22:19 ` epirat07
2025-01-23 20:46 ` Alexander Strasser via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git