summaryrefslogtreecommitdiffstats
path: root/fftools/cmdutils.c
diff options
context:
space:
mode:
authorJun Zhao <mypopydev@gmail.com>2018-05-26 20:57:45 +0800
committerJun Zhao <jun.zhao@intel.com>2018-05-28 18:21:48 +0800
commit81b77e7bf16a754005a2af7e5cf35e2eefc91a39 (patch)
tree67901d0b0543d5f77ac503def66abea42ead7f5b /fftools/cmdutils.c
parent90acf168a6e29713f7d1d24f3f39f1c3207a2915 (diff)
downloadffmpeg-streaming-81b77e7bf16a754005a2af7e5cf35e2eefc91a39.zip
ffmpeg-streaming-81b77e7bf16a754005a2af7e5cf35e2eefc91a39.tar.gz
cmdutils: dump supported hardware devices in print_codec()
dump the supported hardware devices for codec when use the command like ./ffmpeg -h decoder=h264. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Diffstat (limited to 'fftools/cmdutils.c')
-rw-r--r--fftools/cmdutils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 70234b8..844f433 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1444,6 +1444,17 @@ static void print_codec(const AVCodec *c)
printf("\n");
}
+ if (avcodec_get_hw_config(c, 0)) {
+ printf(" Supported hardware devices: ");
+ for (int i = 0;; i++) {
+ const AVCodecHWConfig *config = avcodec_get_hw_config(c, i);
+ if (!config)
+ break;
+ printf("%s ", av_hwdevice_get_type_name(config->device_type));
+ }
+ printf("\n");
+ }
+
if (c->supported_framerates) {
const AVRational *fps = c->supported_framerates;
OpenPOWER on IntegriCloud