diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-03-28 22:33:58 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-04-01 19:13:24 +0200 |
commit | 9b7a0c5d886223802df54b754caf75b6e125e76f (patch) | |
tree | 56031c522b95fc7915ffba033a81456f8eea144a /libavcodec/vdpau.c | |
parent | e7c7b0d000e81d24327602e04d8fed400dbb7193 (diff) | |
download | ffmpeg-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.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index bd721e8f8e..55b2110c02 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, +}; + /* @}*/ |