Commit 2e0eab4c authored by Christophe Massiot's avatar Christophe Massiot

* mad plug-in is now built-in to avoid PIC/non-PIC collision ;

* Updated documentation ;
* New --desync option, to delay the video (in case of lip desynchronization) ;
this is bad, but we have no other option for the moment ;
* Clicking in vout now pauses the stream, patch courtesy of Peter Surda.
parent 6d1e0c51
......@@ -4939,7 +4939,7 @@ fi
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
PLUGINS="${PLUGINS} mad_adec"
BUILTINS="${BUILTINS} mad_adec"
fi
fi
......
......@@ -778,7 +778,7 @@ AC_ARG_WITH(libmad,
])
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
PLUGINS="${PLUGINS} mad_adec"
BUILTINS="${BUILTINS} mad_adec"
fi ])
dnl special case for BeOS
......
......@@ -40,7 +40,7 @@ must have been prepared beforehands.
.B vcd:<device>
VCD device (for instance dvd:/dev/cdrom).
.TP
.B udpstream:[<server>:[<server port>]][@[<bind address>][:<bind port>]]
.B udpstream:[<server>[:<server port>]][@[<bind address>][:<bind port>]]
UDP stream, such as one sent by VideoLAN Server or VideoLAN miniserver.
Usually "udpstream:" is enough.
.TP
......
......@@ -3,7 +3,7 @@
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: main.h,v 1.23 2001/12/03 16:18:37 sam Exp $
* $Id: main.h,v 1.24 2001/12/06 10:53:42 massiot Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -49,6 +49,7 @@ typedef struct main_s
boolean_t b_audio; /* is audio output allowed ? */
boolean_t b_video; /* is video output allowed ? */
boolean_t b_ac3;
int i_desync; /* relative desync of the audio ouput */
/* memcpy plugin used */
struct module_s * p_memcpy_module;
......
......@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: vout_xvideo.c,v 1.34 2001/12/03 16:18:37 sam Exp $
* $Id: vout_xvideo.c,v 1.35 2001/12/06 10:53:42 massiot Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -531,8 +531,11 @@ static int vout_Manage( vout_thread_t *p_vout )
switch( ((XButtonEvent *)&xevent)->button )
{
case Button1:
/* in this part we will eventually manage
* clicks for DVD navigation for instance */
/* In this part we will eventually manage
* clicks for DVD navigation for instance. For the
* moment just pause the stream. */
input_SetStatus( p_main->p_intf->p_input,
INPUT_STATUS_PAUSE );
break;
}
}
......
......@@ -38,6 +38,8 @@
#include "audio_output.h"
#include "aout_common.h"
#include "main.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
......@@ -90,7 +92,8 @@ void aout_S16StereoThread( aout_thread_t * p_aout )
/* sizeof(s16) << (p_aout->b_stereo) == 4 */
p_aout->date = mdate() + ((((mtime_t)((l_bytes + 4 * p_aout->i_latency) / 4)) * 1000000)
/ ((mtime_t)p_aout->l_rate));
/ ((mtime_t)p_aout->l_rate))
+ p_main->i_desync;
p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer,
l_buffer_limit * sizeof(s16) );
......
......@@ -2,7 +2,7 @@
* aout_u8.c: 8 bit unsigned audio output functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: aout_u8.c,v 1.7 2001/11/28 15:08:06 massiot Exp $
* $Id: aout_u8.c,v 1.8 2001/12/06 10:53:42 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
......@@ -39,6 +39,8 @@
#include "audio_output.h"
#include "aout_common.h"
#include "main.h"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
......@@ -84,7 +86,8 @@ void aout_U8MonoThread( aout_thread_t * p_aout )
l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
/* sizeof(u8) << (p_aout->b_stereo) == 1 */
p_aout->date = mdate() + ((((mtime_t)((l_bytes + 4 * p_aout->i_latency) / 1)) * 1000000)
/ ((mtime_t)p_aout->l_rate));
/ ((mtime_t)p_aout->l_rate))
+ p_main->i_desync;
p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer, l_buffer_limit * sizeof(u8) );
if ( l_bytes > (l_buffer_limit * sizeof(u8) * 2) ) /* There are 2 channels (left & right) */
......@@ -138,7 +141,8 @@ void aout_U8StereoThread( aout_thread_t * p_aout )
l_bytes = p_aout->pf_getbufinfo( p_aout, l_buffer_limit );
/* sizeof(u8) << (p_aout->b_stereo) == 2 */
p_aout->date = mdate() + ((((mtime_t)((l_bytes + 4 * p_aout->i_latency) / 2)) * 1000000)
/ ((mtime_t)p_aout->l_rate));
/ ((mtime_t)p_aout->l_rate))
+ p_main->i_desync;
p_aout->pf_play( p_aout, (byte_t *)p_aout->buffer, l_buffer_limit * sizeof(u8) );
if ( l_bytes > (l_buffer_limit * sizeof(u8)) )
......
......@@ -2,7 +2,7 @@
* audio_output.c : audio output thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: audio_output.c,v 1.66 2001/11/28 15:08:06 massiot Exp $
* $Id: audio_output.c,v 1.67 2001/12/06 10:53:42 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
......@@ -312,7 +312,7 @@ static int aout_SpawnThread( aout_thread_t * p_aout )
}
/* Rough estimate of the playing date */
p_aout->date = mdate();
p_aout->date = mdate() + p_main->i_desync;
/* Launch the thread */
if ( vlc_thread_create( &p_aout->thread_id, "audio output",
......
......@@ -2,7 +2,7 @@
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_clock.c,v 1.25 2001/12/05 03:31:04 jobi Exp $
* $Id: input_clock.c,v 1.26 2001/12/06 10:53:42 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -40,6 +40,8 @@
#include "input_ext-dec.h"
#include "input_ext-plugins.h"
#include "main.h"
/*
* DISCUSSION : SYNCHRONIZATION METHOD
*
......@@ -312,7 +314,8 @@ mtime_t input_ClockGetTS( input_thread_t * p_input,
if( p_pgrm->i_synchro_state == SYNCHRO_OK )
{
return( ClockToSysdate( p_input, p_pgrm, i_ts + p_pgrm->delta_cr )
+ DEFAULT_PTS_DELAY );
+ DEFAULT_PTS_DELAY
+ (p_main->i_desync > 0 ? p_main->i_desync : 0) );
}
else
{
......
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.130 2001/12/05 10:30:25 massiot Exp $
* $Id: main.c,v 1.131 2001/12/06 10:53:42 massiot Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -112,6 +112,7 @@
#define OPT_MONO 152
#define OPT_SPDIF 153
#define OPT_VOLUME 154
#define OPT_DESYNC 155
#define OPT_NOVIDEO 160
#define OPT_DISPLAY 161
......@@ -187,6 +188,7 @@ static const struct option longopts[] =
{ "downmix", 1, 0, OPT_DOWNMIX },
{ "imdct", 1, 0, OPT_IMDCT },
{ "volume", 1, 0, OPT_VOLUME },
{ "desync", 1, 0, OPT_DESYNC },
/* Video options */
{ "novideo", 0, 0, OPT_NOVIDEO },
......@@ -596,6 +598,7 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
p_main->i_warning_level = 0;
p_main->b_stats = 0;
p_main->i_desync = 0; /* No desynchronization by default */
p_main->p_channel = NULL;
......@@ -732,6 +735,9 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
case OPT_VOLUME: /* --volume */
main_PutIntVariable( AOUT_VOLUME_VAR, atoi(optarg) );
break;
case OPT_DESYNC: /* --desync */
p_main->i_desync = atoi(optarg);
break;
/* Video options */
case OPT_NOVIDEO: /* --novideo */
......@@ -915,6 +921,7 @@ static void Usage( int i_fashion )
"\n --downmix <module> \tAC3 downmix method"
"\n --imdct <module> \tAC3 IMDCT method"
"\n --volume [0..1024] \tVLC output volume"
"\n --desync <time in ms> \tCompensate desynchronization of the audio"
"\n"
"\n --novideo \tdisable video"
"\n -V, --vout <module> \tvideo output method"
......@@ -948,7 +955,16 @@ static void Usage( int i_fashion )
"\n"
"\n -h, --help \tprint help and exit"
"\n -H, --longhelp \tprint long help and exit"
"\n --version \toutput version information and exit" );
"\n --version \toutput version information and exit"
"\n\nPlaylist items :"
"\n *.mpg, *.vob \tPlain MPEG-1/2 files"
"\n dvd:<device>[@<raw device>] \tDVD device"
"\n vcd:<device> \tVCD device"
"\n udpstream:[<server>[:<server port>]][@[<bind address>][:<bind port>]]"
"\n \tUDP stream sent by VLS"
"\n vlc:loop \tLoop execution of the playlist"
"\n vlc:pause \tPause execution of playlist items"
"\n vlc:quit \tQuit VLC");
if( i_fashion == SHORT_HELP )
return;
......@@ -1289,7 +1305,7 @@ static int CPUCapabilities( void )
if( setjmp( env ) == 0 )
{
asm volatile ("mtspr 256, %0\n\t"
"vand %v0, %v0, %v0"
"vand %%v0, %%v0, %%v0"
:
: "r" (-1));
}
......
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