summaryrefslogtreecommitdiff
path: root/libavcodec/vdpau_internal.h
diff options
context:
space:
mode:
authorRĂ©mi Denis-Courmont <remi@remlab.net>2013-07-25 22:30:20 +0300
committerAnton Khirnov <anton@khirnov.net>2013-08-05 11:20:41 +0200
commit2852740e23f91d6775714d7cc29b9a73e1111ce0 (patch)
tree967ba877c15aac37512765a534895fff99aa97d2 /libavcodec/vdpau_internal.h
parent549294fbbe1c00fee37dc4d3f291b98945e11094 (diff)
vdpau: store picture data in picture's rather than codec's context
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/vdpau_internal.h')
-rw-r--r--libavcodec/vdpau_internal.h28
1 files changed, 25 insertions, 3 deletions
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 <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 */