summaryrefslogtreecommitdiffstats
path: root/libavcodec/vdpau.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-03-28 22:33:58 +0200
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2011-04-01 19:13:24 +0200
commit9b7a0c5d886223802df54b754caf75b6e125e76f (patch)
tree56031c522b95fc7915ffba033a81456f8eea144a /libavcodec/vdpau.c
parente7c7b0d000e81d24327602e04d8fed400dbb7193 (diff)
downloadffmpeg-streaming-9b7a0c5d886223802df54b754caf75b6e125e76f.zip
ffmpeg-streaming-9b7a0c5d886223802df54b754caf75b6e125e76f.tar.gz
Allow selecting VDPAU, XvMC via get_format for MPEG-2
To avoid further special-casing, dummy AVHWAccels are added for VDPAU. It should be possible to move VDPAU completely to AVHWAccel later.
Diffstat (limited to 'libavcodec/vdpau.c')
-rw-r--r--libavcodec/vdpau.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index bd721e8..55b2110 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -369,4 +369,40 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf,
render->bitstream_buffers_used = 0;
}
+// Only dummy functions for now
+static int vdpau_mpeg2_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
+{
+ return 0;
+}
+
+static int vdpau_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
+{
+ return 0;
+}
+
+static int vdpau_mpeg2_end_frame(AVCodecContext *avctx)
+{
+ return 0;
+}
+
+AVHWAccel ff_mpeg1_vdpau_hwaccel = {
+ .name = "mpeg1_vdpau",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = CODEC_ID_MPEG1VIDEO,
+ .pix_fmt = PIX_FMT_VDPAU_MPEG1,
+ .start_frame = vdpau_mpeg2_start_frame,
+ .end_frame = vdpau_mpeg2_end_frame,
+ .decode_slice = vdpau_mpeg2_decode_slice,
+};
+
+AVHWAccel ff_mpeg2_vdpau_hwaccel = {
+ .name = "mpeg2_vdpau",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = CODEC_ID_MPEG2VIDEO,
+ .pix_fmt = PIX_FMT_VDPAU_MPEG2,
+ .start_frame = vdpau_mpeg2_start_frame,
+ .end_frame = vdpau_mpeg2_end_frame,
+ .decode_slice = vdpau_mpeg2_decode_slice,
+};
+
/* @}*/
OpenPOWER on IntegriCloud