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

Soft Works softworkz at hotmail.com
Wed Aug 11 22:42:26 EEST 2021



> -----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



More information about the ffmpeg-devel mailing list