aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rkmppdec.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-12-11 16:18:44 +0100
committerwm4 <nfxjfg@googlemail.com>2017-12-14 19:37:56 +0100
commitb945fed629a872d393f59d16fc5773574126ca88 (patch)
tree2996d9caa31c2dd6383317c4797d2de8d8035e70 /libavcodec/rkmppdec.c
parent2e391a576c1fc2e8816990924c6e4c21ccf75a82 (diff)
downloadffmpeg-b945fed629a872d393f59d16fc5773574126ca88.tar.gz
avcodec: add metadata to identify wrappers and hardware decoders
Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
Diffstat (limited to 'libavcodec/rkmppdec.c')
-rw-r--r--libavcodec/rkmppdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c
index 4ec61cbb35..fa522ce2ed 100644
--- a/libavcodec/rkmppdec.c
+++ b/libavcodec/rkmppdec.c
@@ -588,12 +588,13 @@ static const AVCodecHWConfigInternal *rkmpp_hw_configs[] = {
.receive_frame = rkmpp_receive_frame, \
.flush = rkmpp_flush, \
.priv_class = &rkmpp_##NAME##_dec_class, \
- .capabilities = AV_CODEC_CAP_DELAY, \
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
.caps_internal = AV_CODEC_CAP_AVOID_PROBING, \
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \
AV_PIX_FMT_NONE}, \
.hw_configs = rkmpp_hw_configs, \
.bsfs = BSFS, \
+ .wrapper_name = "rkmpp", \
};
RKMPP_DEC(h264, AV_CODEC_ID_H264, "h264_mp4toannexb")