diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/combined/ffmpeg/xine_video.list | 1 | ||||
-rw-r--r-- | src/demuxers/demux_matroska.c | 23 | ||||
-rw-r--r-- | src/demuxers/matroska.h | 1 | ||||
-rw-r--r-- | src/xine-engine/buffer.h | 1 | ||||
-rw-r--r-- | src/xine-engine/buffer_types.c | 8 |
5 files changed, 34 insertions, 0 deletions
diff --git a/src/combined/ffmpeg/xine_video.list b/src/combined/ffmpeg/xine_video.list index a3c961d13..546cfff7c 100644 --- a/src/combined/ffmpeg/xine_video.list +++ b/src/combined/ffmpeg/xine_video.list @@ -34,6 +34,7 @@ VP31 VP3 On2 VP3.1 VP5 VP5 On2 VP5 VP6 VP6 On2 VP6 VP6F VP6F On2 VP6 +VP8 VP8 On2 VP8 4XM 4XM 4X Video CINEPAK CINEPAK Cinepak MSVC MSVIDEO1 Microsoft Video 1 diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index 694236833..c47cd2657 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -1331,6 +1331,29 @@ static int parse_track_entry(demux_matroska_t *this, matroska_track_t *track) { lprintf("MATROSKA_CODEC_ID_V_MPEG2\n"); track->buf_type = BUF_VIDEO_MPEG; init_codec = init_codec_video; + } else if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_V_VP8)) { + xine_bmiheader *bih; + + lprintf("MATROSKA_CODEC_ID_V_VP8\n"); + if (track->codec_private_len > 0x7fffffff - sizeof(xine_bmiheader)) + track->codec_private_len = 0x7fffffff - sizeof(xine_bmiheader); + + /* create a bitmap info header struct for vp8 */ + bih = calloc(1, sizeof(xine_bmiheader) + track->codec_private_len); + bih->biSize = sizeof(xine_bmiheader) + track->codec_private_len; + bih->biCompression = ME_FOURCC('v', 'p', '8', '0'); + bih->biWidth = track->video_track->pixel_width; + bih->biHeight = track->video_track->pixel_height; + _x_bmiheader_le2me(bih); + + /* add bih extra data */ + memcpy(bih + 1, track->codec_private, track->codec_private_len); + free(track->codec_private); + track->codec_private = (uint8_t *)bih; + track->codec_private_len = bih->biSize; + track->buf_type = BUF_VIDEO_VP8; + + init_codec = init_codec_video; } else if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_V_REAL_RV10)) { } else if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_V_REAL_RV20)) { } else if (!strcmp(track->codec_id, MATROSKA_CODEC_ID_V_REAL_RV30)) { diff --git a/src/demuxers/matroska.h b/src/demuxers/matroska.h index e8f124e9b..7af9ef121 100644 --- a/src/demuxers/matroska.h +++ b/src/demuxers/matroska.h @@ -314,6 +314,7 @@ struct matroska_track_s { #define MATROSKA_CODEC_ID_V_REAL_RV40 "V_REAL/RV40" #define MATROSKA_CODEC_ID_V_MJPEG "V_MJPEG" #define MATROSKA_CODEC_ID_V_THEORA "V_THEORA" +#define MATROSKA_CODEC_ID_V_VP8 "V_VP8" #define MATROSKA_CODEC_ID_A_MPEG1_L1 "A_MPEG/L1" #define MATROSKA_CODEC_ID_A_MPEG1_L2 "A_MPEG/L2" diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 034f6552a..9198ff103 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -189,6 +189,7 @@ extern "C" { #define BUF_VIDEO_VC1 0x02650000 #define BUF_VIDEO_VMNC 0x02660000 #define BUF_VIDEO_SNOW 0x02670000 +#define BUF_VIDEO_VP8 0x02680000 /* audio buffer types: (please keep in sync with buffer_types.c) */ diff --git a/src/xine-engine/buffer_types.c b/src/xine-engine/buffer_types.c index e6b846d64..050043c64 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -789,6 +789,14 @@ static const video_db_t video_db[] = { BUF_VIDEO_SNOW, "Snow" }, +{ + { + ME_FOURCC('V','P','8','0'), + 0 + }, + BUF_VIDEO_VP8, + "On2 VP8" +}, { { 0 }, 0, "last entry" } }; |