diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-10-26 00:18:39 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-12-19 23:21:53 +0000 |
commit | 720cf4e6e7dcaa4032b9448cb6b6cc4671a6f108 (patch) | |
tree | 1a51c50bea1c3c7fea1c1671938bf544b351b38a /libavcodec/utils.c | |
parent | 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1 (diff) | |
download | ffmpeg-720cf4e6e7dcaa4032b9448cb6b6cc4671a6f108.tar.gz |
lavc: Add codec metadata to indicate hardware support
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index bc421f67f8..3d6b35fa41 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -41,6 +41,7 @@ #include "libavutil/dict.h" #include "avcodec.h" #include "decode.h" +#include "hwaccel.h" #include "libavutil/opt.h" #include "me_cmp.h" #include "mpegvideo.h" @@ -1335,6 +1336,17 @@ int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b) return i; } +const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index) +{ + int i; + if (!codec->hw_configs || index < 0) + return NULL; + for (i = 0; i <= index; i++) + if (!codec->hw_configs[i]) + return NULL; + return &codec->hw_configs[index]->public; +} + static AVHWAccel *first_hwaccel = NULL; void av_register_hwaccel(AVHWAccel *hwaccel) |