Commit 0de13a16 authored by Laurent Aimar's avatar Laurent Aimar

* include/video.h : added new fourcc code for avi

    * ALL : version from ffmpeg cvs can now decode msmpeg4 v1 v2 ,
        so i have added support for this. But you can always use old ffmpeg
        library  without any problem ( i hope ;)
parent d75890a8
......@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_ext-dec.h,v 1.56 2002/04/24 00:36:24 sam Exp $
* $Id: input_ext-dec.h,v 1.57 2002/05/13 21:55:30 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
......@@ -31,8 +31,11 @@
/* These ones might violate the norm : */
#define DVD_SPU_ES 0x82
#define LPCM_AUDIO_ES 0x83
#define MSMPEG4_VIDEO_ES 0x90
#define MPEG4_VIDEO_ES 0x91
#define MSMPEG4v1_VIDEO_ES 0x40
#define MSMPEG4v2_VIDEO_ES 0x41
#define MSMPEG4v3_VIDEO_ES 0x42
#define MPEG4_VIDEO_ES 0x50
#define UNKNOWN_ES 0xFF
/* Structures exported to the decoders */
......
......@@ -4,7 +4,7 @@
* includes all common video types and constants.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video.h,v 1.50 2002/04/25 21:52:42 sam Exp $
* $Id: video.h,v 1.51 2002/05/13 21:55:30 fenrir Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -176,28 +176,51 @@ typedef struct picture_heap_s
#define TWOCC_dc MAKETWOCC('d','c')
#define TWOCC_pc MAKETWOCC('p','c')
/* MPEG4 (opendivx) codec */
/* MPEG4 codec */
#define FOURCC_DIVX MAKEFOURCC('D','I','V','X')
#define FOURCC_divx MAKEFOURCC('d','i','v','x')
#define FOURCC_DX50 MAKEFOURCC('D','X','5','0')
#define FOURCC_DIV1 MAKEFOURCC('D','I','V','1')
#define FOURCC_div1 MAKEFOURCC('d','i','v','1')
#define FOURCC_MP4S MAKEFOURCC('M','P','4','S')
#define FOURCC_mp4s MAKEFOURCC('m','p','4','s')
#define FOURCC_M4S2 MAKEFOURCC('M','4','S','2')
#define FOURCC_m4s2 MAKEFOURCC('m','4','s','2')
#define FOURCC_xvid MAKEFOURCC('x','v','i','d')
#define FOURCC_XVID MAKEFOURCC('X','V','I','D')
#define FOURCC_XviD MAKEFOURCC('X','v','i','D')
#define FOURCC_DX50 MAKEFOURCC('D','X','5','0')
#define FOURCC_mp4v MAKEFOURCC('m','p','4','v')
#define FOURCC_4 MAKEFOURCC( 4, 0, 0, 0 )
/* MSMPEG4 v2 */
#define FOURCC_MPG4 MAKEFOURCC('M','P','G','4')
#define FOURCC_mpg4 MAKEFOURCC('m','p','g','4')
#define FOURCC_mp4v MAKEFOURCC('m','p','4','v')
/* msmepg (divx v3) codec */
#define FOURCC_DIV3 MAKEFOURCC('D','I','V','3')
#define FOURCC_DIV2 MAKEFOURCC('D','I','V','2')
#define FOURCC_div2 MAKEFOURCC('d','i','v','2')
#define FOURCC_MP42 MAKEFOURCC('M','P','4','2')
#define FOURCC_mp42 MAKEFOURCC('m','p','4','2')
/* MSMPEG4 v3 */
/* M$ mpeg4 v3 */
#define FOURCC_MPG3 MAKEFOURCC('M','P','G','3')
#define FOURCC_mpg3 MAKEFOURCC('m','p','g','3')
#define FOURCC_div3 MAKEFOURCC('d','i','v','3')
#define FOURCC_MP43 MAKEFOURCC('M','P','4','3')
#define FOURCC_mp43 MAKEFOURCC('m','p','4','3')
/* DivX 3.20 */
#define FOURCC_DIV3 MAKEFOURCC('D','I','V','3')
#define FOURCC_DIV4 MAKEFOURCC('D','I','V','4')
#define FOURCC_div4 MAKEFOURCC('d','i','v','4')
#define FOURCC_DIV5 MAKEFOURCC('D','I','V','5')
#define FOURCC_div5 MAKEFOURCC('d','i','v','5')
#define FOURCC_DIV6 MAKEFOURCC('D','I','V','6')
#define FOURCC_div6 MAKEFOURCC('d','i','v','6')
#define FOURCC_3IV1 MAKEFOURCC('3','I','V','1')
/* AngelPotion stuff */
#define FOURCC_AP41 MAKEFOURCC('A','P','4','1')
#define FOURCC_MP43 MAKEFOURCC('M','P','4','3')
#define FOURCC_mp43 MAKEFOURCC('m','p','4','3')
/* ?? */
#define FOURCC_3IV1 MAKEFOURCC('3','I','V','1')
/* Packed RGB for 8bpp */
#define FOURCC_BI_RGB MAKEFOURCC( 0 , 0 , 0 , 0 )
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* avi.h : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.h,v 1.5 2002/05/10 04:06:10 fenrir Exp $
* $Id: avi.h,v 1.6 2002/05/13 21:55:30 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -111,7 +111,7 @@ typedef struct AVIIndexEntry_s
{
u32 i_id;
u32 i_flags;
u32 i_offset;
u32 i_pos;
u32 i_length;
u32 i_lengthtotal;
} AVIIndexEntry_t;
......@@ -136,7 +136,6 @@ typedef struct AVIStreamInfo_s
int i_idxmax;
int i_idxposc; /* numero of chunk */
int i_idxposb; /* byte in the current chunk */
off_t i_idxoffset; /* how many to add to index.i_pos */
} AVIStreamInfo_t;
typedef struct demux_data_avi_file_s
......
......@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.8 2002/05/12 06:51:08 fenrir Exp $
* $Id: ffmpeg.c,v 1.9 2002/05/13 21:55:30 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -61,7 +61,7 @@ static int InitThread ( videodec_thread_t * );
static void EndThread ( videodec_thread_t * );
static void DecodeThread ( videodec_thread_t * );
/* FIXME make this variable global */
static int b_ffmpeginit = 0;
/*****************************************************************************
......@@ -81,7 +81,7 @@ MODULE_CONFIG_START
MODULE_CONFIG_STOP
MODULE_INIT_START
SET_DESCRIPTION( "ffmpeg video decoder (MSMPEG4v3,MPEG4)" )
SET_DESCRIPTION( "ffmpeg video decoder (MSMPEG4v123,MPEG4)" )
ADD_CAPABILITY( DECODER, 70 )
ADD_SHORTCUT( "ffmpeg" )
MODULE_INIT_STOP
......@@ -119,7 +119,11 @@ static int decoder_Probe( u8 *pi_type )
{
switch( *pi_type )
{
case( MSMPEG4_VIDEO_ES ):
#if LIBAVCODEC_BUILD >= 4608
case( MSMPEG4v1_VIDEO_ES):
case( MSMPEG4v2_VIDEO_ES):
#endif
case( MSMPEG4v3_VIDEO_ES):
case( MPEG4_VIDEO_ES ):
return( 0 );
default:
......@@ -326,13 +330,29 @@ static int InitThread( videodec_thread_t *p_vdec )
switch( p_vdec->p_config->i_type)
{
case( MSMPEG4_VIDEO_ES):
#if LIBAVCODEC_BUILD >= 4608 /* what is the true version */
case( MSMPEG4v1_VIDEO_ES):
p_vdec->p_codec = avcodec_find_decoder( CODEC_ID_MSMPEG4V1 );
p_vdec->psz_namecodec = "MS MPEG-4 v1";
break;
case( MSMPEG4v2_VIDEO_ES):
p_vdec->p_codec = avcodec_find_decoder( CODEC_ID_MSMPEG4V2 );
p_vdec->psz_namecodec = "MS MPEG-4 v2";
break;
case( MSMPEG4v3_VIDEO_ES):
p_vdec->p_codec = avcodec_find_decoder( CODEC_ID_MSMPEG4V3 );
p_vdec->psz_namecodec = "MS MPEG-4 v3";
break;
#else
/* fallback on this */
case( MSMPEG4v3_VIDEO_ES):
p_vdec->p_codec = avcodec_find_decoder( CODEC_ID_MSMPEG4 );
p_vdec->psz_namecodec = "MS MPEG-4/divx";
p_vdec->psz_namecodec = "MS MPEG-4";
break;
#endif
case( MPEG4_VIDEO_ES):
p_vdec->p_codec = avcodec_find_decoder( CODEC_ID_MPEG4 );
p_vdec->psz_namecodec = "MPEG-4/opendivx";
p_vdec->psz_namecodec = "MPEG-4";
break;
default:
p_vdec->p_codec = NULL;
......
......@@ -2,7 +2,7 @@
* mpeg_audio.c : mpeg_audio Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mpeg_audio.c,v 1.2 2002/05/13 16:28:44 fenrir Exp $
* $Id: mpeg_audio.c,v 1.3 2002/05/13 21:55:30 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -378,7 +378,7 @@ static int MPEGAudioInit( input_thread_t * p_input )
if( !(MPEGAudio_FindFrame( p_input, &i_pos, &mpeg )) )
{
intf_ErrMsg( "input: MPEGAudio plug-in discarded (no MPEG header)" );
intf_WarnMsg( 2,"input: MPEGAudio plug-in discarded (no MPEG header)" );
return( -1 );
}
......
......@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_programs.c,v 1.84 2002/04/26 01:45:36 fenrir Exp $
* $Id: input_programs.c,v 1.85 2002/05/13 21:55:30 fenrir Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -629,7 +629,9 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
case MPEG1_VIDEO_ES:
case MPEG2_VIDEO_ES:
case MPEG4_VIDEO_ES:
case MSMPEG4_VIDEO_ES:
case MSMPEG4v1_VIDEO_ES:
case MSMPEG4v2_VIDEO_ES:
case MSMPEG4v3_VIDEO_ES:
case DVD_SPU_ES:
if( p_main->b_video )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment