[FFmpeg-devel] [PATCH] ffmpeg_hw: Don't ignore key parameters when initializing a hw device

James Almer jamrial at gmail.com
Tue Aug 17 16:10:49 EEST 2021


On 8/11/2021 4:42 PM, Soft Works wrote:
> 
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
>> Haihao Xiang
>> Sent: Wednesday, 11 August 2021 08:44
>> To: ffmpeg-devel at ffmpeg.org
>> Cc: Haihao Xiang <haihao.xiang at intel.com>
>> Subject: [FFmpeg-devel] [PATCH] ffmpeg_hw: Don't ignore key
>> parameters when initializing a hw device
>>
>> Currently user may use '-init_hw_device type=name' to initialize a hw
>> device, however the key parameter is ignored when use '-
>> init_hw_device
>> type=name,key=value'. After applying this patch, user may set key
>> parameter if needed.
>> ---
>>   fftools/ffmpeg_hw.c | 16 +++++++++++++++-
>>   1 file changed, 15 insertions(+), 1 deletion(-)
>>
> 
> This makes sense as it allows to further simplify hw initialization
> command lines.
> 
> As an example, you can write
> 
> -init_hw_device qsv=qd,child_device=1
> 
> Instead of
> 
> -init_hw_device qsv=qd:hw_any,child_device=1
> 
> So besides the former being shorter, it also saves the user from
> needing to remember 'hw_any' (or hw, hw2, hw3, hw4 matching the
> child_device param on Windows).
> 
> LGTM.
> 
> softworkz

Pushed, thanks.


More information about the ffmpeg-devel mailing list