]> git.sesse.net Git - vlc/blobdiff - src/input/var.c
access2_New code factorizaton
[vlc] / src / input / var.c
index 96c9d72f93aa3b962d5130b450185e88414bf7dd..d807b26bf9d2f87515e63dc626f9e655e5aa6d39 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include <vlc/vlc.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -190,12 +194,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 );
-
-       /* item-change variable */
-        var_Create( p_input, "item-change", VLC_VAR_INTEGER );
+        var_Create( p_input, "rate-change", VLC_VAR_BOOL );
+        var_SetBool( p_input, "rate-change", VLC_TRUE );
     }
 #undef ADD_CALLBACK
 }
@@ -448,13 +454,12 @@ void input_ConfigVarInit ( input_thread_t *p_input )
                     VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
     }
 
-    var_Create( p_input, "demuxed-id3", VLC_VAR_BOOL ); /* FIXME beurk */
-    val.b_bool = VLC_FALSE;
-    var_Change( p_input, "demuxed-id3", VLC_VAR_SETVALUE, &val, NULL );
-
     var_Create( p_input, "seekable", VLC_VAR_BOOL );
     val.b_bool = VLC_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 = VLC_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 );
@@ -480,7 +485,7 @@ static int StateCallback( vlc_object_t *p_this, char const *psz_cmd,
                           void *p_data )
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
-    (void)psz_cmd; (void)oldval; (void)p_data;
+    VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     if( newval.i_int == PLAYING_S || newval.i_int == PAUSE_S )
     {
@@ -495,7 +500,7 @@ static int RateCallback( vlc_object_t *p_this, char const *psz_cmd,
                          vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
-    (void)oldval; (void)p_data;
+    VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     /* Problem with this way: the "rate" variable is update after the input thread do the change */
     if( !strcmp( psz_cmd, "rate-slower" ) )
@@ -520,7 +525,7 @@ static int PositionCallback( vlc_object_t *p_this, char const *psz_cmd,
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
     vlc_value_t val, length;
-    (void)oldval; (void)p_data;
+    VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     if( !strcmp( psz_cmd, "position-offset" ) )
     {
@@ -553,7 +558,7 @@ static int TimeCallback( vlc_object_t *p_this, char const *psz_cmd,
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
     vlc_value_t val, length;
-    (void)oldval; (void)p_data;
+    VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     if( !strcmp( psz_cmd, "time-offset" ) )
     {
@@ -585,7 +590,7 @@ static int ProgramCallback( vlc_object_t *p_this, char const *psz_cmd,
                             void *p_data )
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
-    (void)psz_cmd; (void)oldval; (void)p_data;
+    VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     input_ControlPush( p_input, INPUT_CONTROL_SET_PROGRAM, &newval );
 
@@ -598,7 +603,7 @@ static int TitleCallback( vlc_object_t *p_this, char const *psz_cmd,
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
     vlc_value_t val, count;
-    (void)oldval; (void)p_data;
+    VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     if( !strcmp( psz_cmd, "next-title" ) )
     {
@@ -631,7 +636,7 @@ static int SeekpointCallback( vlc_object_t *p_this, char const *psz_cmd,
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
     vlc_value_t val, count;
-    (void)oldval; (void)p_data;
+    VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     if( !strcmp( psz_cmd, "next-chapter" ) )
     {
@@ -664,7 +669,7 @@ static int NavigationCallback( vlc_object_t *p_this, char const *psz_cmd,
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
     vlc_value_t     val;
-    (void)psz_cmd; (void)oldval;
+    VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
 
     /* Issue a title change */
     val.i_int = (intptr_t)p_data;
@@ -684,7 +689,7 @@ static int ESCallback( vlc_object_t *p_this, char const *psz_cmd,
                        vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
-    (void)oldval; (void)p_data;
+    VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     if( newval.i_int < 0 )
     {
@@ -713,7 +718,7 @@ static int EsDelayCallback ( vlc_object_t *p_this, char const *psz_cmd,
                              vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
-    (void)oldval; (void)p_data;
+    VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     if( !strcmp( psz_cmd, "audio-delay" ) )
     {
@@ -734,7 +739,7 @@ static int BookmarkCallback( vlc_object_t *p_this, char const *psz_cmd,
                              void *p_data )
 {
     input_thread_t *p_input = (input_thread_t*)p_this;
-    (void)psz_cmd; (void)oldval; (void)p_data;
+    VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
 
     input_ControlPush( p_input, INPUT_CONTROL_SET_BOOKMARK, &newval );