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

Mark Thompson sw at jkqxz.net
Wed Jun 14 00:22:03 EEST 2017


On 13/06/17 21:23, Michael Niedermayer wrote:
> 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 ?

Yes; fixed.

Thanks,

- Mark


More information about the ffmpeg-devel mailing list