[FFmpeg-devel] [PATCH 2/2] cmdutils: dump HWAccel type in print_codec()
Jun Zhao
mypopydev at gmail.com
Sat May 26 16:14:12 EEST 2018
dump the hwaccel type for codec when use the command like
./ffmpeg -h decoder=h264.
Signed-off-by: Jun Zhao <mypopydev at gmail.com>
---
fftools/cmdutils.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 4f2e0a2..eeee14b 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(" HWAccel 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;
--
2.7.4
More information about the ffmpeg-devel
mailing list