From a0524d9b1e1bb0012207584f067096df7792df6c Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 27 May 2016 13:23:19 +0200 Subject: qsvdec: support getting the session from an AVHWFramesContext --- libavcodec/qsv_internal.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libavcodec/qsv_internal.h') diff --git a/libavcodec/qsv_internal.h b/libavcodec/qsv_internal.h index 1b7a2e77b2..ceee8df1dd 100644 --- a/libavcodec/qsv_internal.h +++ b/libavcodec/qsv_internal.h @@ -47,6 +47,13 @@ typedef struct QSVFrame { struct QSVFrame *next; } QSVFrame; +typedef struct QSVFramesContext { + AVBufferRef *hw_frames_ctx; + mfxFrameInfo info; + mfxMemId *mids; + int nb_mids; +} QSVFramesContext; + /** * Convert a libmfx error code into a libav error code. */ @@ -57,4 +64,8 @@ int ff_qsv_codec_id_to_mfx(enum AVCodecID codec_id); int ff_qsv_init_internal_session(AVCodecContext *avctx, mfxSession *session, const char *load_plugins); +int ff_qsv_init_session_hwcontext(AVCodecContext *avctx, mfxSession *session, + QSVFramesContext *qsv_frames_ctx, + const char *load_plugins, int opaque); + #endif /* AVCODEC_QSV_INTERNAL_H */ -- cgit v1.2.1