vdpau: store picture data in picture's rather than codec's context
[ffmpeg.git] / libavcodec / vdpau_internal.h
index c03c1ff..e93c672 100644 (file)
@@ -25,6 +25,7 @@
 #define AVCODEC_VDPAU_INTERNAL_H
 
 #include <stdint.h>
+#include <vdpau/vdpau.h>
 #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 */