[FFmpeg-devel] [PATCH 1/2] avformat/avio: add av_urlcontext_get_class_by_name

Hendrik Leppkes h.leppkes at gmail.com
Tue Nov 26 16:51:56 EET 2019


On Tue, Nov 26, 2019 at 12:27 PM Steven Liu <lq at chinaffmpeg.org> wrote:
>
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
>  doc/APIchanges          |  3 +++
>  libavformat/avio.h      |  8 ++++++++
>  libavformat/protocols.c | 10 ++++++++++
>  libavformat/version.h   |  2 +-
>  4 files changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 401c65a753..39896146d3 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,6 +15,9 @@ libavutil:     2017-10-21
>
>  API changes, most recent first:
>
> +2019-11-26 - xxxxxxxxxx - lavf 58.26.100 - avio.h
> +  Add av_urlcontext_get_class_by_name().
> +
>  2019-11-17 - 1c23abc88f - lavu 56.36.100 - eval API
>    Add av_expr_count_vars().
>
> diff --git a/libavformat/avio.h b/libavformat/avio.h
> index 9141642e75..bf8cf120f2 100644
> --- a/libavformat/avio.h
> +++ b/libavformat/avio.h
> @@ -807,6 +807,14 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
>   */
>  const char *avio_enum_protocols(void **opaque, int output);
>
> +/**
> + * Get AVClass by names of available protocols.
> + *
> + * @param name protocol name
> + * @return A AVClass of input protocol name or NULL
> + */
> +const AVClass *av_urlcontext_get_class_by_name(const char *name);
> +

The function should probably follow naming similar to the other
functions in that file,  use avio_protocol as a prefix, not
urlcontext, so eg. avio_protocol_get_class_by_name (or perhaps even
drop the by_name part)

- Hendrik


More information about the ffmpeg-devel mailing list