summaryrefslogtreecommitdiff
path: root/libavcodec/qsvdec.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/qsvdec.c
parent24cc0a53e99e281b0ff502e82e7cf857111eca3f (diff)
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/qsvdec.c')
-rw-r--r--libavcodec/qsvdec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index c00817f1d9..55fe59b531 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -41,6 +41,19 @@
#include "qsv_internal.h"
#include "qsvdec.h"
+const AVCodecHWConfigInternal *ff_qsv_hw_configs[] = {
+ &(const AVCodecHWConfigInternal) {
+ .public = {
+ .pix_fmt = AV_PIX_FMT_QSV,
+ .methods = AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX |
+ AV_CODEC_HW_CONFIG_METHOD_AD_HOC,
+ .device_type = AV_HWDEVICE_TYPE_QSV,
+ },
+ .hwaccel = NULL,
+ },
+ NULL
+};
+
static int qsv_init_session(AVCodecContext *avctx, QSVContext *q, mfxSession session,
AVBufferRef *hw_frames_ref, AVBufferRef *hw_device_ref)
{