Commit ad48c59b authored by Christophe Massiot's avatar Christophe Massiot

* The libmpeg2 plug-in is now completely operational ;

* configure.ac.in : disabled compiling the old mpeg_video plug-in, so :
DO NOT FORGET TO INSTALL LIBMPEG2 AND COMPILE WITH --enable-libmpeg2
parent 0adb6a63
...@@ -807,7 +807,7 @@ AM_CONDITIONAL(CPROF, test "${enable_gprof}" = "yes") ...@@ -807,7 +807,7 @@ AM_CONDITIONAL(CPROF, test "${enable_gprof}" = "yes")
dnl dnl
dnl default modules dnl default modules
dnl dnl
BUILTINS="${BUILTINS} mpeg_video idct idctclassic motion" #BUILTINS="${BUILTINS} mpeg_video idct idctclassic motion"
PLUGINS="${PLUGINS} dummy rc logger gestures memcpy" PLUGINS="${PLUGINS} dummy rc logger gestures memcpy"
PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts avi asf aac mp4 rawdv" PLUGINS="${PLUGINS} es audio m4v mpeg_system ps ts avi asf aac mp4 rawdv"
PLUGINS="${PLUGINS} spudec mpeg_audio lpcm a52 dts cinepak" PLUGINS="${PLUGINS} spudec mpeg_audio lpcm a52 dts cinepak"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libmpeg2.c: mpeg2 video decoder module making use of libmpeg2. * libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: libmpeg2.c,v 1.10 2003/04/15 15:53:42 gbazin Exp $ * $Id: libmpeg2.c,v 1.11 2003/04/20 12:59:01 massiot Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -254,7 +254,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo ) ...@@ -254,7 +254,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
mpeg2_set_buf( p_dec->p_mpeg2dec, buf, NULL ); mpeg2_set_buf( p_dec->p_mpeg2dec, buf, NULL );
p_dec->p_synchro = vout_SynchroInit( p_dec->p_fifo, p_dec->p_vout, p_dec->p_synchro = vout_SynchroInit( p_dec->p_fifo, p_dec->p_vout,
1000000 * 27 / p_dec->p_info->sequence->frame_period * 1001 ); 1001 * 100 * 27 / p_dec->p_info->sequence->frame_period * 10000 );
} }
break; break;
...@@ -288,9 +288,10 @@ static int RunDecoder( decoder_fifo_t *p_fifo ) ...@@ -288,9 +288,10 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic ); mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic );
} }
} }
/* pass-through */ break;
case STATE_END: case STATE_END:
case STATE_SLICE:
if( p_dec->p_info->display_fbuf if( p_dec->p_info->display_fbuf
&& p_dec->p_info->display_fbuf->id ) && p_dec->p_info->display_fbuf->id )
{ {
...@@ -315,19 +316,22 @@ static int RunDecoder( decoder_fifo_t *p_fifo ) ...@@ -315,19 +316,22 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
p_dec->p_info->display_picture->flags p_dec->p_info->display_picture->flags
& PIC_MASK_CODING_TYPE, & PIC_MASK_CODING_TYPE,
1 ); 1 );
vout_DestroyPicture( p_dec->p_vout, p_pic ); vout_DatePicture( p_dec->p_vout, p_pic, 0 );
vout_DisplayPicture( p_dec->p_vout, p_pic );
} }
} }
if( p_dec->p_info->discard_fbuf && }
p_dec->p_info->discard_fbuf->id )
{ if( p_dec->p_info->discard_fbuf &&
vout_UnlinkPicture( p_dec->p_vout, p_pic ); p_dec->p_info->discard_fbuf->id )
} {
p_pic = (picture_t *)p_dec->p_info->discard_fbuf->id;
vout_UnlinkPicture( p_dec->p_vout, p_pic );
} }
break; break;
case STATE_INVALID: case STATE_INVALID:
msg_Warn( p_dec->p_fifo, "Received STATE_INVALID" ); msg_Warn( p_dec->p_fifo, "invalid picture encountered" );
break; break;
default: default:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vpar_synchro.c : frame dropping routines * vpar_synchro.c : frame dropping routines
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: synchro.c,v 1.7 2003/01/23 21:47:59 massiot Exp $ * $Id: synchro.c,v 1.8 2003/04/20 12:59:01 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -437,7 +437,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, ...@@ -437,7 +437,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
p_vpar->synchro.current_pts += p_vpar->synchro.i_current_period p_vpar->synchro.current_pts += p_vpar->synchro.i_current_period
* (period >> 1); * (period >> 1);
#define PTS_THRESHOLD (period >> 2) #define PTS_THRESHOLD (period >> 2)
if( i_coding_type == B_CODING_TYPE ) if( i_coding_type == B_CODING_TYPE )
{ {
/* A video frame can be displayed 1, 2 or 3 times, according to /* A video frame can be displayed 1, 2 or 3 times, according to
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_pictures.c : picture management functions * vout_pictures.c : picture management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: vout_pictures.c,v 1.36 2003/03/28 17:02:25 gbazin Exp $ * $Id: vout_pictures.c,v 1.37 2003/04/20 12:59:02 massiot Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -259,7 +259,8 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -259,7 +259,8 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
if( p_pic->i_refcount < 0 ) if( p_pic->i_refcount < 0 )
{ {
msg_Err( p_vout, "picture refcount is %i", p_pic->i_refcount ); msg_Err( p_vout, "picture %p refcount is %i",
p_pic, p_pic->i_refcount );
p_pic->i_refcount = 0; p_pic->i_refcount = 0;
} }
......
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