[FFmpeg-devel] [PATCH 04/24] hwcontext: Make it easier to work with device types

Michael Niedermayer michael at niedermayer.cc
Tue Jun 13 23:23:31 EEST 2017


On Mon, Jun 12, 2017 at 11:40:21PM +0100, Mark Thompson wrote:
> Adds functions to convert to/from strings and a function to iterate
> over all supported device types.  Also adds a new invalid type
> AV_HWDEVICE_TYPE_NONE, which acts as a sentinel value.
> 
> (cherry picked from commit b7487f4f3c39b4b202e1ea7bb2de13902f2dee45)
> ---
>  doc/APIchanges        |  4 ++++
>  libavutil/hwcontext.c | 42 ++++++++++++++++++++++++++++++++++++++++++
>  libavutil/hwcontext.h | 28 ++++++++++++++++++++++++++++
>  libavutil/version.h   |  2 +-
>  4 files changed, 75 insertions(+), 1 deletion(-)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index a6889f3930..5b2203f2b4 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,6 +15,10 @@ libavutil:     2015-08-28
>  
>  API changes, most recent first:
>  
> +2017-06-xx - xxxxxxx - lavu 55.65.100 - hwcontext.h
> +  Add AV_HWDEVICE_TYPE_NONE, av_hwdevice_find_type_by_name(),
> +  av_hwdevice_get_type_name() and av_hwdevice_iterate_types().
> +
>  2017-06-xx - xxxxxxx - lavu 55.64.100 - hwcontext.h
>    Add av_hwdevice_ctx_create_derived().
>  
> diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
> index 86d290d322..7f9b1d33e3 100644
> --- a/libavutil/hwcontext.c
> +++ b/libavutil/hwcontext.c
> @@ -50,6 +50,48 @@ static const HWContextType *hw_table[] = {
>      NULL,
>  };
>  
> +const char *hw_type_names[] = {

was this intended to be static const ?

it lacks a prefix like av_ for a non static

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170613/eab8f9ee/attachment.sig>


More information about the ffmpeg-devel mailing list