From 2852740e23f91d6775714d7cc29b9a73e1111ce0 Mon Sep 17 00:00:00 2001 From: RĂ©mi Denis-Courmont Date: Thu, 25 Jul 2013 22:30:20 +0300 Subject: vdpau: store picture data in picture's rather than codec's context Signed-off-by: Anton Khirnov --- libavcodec/vdpau_internal.h | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'libavcodec/vdpau_internal.h') diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h index c03c1ff0a3..e93c6723d8 100644 --- a/libavcodec/vdpau_internal.h +++ b/libavcodec/vdpau_internal.h @@ -25,6 +25,7 @@ #define AVCODEC_VDPAU_INTERNAL_H #include +#include #include "h264.h" #include "mpegvideo.h" @@ -34,10 +35,31 @@ static inline uintptr_t ff_vdpau_get_surface_id(Picture *pic) return (uintptr_t)pic->f.data[3]; } -int ff_vdpau_common_start_frame(AVCodecContext *avctx, +struct vdpau_picture_context { + /** + * VDPAU picture information. + */ + union AVVDPAUPictureInfo info; + + /** + * Allocated size of the bitstream_buffers table. + */ + int bitstream_buffers_allocated; + + /** + * Useful bitstream buffers in the bitstream buffers table. + */ + int bitstream_buffers_used; + + /** + * Table of bitstream buffers. + */ + VdpBitstreamBuffer *bitstream_buffers; +}; + +int ff_vdpau_common_start_frame(Picture *pic, const uint8_t *buffer, uint32_t size); int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx); -int ff_vdpau_add_buffer(AVCodecContext *avctx, - const uint8_t *buf, uint32_t buf_size); +int ff_vdpau_add_buffer(Picture *pic, const uint8_t *buf, uint32_t buf_size); #endif /* AVCODEC_VDPAU_INTERNAL_H */ -- cgit v1.2.3