API changes, most recent first:
+2013-08-xx - xxxxxxx - lavc 55.27.100 - vdpau.h
+ Add a render2 alternative to the render callback function.
+
2013-08-xx - xxxxxxx - lavc 55.26.100 - vdpau.h
Add allocation function for AVVDPAUContext, allowing
to extend it in the future without breaking ABI/API.
return av_mallocz(sizeof(AVVDPAUContext));
}
+MAKE_ACCESSORS(AVVDPAUContext, vdpau_hwaccel, AVVDPAU_Render2, render2)
+
int ff_vdpau_common_start_frame(Picture *pic,
av_unused const uint8_t *buffer,
av_unused uint32_t size)
CONFIG_VC1_VDPAU_HWACCEL || CONFIG_WMV3_VDPAU_HWACCEL
int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx)
{
+ int res = 0;
AVVDPAUContext *hwctx = avctx->hwaccel_context;
MpegEncContext *s = avctx->priv_data;
Picture *pic = s->current_picture_ptr;
struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
VdpVideoSurface surf = ff_vdpau_get_surface_id(pic);
+ if (!hwctx->render) {
+ res = hwctx->render2(avctx, &pic->f, (void *)&pic_ctx->info,
+ pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
+ } else
hwctx->render(hwctx->decoder, surf, (void *)&pic_ctx->info,
pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
ff_mpeg_draw_horiz_band(s, 0, s->avctx->height);
av_freep(&pic_ctx->bitstream_buffers);
- return 0;
+ return res;
}
#endif
};
#endif
+struct AVCodecContext;
+struct AVFrame;
+
+typedef int (*AVVDPAU_Render2)(struct AVCodecContext *, struct AVFrame *,
+ const VdpPictureInfo *, uint32_t,
+ const VdpBitstreamBuffer *);
+
/**
* This structure is used to share data between the libavcodec library and
* the client video application.
attribute_deprecated
VdpBitstreamBuffer *bitstream_buffers;
#endif
+ AVVDPAU_Render2 render2;
} AVVDPAUContext;
/**
*/
AVVDPAUContext *av_alloc_vdpaucontext(void);
+AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
+void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
+
#if FF_API_CAP_VDPAU
/** @brief The videoSurface is used for rendering. */
#define FF_VDPAU_STATE_USED_FOR_RENDER 1
static int vdpau_h264_end_frame(AVCodecContext *avctx)
{
+ int res = 0;
AVVDPAUContext *hwctx = avctx->hwaccel_context;
H264Context *h = avctx->priv_data;
Picture *pic = h->cur_pic_ptr;
struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private;
VdpVideoSurface surf = ff_vdpau_get_surface_id(pic);
+ if (!hwctx->render) {
+ res = hwctx->render2(avctx, &pic->f, (void *)&pic_ctx->info,
+ pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
+ } else
hwctx->render(hwctx->decoder, surf, (void *)&pic_ctx->info,
pic_ctx->bitstream_buffers_used, pic_ctx->bitstream_buffers);
ff_h264_draw_horiz_band(h, 0, h->avctx->height);
av_freep(&pic_ctx->bitstream_buffers);
- return 0;
+ return res;
}
AVHWAccel ff_h264_vdpau_hwaccel = {
#include "libavutil/avutil.h"
#define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR 26
+#define LIBAVCODEC_VERSION_MINOR 27
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \