From 19e885691fcbfa46564fab93bde6d946350584da Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Sat, 20 Apr 2002 20:20:43 +0000 Subject: differentiating mpeg-4 formats even more, divx5 apparently is not completely mpeg-4 compliant while xvid reportedly doesn't handle mpeg-4 streams correctly CVS patchset: 1750 CVS date: 2002/04/20 20:20:43 --- src/libdivx4/xine_decoder.c | 5 +++-- src/libffmpeg/xine_decoder.c | 4 +++- src/libxvid/xine_decoder.c | 5 ++++- src/xine-engine/buffer.h | 4 +++- src/xine-engine/buffer_types.c | 22 ++++++++++++++++++---- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c index 225865a3d..8a8b7c958 100644 --- a/src/libdivx4/xine_decoder.c +++ b/src/libdivx4/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.26 2002/04/09 03:38:00 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.27 2002/04/20 20:20:43 guenter Exp $ * * xine decoder plugin using divx4 * @@ -366,7 +366,8 @@ static int divx4_can_handle (video_decoder_t *this_gen, int buf_type) { /* divx4 currently does not support MSMPEG4 v1/v2 */ return ( (buf_type == BUF_VIDEO_MSMPEG4_V3 && this->can_handle_311) || /* buf_type == BUF_VIDEO_MSMPEG4_V12 || */ - buf_type == BUF_VIDEO_MPEG4); + (buf_type == BUF_VIDEO_MPEG4) || + (buf_type == BUF_VIDEO_DIVX5)); } /* copied verbatim from ffmpeg plugin */ diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index f4831f4ac..5fa26c000 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.30 2002/04/09 03:38:00 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.31 2002/04/20 20:20:43 guenter Exp $ * * xine decoder plugin using ffmpeg * @@ -114,6 +114,8 @@ static int ff_can_handle (video_decoder_t *this_gen, int buf_type) { return ( buf_type == BUF_VIDEO_MSMPEG4_V3 || /* buf_type == BUF_VIDEO_MSMPEG4_V12 || */ buf_type == BUF_VIDEO_MPEG4 || + buf_type == BUF_VIDEO_XVID || + buf_type == BUF_VIDEO_DIVX5 || buf_type == BUF_VIDEO_MJPEG || /* buf_type == BUF_VIDEO_I263 || */ buf_type == BUF_VIDEO_H263 || diff --git a/src/libxvid/xine_decoder.c b/src/libxvid/xine_decoder.c index b3b567d3b..cb5672ba4 100644 --- a/src/libxvid/xine_decoder.c +++ b/src/libxvid/xine_decoder.c @@ -83,7 +83,10 @@ typedef struct xvid_decoder_s { static int xvid_can_handle (video_decoder_t *this_gen, int buf_type) { buf_type &= (BUF_MAJOR_MASK|BUF_DECODER_MASK); - return (buf_type == BUF_VIDEO_MPEG4); + + /* FIXME: what is it exactly that xvid can handle? :> */ + + return ((buf_type == BUF_VIDEO_XVID) || (buf_type == BUF_VIDEO_DIVX5)); } static void xvid_init_plugin (video_decoder_t *this_gen, vo_instance_t *video_out) { diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index b3be8a5a3..98d1de436 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer.h,v 1.41 2002/04/20 15:00:27 guenter Exp $ + * $Id: buffer.h,v 1.42 2002/04/20 20:20:44 guenter Exp $ * * * contents: @@ -102,6 +102,8 @@ extern "C" { #define BUF_VIDEO_H263 0x02190000 #define BUF_VIDEO_3IVX 0x021A0000 #define BUF_VIDEO_CYUV 0x021B0000 +#define BUF_VIDEO_DIVX5 0x021C0000 +#define BUF_VIDEO_XVID 0x021D0000 /* 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 5deaf5bb6..0856d1ede 100644 --- a/src/xine-engine/buffer_types.c +++ b/src/xine-engine/buffer_types.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: buffer_types.c,v 1.15 2002/04/20 15:00:27 guenter Exp $ + * $Id: buffer_types.c,v 1.16 2002/04/20 20:20:44 guenter Exp $ * * * contents: @@ -67,8 +67,6 @@ static video_db_t video_db[] = { }, { { - mmioFOURCC('X', 'V', 'I', 'D'), - mmioFOURCC('D', 'X', '5', '0'), mmioFOURCC('D', 'I', 'V', 'X'), mmioFOURCC('d', 'i', 'v', 'x'), mmioFOURCC('D', 'i', 'v', 'x'), @@ -80,7 +78,23 @@ static video_db_t video_db[] = { 0 }, BUF_VIDEO_MPEG4, - "ISO-MPEG4/XviD/OpenDivx format" + "ISO-MPEG4/OpenDivx format" +}, +{ + { + mmioFOURCC('X', 'V', 'I', 'D'), + 0 + }, + BUF_VIDEO_XVID, + "XviD format" +}, +{ + { + mmioFOURCC('D', 'X', '5', '0'), + 0 + }, + BUF_VIDEO_DIVX5, + "DivX 5 format" }, { { -- cgit v1.2.3