]> git.sesse.net Git - vlc/commitdiff
* src/libvlc.h, src/input/: new --clock-synchro option to enable/disable the input...
authorGildas Bazin <gbazin@videolan.org>
Thu, 10 Feb 2005 13:26:52 +0000 (13:26 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 10 Feb 2005 13:26:52 +0000 (13:26 +0000)
src/input/input.c
src/input/var.c
src/libvlc.h

index 4c5bd6370e02b56ef84a93c1584632e26e0cc6c8..4543c48605c8750c6c6ae7ec550f91c3ff462e5c 100644 (file)
@@ -2036,6 +2036,10 @@ static int InputSourceInit( input_thread_t *p_input,
             }
         }
     }
+
+    if( var_GetInteger( p_input, "clock-synchro" ) != -1 )
+        in->b_can_pace_control = !var_GetInteger( p_input, "clock-synchro" );
+
     free( psz_dup );
     return VLC_SUCCESS;
 
@@ -2311,7 +2315,8 @@ static void ParseOption( input_thread_t *p_input, const char *psz_option )
 
     var_Set( p_input, psz_name, val );
 
-    msg_Dbg( p_input, "set input option: %s to %s", psz_name, psz_value ? psz_value : ( val.b_bool ? "true" : "false") );
+    msg_Dbg( p_input, "set input option: %s to %s", psz_name,
+             psz_value ? psz_value : ( val.b_bool ? "true" : "false") );
 
   cleanup:
     if( psz_name ) free( psz_name );
index a1b818b59421261a094729abc2edfb506da7922e..3b0d68535a676032af5dbf32b229568084c0d9b6 100644 (file)
@@ -431,6 +431,7 @@ void input_ConfigVarInit ( input_thread_t *p_input )
     var_Create( p_input, "audio-desync", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
 
     var_Create( p_input, "cr-average", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+    var_Create( p_input, "clock-synchro", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
 
     var_Create( p_input, "seekable", VLC_VAR_BOOL );
     val.b_bool = VLC_TRUE; /* Fixed later*/
index 41c4125c2d1694afa34ca8472793b45e2d9969ff..8e7242fa714c52e4d0f6ac42f7ad5db5a79f0f1b 100644 (file)
@@ -288,6 +288,14 @@ static char *ppsz_align_descriptions[] =
     "When using the PVR input (or a very irregular source), you should " \
     "set this to 10000.")
 
+#define CLOCK_SYNCHRO_TEXT N_("Clock synchronisation")
+#define CLOCK_SYNCHRO_LONGTEXT N_( \
+    "Allows you to enable/disable the input clock synchronisation for " \
+    "real-time sources.")
+static int pi_clock_values[] = { -1, 0, 1 };
+static char *ppsz_clock_descriptions[] =
+{ N_("Default"), N_("Disable"), N_("Enable") };
+
 #define SERVER_PORT_TEXT N_("UDP port")
 #define SERVER_PORT_LONGTEXT N_( \
     "This is the port used for UDP streams. By default, we chose 1234.")
@@ -1062,6 +1070,9 @@ vlc_module_begin();
 
     add_integer( "cr-average", 40, NULL, CR_AVERAGE_TEXT,
                  CR_AVERAGE_LONGTEXT, VLC_FALSE );
+    add_integer( "clock-synchro", -1, NULL, CLOCK_SYNCHRO_TEXT,
+                 CLOCK_SYNCHRO_LONGTEXT, VLC_FALSE );
+        change_integer_list( pi_clock_values, ppsz_clock_descriptions, 0 );
 
     /* Decoder options */
     add_category_hint( N_("Decoders"), CODEC_CAT_LONGTEXT , VLC_TRUE );