aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mmaldec.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-10-26 00:18:40 +0100
committerMark Thompson <sw@jkqxz.net>2017-11-26 21:35:53 +0000
commit758fbc54fef2f31957b5c5f22e05e5fd9b04f631 (patch)
tree45b66ac7797cec7968add561498acf75cc4871c2 /libavcodec/mmaldec.c
parent24cc0a53e99e281b0ff502e82e7cf857111eca3f (diff)
downloadffmpeg-758fbc54fef2f31957b5c5f22e05e5fd9b04f631.tar.gz
lavc: Add hardware config metadata for decoders supporting hardware output
This includes a pointer to the associated hwaccel for decoders using hwaccels - these will be used later to implement the hwaccel setup without needing a global list. Also added is a new file listing all hwaccels as external declarations - this will be used later to generate the hwaccel list at configure time.
Diffstat (limited to 'libavcodec/mmaldec.c')
-rw-r--r--libavcodec/mmaldec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index f2ee3557aa..26e5fc9b6a 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -34,6 +34,7 @@
#include <stdatomic.h>
#include "avcodec.h"
+#include "hwaccel.h"
#include "internal.h"
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
@@ -835,6 +836,11 @@ AVHWAccel ff_vc1_mmal_hwaccel = {
.pix_fmt = AV_PIX_FMT_MMAL,
};
+static const AVCodecHWConfigInternal *mmal_hw_configs[] = {
+ HW_CONFIG_INTERNAL(MMAL),
+ NULL
+};
+
static const AVOption options[]={
{"extra_buffers", "extra buffers", offsetof(MMALDecodeContext, extra_buffers), AV_OPT_TYPE_INT, {.i64 = 10}, 0, 256, 0},
{"extra_decoder_buffers", "extra MMAL internal buffered frames", offsetof(MMALDecodeContext, extra_decoder_buffers), AV_OPT_TYPE_INT, {.i64 = 10}, 0, 256, 0},
@@ -867,6 +873,7 @@ static const AVOption options[]={
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MMAL, \
AV_PIX_FMT_YUV420P, \
AV_PIX_FMT_NONE}, \
+ .hw_configs = mmal_hw_configs, \
};
FFMMAL_DEC(h264, AV_CODEC_ID_H264)