From 96dca089b19bf55293136277f5b081c56146e10e Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 21 Jul 2015 18:57:49 +0200 Subject: qsvdec: move qsv_process_data() from qsvdec_h264 to the common code It will be shared with the upcoming mpeg2 and hevc decoders. --- libavcodec/qsvdec.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libavcodec/qsvdec.h') diff --git a/libavcodec/qsvdec.h b/libavcodec/qsvdec.h index 01f7690137..d5f2bce254 100644 --- a/libavcodec/qsvdec.h +++ b/libavcodec/qsvdec.h @@ -50,6 +50,11 @@ typedef struct QSVContext { AVFifoBuffer *async_fifo; + // the internal parser and codec context for parsing the data + AVCodecParserContext *parser; + AVCodecContext *avctx_internal; + enum AVPixelFormat orig_pix_fmt; + // options set by the caller int async_depth; int iopattern; @@ -62,9 +67,10 @@ int ff_qsv_map_pixfmt(enum AVPixelFormat format); int ff_qsv_decode_init(AVCodecContext *s, QSVContext *q, mfxSession session); -int ff_qsv_decode(AVCodecContext *s, QSVContext *q, - AVFrame *frame, int *got_frame, - AVPacket *avpkt); +int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q, + AVFrame *frame, int *got_frame, AVPacket *pkt); + +void ff_qsv_decode_flush(AVCodecContext *avctx, QSVContext *q); int ff_qsv_decode_close(QSVContext *q); -- cgit v1.2.3