* libmpeg2.c: mpeg2 video decoder module making use of libmpeg2.
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: libmpeg2.c,v 1.7 2003/04/05 12:43:39 gbazin Exp $
+ * $Id: libmpeg2.c,v 1.8 2003/04/07 17:35:01 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
static int RunDecoder ( decoder_fifo_t * );
static void CloseDecoder ( dec_thread_t * );
+static picture_t *GetNewPicture( dec_thread_t *, uint8_t ** );
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
break;
case STATE_SEQUENCE:
+ {
/* Initialize video output */
+ uint8_t *buf[3];
/* Check whether the input gives a particular aspect ratio */
if( p_dec->p_fifo->p_demux_data
p_dec->p_info->sequence->width,
p_dec->p_info->sequence->height,
i_chroma, i_aspect );
- break;
+
+ mpeg2_custom_fbuf( p_dec->p_mpeg2dec, 1 );
+
+ /* Set the first 2 reference frames */
+ if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) break;
+ mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic );
+ if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) break;
+ mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic );
+ }
+ break;
case STATE_PICTURE:
{
uint8_t *buf[3];
- /* Get a new picture */
- while( !(p_pic = vout_CreatePicture( p_dec->p_vout, 0, 0, 0 ) ) )
- {
- if( p_dec->p_fifo->b_die || p_dec->p_fifo->b_error )
- break;
-
- msleep( VOUT_OUTMEM_SLEEP );
- }
- if( p_pic == NULL )
- break;
-
- buf[0] = p_pic->p[0].p_pixels;
- buf[1] = p_pic->p[1].p_pixels;
- buf[2] = p_pic->p[2].p_pixels;
+ if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) break;
mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic );
/* Store the date for the picture */
free( p_dec );
}
}
+
+/*****************************************************************************
+ * GetNewPicture: Get a new picture from the vout and set the buf struct
+ *****************************************************************************/
+static picture_t *GetNewPicture( dec_thread_t *p_dec, uint8_t **pp_buf )
+{
+ picture_t *p_pic;
+
+ /* Get a new picture */
+ while( !(p_pic = vout_CreatePicture( p_dec->p_vout, 0, 0, 0 ) ) )
+ {
+ if( p_dec->p_fifo->b_die || p_dec->p_fifo->b_error )
+ break;
+
+ msleep( VOUT_OUTMEM_SLEEP );
+ }
+ if( p_pic == NULL )
+ return NULL;
+
+ pp_buf[0] = p_pic->p[0].p_pixels;
+ pp_buf[1] = p_pic->p[1].p_pixels;
+ pp_buf[2] = p_pic->p[2].p_pixels;
+
+ return p_pic;
+}
#: modules/gui/wxwindows/interface.cpp:208
msgid "About this program"
-msgstr "Quitter le programme"
+msgstr "À propos de ce programme"
#: modules/gui/wxwindows/interface.cpp:212
msgid "&Open File..."
#: modules/gui/wxwindows/interface.cpp:214
msgid "&Network Stream..."
-msgstr "Flux réseau..."
+msgstr "&Flux réseau..."
#: modules/gui/wxwindows/interface.cpp:216
msgid "&Satellite Stream..."
#: modules/gui/wxwindows/interface.cpp:226
msgid "&Logs..."
-msgstr "Disque..."
+msgstr "&Messages..."
#: modules/gui/wxwindows/interface.cpp:227
msgid "&File info..."
-msgstr "&Fichier..."
+msgstr "&Infos fichier..."
#: modules/gui/wxwindows/interface.cpp:231
msgid "&Audio"