ffmpeg: Add an option "qsv_device" to choose proper node for QSV child device (vaapi...
authorZhengxu <zhengxu.maxwell@gmail.com>
Thu, 5 Jan 2017 06:48:06 +0000 (14:48 +0800)
committerMark Thompson <sw@jkqxz.net>
Wed, 11 Jan 2017 20:21:09 +0000 (20:21 +0000)
commit1a79b8f8d2b5d26c60c237d6e585873238e46914
tree59a1daa4903c2684326db6f0f226bd232fdad44c
parentf55da2200dbf98311969e0f345edbc82177d4836
ffmpeg: Add an option "qsv_device" to choose proper node for QSV child device (vaapi or dxva2)

Reason: For some cases, such as 2 or more graphics cards existing, the
default command line may fail because ffmpeg does not open the correct
device node:
    ffmpeg -hwaccel qsv -c:v h264_qsv -i test.264 -c:v h264_qsv out.264
Let user choose the proper one by running like below:
    ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv \
-i test.264 -c:v h264_qsv out.264

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Huang, Zhengxu <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew, Zhang <huazh407@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
ffmpeg.h
ffmpeg_opt.c
ffmpeg_qsv.c