]> git.sesse.net Git - vlc/blobdiff - src/input/var.c
streams are always attached to access - no need for vlc_object_find
[vlc] / src / input / var.c
index fa8e04c46ad49661910fa514b2fc484e5ef72fd0..b2601073a8f2a47e0779bf653bcbff202f515ec8 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -161,6 +165,9 @@ void input_ControlVarInit ( input_thread_t *p_input )
     var_Change( p_input, "spu-delay", VLC_VAR_SETVALUE, &val, NULL );
     ADD_CALLBACK( "spu-delay", EsDelayCallback );
 
+    p_input->p->pts_adjust.auto_adjust = var_CreateGetBool(
+            p_input, "auto-adjust-pts-delay" );
+
     /* Video ES */
     var_Create( p_input, "video-es", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
     text.psz_string = _("Video Track");
@@ -190,9 +197,14 @@ void input_ControlVarInit ( input_thread_t *p_input )
     {
         /* Special "intf-change" variable, it allows intf to set up a callback
          * to be notified of some changes.
+         *
+         * Add rate-change to inform about rate changin
+         *
          * TODO list all changes warn by this callbacks */
         var_Create( p_input, "intf-change", VLC_VAR_BOOL );
-        var_SetBool( p_input, "intf-change", VLC_TRUE );
+        var_SetBool( p_input, "intf-change", true );
+        var_Create( p_input, "rate-change", VLC_VAR_BOOL );
+        var_SetBool( p_input, "rate-change", true );
     }
 #undef ADD_CALLBACK
 }
@@ -319,7 +331,7 @@ void input_ControlVarNavigation( input_thread_t *p_input )
 
             var_Change( p_input, val.psz_string, VLC_VAR_ADDCHOICE,
                         &val2, &text2 );
-            if( text2.psz_string ) free( text2.psz_string );
+            free( text2.psz_string );
         }
 
     }
@@ -377,7 +389,7 @@ void input_ControlVarTitle( input_thread_t *p_input, int i_title )
         }
 
         var_Change( p_input, "chapter", VLC_VAR_ADDCHOICE, &val, &text );
-        if( text.psz_string ) free( text.psz_string );
+        free( text.psz_string );
     }
 }
 
@@ -446,8 +458,11 @@ void input_ConfigVarInit ( input_thread_t *p_input )
     }
 
     var_Create( p_input, "seekable", VLC_VAR_BOOL );
-    val.b_bool = VLC_TRUE; /* Fixed later*/
+    val.b_bool = true; /* Fixed later*/
     var_Change( p_input, "seekable", VLC_VAR_SETVALUE, &val, NULL );
+    var_Create( p_input, "can-pause", VLC_VAR_BOOL );
+    val.b_bool = true; /* Fixed later*/
+    var_Change( p_input, "can-pause", VLC_VAR_SETVALUE, &val, NULL );
 
     /* */
     var_Create( p_input, "access-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT );