Commit 57823d10 authored by Gildas Bazin's avatar Gildas Bazin

* po/fr.po: small update.
* modules/codec/libmpeg2.c: we now bypass libmpeg2 buffer management. As a nice side effect, still pictures in dvd menus are working now :)
parent a8b6aa37
...@@ -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.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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -75,6 +75,8 @@ static int OpenDecoder ( vlc_object_t * ); ...@@ -75,6 +75,8 @@ static int OpenDecoder ( vlc_object_t * );
static int RunDecoder ( decoder_fifo_t * ); static int RunDecoder ( decoder_fifo_t * );
static void CloseDecoder ( dec_thread_t * ); static void CloseDecoder ( dec_thread_t * );
static picture_t *GetNewPicture( dec_thread_t *, uint8_t ** );
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
*****************************************************************************/ *****************************************************************************/
...@@ -182,7 +184,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo ) ...@@ -182,7 +184,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
break; break;
case STATE_SEQUENCE: case STATE_SEQUENCE:
{
/* Initialize video output */ /* Initialize video output */
uint8_t *buf[3];
/* Check whether the input gives a particular aspect ratio */ /* Check whether the input gives a particular aspect ratio */
if( p_dec->p_fifo->p_demux_data if( p_dec->p_fifo->p_demux_data
...@@ -223,26 +227,22 @@ static int RunDecoder( decoder_fifo_t *p_fifo ) ...@@ -223,26 +227,22 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
p_dec->p_info->sequence->width, p_dec->p_info->sequence->width,
p_dec->p_info->sequence->height, p_dec->p_info->sequence->height,
i_chroma, i_aspect ); 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: case STATE_PICTURE:
{ {
uint8_t *buf[3]; uint8_t *buf[3];
/* Get a new picture */ if( (p_pic = GetNewPicture( p_dec, buf )) == NULL ) break;
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;
mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic ); mpeg2_set_buf( p_dec->p_mpeg2dec, buf, p_pic );
/* Store the date for the picture */ /* Store the date for the picture */
...@@ -362,3 +362,28 @@ static void CloseDecoder( dec_thread_t * p_dec ) ...@@ -362,3 +362,28 @@ static void CloseDecoder( dec_thread_t * p_dec )
free( p_dec ); 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;
}
...@@ -4059,7 +4059,7 @@ msgstr "" ...@@ -4059,7 +4059,7 @@ msgstr ""
#: modules/gui/wxwindows/interface.cpp:208 #: modules/gui/wxwindows/interface.cpp:208
msgid "About this program" msgid "About this program"
msgstr "Quitter le programme" msgstr " propos de ce programme"
#: modules/gui/wxwindows/interface.cpp:212 #: modules/gui/wxwindows/interface.cpp:212
msgid "&Open File..." msgid "&Open File..."
...@@ -4071,7 +4071,7 @@ msgstr "Ouvrir un &disque..." ...@@ -4071,7 +4071,7 @@ msgstr "Ouvrir un &disque..."
#: modules/gui/wxwindows/interface.cpp:214 #: modules/gui/wxwindows/interface.cpp:214
msgid "&Network Stream..." msgid "&Network Stream..."
msgstr "Flux rseau..." msgstr "&Flux rseau..."
#: modules/gui/wxwindows/interface.cpp:216 #: modules/gui/wxwindows/interface.cpp:216
msgid "&Satellite Stream..." msgid "&Satellite Stream..."
...@@ -4087,11 +4087,11 @@ msgstr "Quitter" ...@@ -4087,11 +4087,11 @@ msgstr "Quitter"
#: modules/gui/wxwindows/interface.cpp:226 #: modules/gui/wxwindows/interface.cpp:226
msgid "&Logs..." msgid "&Logs..."
msgstr "Disque..." msgstr "&Messages..."
#: modules/gui/wxwindows/interface.cpp:227 #: modules/gui/wxwindows/interface.cpp:227
msgid "&File info..." msgid "&File info..."
msgstr "&Fichier..." msgstr "&Infos fichier..."
#: modules/gui/wxwindows/interface.cpp:231 #: modules/gui/wxwindows/interface.cpp:231
msgid "&Audio" msgid "&Audio"
......
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