]> git.sesse.net Git - vlc/commitdiff
* mad plug-in is now built-in to avoid PIC/non-PIC collision ;
authorChristophe Massiot <massiot@videolan.org>
Thu, 6 Dec 2001 10:53:42 +0000 (10:53 +0000)
committerChristophe Massiot <massiot@videolan.org>
Thu, 6 Dec 2001 10:53:42 +0000 (10:53 +0000)
* 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.

configure
configure.in
doc/vlc.1
include/main.h
plugins/x11/vout_xvideo.c
src/audio_output/aout_s16.c
src/audio_output/aout_u8.c
src/audio_output/audio_output.c
src/input/input_clock.c
src/interface/main.c

index 979184a70fde9d52e7a7edc1e33d36ba6b5af8c5..f1537ffbe0102d729326873c81570168ded82d01 100755 (executable)
--- a/configure
+++ b/configure
@@ -4939,7 +4939,7 @@ fi
 
       CFLAGS=$save_CFLAGS
       LDFLAGS=$save_LDFLAGS
-      PLUGINS="${PLUGINS} mad_adec"
+      BUILTINS="${BUILTINS} mad_adec"
     fi 
 fi
 
index 4f23710c5d0faad5cc96a6310e894a2f89711ac5..2ff1cf0ee71f754a550ace1025103faff1505c71 100644 (file)
@@ -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
index 8e3d54de807a358e33d73135035ff0d2fb18d2b6..a196fe34bc0bbdeb73a1052ef170df5f35727d04 100644 (file)
--- a/doc/vlc.1
+++ b/doc/vlc.1
@@ -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
index 4451efd1e6c13bae7c667685edf8692fc79d0e0c..69d8533cf667e9bb80ff7dafd828b7cf88606f95 100644 (file)
@@ -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;
index dc90fd3f4d067cfb17ceffeb600da4da54d23790..d04c0119b77a766c6a6cc04cb9483104c4ff0a1f 100644 (file)
@@ -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;
             }
         }
index 9ffe1308e3eb297cc7834e4740cbaed404e9d3f6..392399f7429da042a01d49d69cf953c28218a561 100644 (file)
@@ -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) );
 
index 2a863fda1945d4d456750d156955d56c5005f9ae..24196cce59dcb71b81210d83dae780b39268fa4d 100644 (file)
@@ -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)) )
index 1452623873510d518629d921ef42a0f05aad308e..093a2947be9ac72f7816cca209f82a323db47d4c 100644 (file)
@@ -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",
index b72b7db528336b0e1bd1dc5ce79c98acc4c3eb95..98be4627113880de86ea6766cf9b1dfd4fa9e7ec 100644 (file)
@@ -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
     {
index 9daa6dc329cc07ab551dec772b57184232d1d842..f2427de23355520eb8b6c188de4ccdf7d1d0b92f 100644 (file)
@@ -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>
 #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;
@@ -970,7 +986,7 @@ static void Usage( int i_fashion )
         "\n  " DOWNMIX_METHOD_VAR "=<method name>     \tAC3 downmix method"
         "\n  " IMDCT_METHOD_VAR "=<method name>       \tAC3 IMDCT method"
         "\n  " AOUT_VOLUME_VAR "=[0..1024]            \tVLC output volume"
-        "\n  " AOUT_RATE_VAR "=<rate>             \toutput rate" );
+        "\n  " AOUT_RATE_VAR "=<rate>                 \toutput rate" );
 
     /* Video parameters */
     intf_MsgImm( "\nVideo parameters:"
@@ -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));
     }