]> git.sesse.net Git - vlc/commitdiff
Use var_TriggerCallback instead of var_SetVoid (the result is exactly the same
authorRémi Duraffort <ivoire@videolan.org>
Fri, 24 Jul 2009 13:10:06 +0000 (15:10 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 24 Jul 2009 13:24:20 +0000 (15:24 +0200)
but a bit faster).

12 files changed:
modules/access/v4l2.c
modules/control/gestures.c
modules/control/hotkeys.c
modules/control/rc.c
modules/gui/beos/InterfaceWindow.cpp
modules/gui/ncurses.c
modules/gui/pda/pda_callbacks.c
modules/gui/qt4/actions_manager.cpp
modules/gui/qt4/components/extended_panels.cpp
modules/gui/qt4/input_manager.cpp
modules/gui/skins2/commands/cmd_dvd.cpp
src/video_output/vout_intf.c

index 08823edca1b79711112a131c330bec4f4ec9ff16..b9b44d54d8f3697e3eb09fe8349e600d7982c62a 100644 (file)
@@ -3055,12 +3055,12 @@ static int Control( vlc_object_t *p_obj, demux_sys_t *p_sys, int i_fd,
             case VLC_VAR_BOOL:
                 val.b_bool = control.value;
                 var_Change( p_obj, psz_name, VLC_VAR_SETVALUE, &val, NULL );
-                var_SetVoid( p_obj, "controls-update" );
+                var_TriggerCallback( p_obj, "controls-update" );
                 break;
             case VLC_VAR_INTEGER:
                 val.i_int = control.value;
                 var_Change( p_obj, psz_name, VLC_VAR_SETVALUE, &val, NULL );
-                var_SetVoid( p_obj, "controls-update" );
+                var_TriggerCallback( p_obj, "controls-update" );
                 break;
         }
     }
index 75548a9a3f725392c68305f2fc9dcf095ece5545..c4ab6c7201104f0b0b896b099783ce3e97001d42 100644 (file)
@@ -236,7 +236,7 @@ static void RunIntf( intf_thread_t *p_intf )
                 p_input = playlist_CurrentInput( p_playlist );
                 if( p_input )
                 {
-                    var_SetVoid( p_input, "rate-slower" );
+                    var_TriggerCallback( p_input, "rate-slower" );
                     vlc_object_release( p_input );
                 }
                 break;
@@ -246,7 +246,7 @@ static void RunIntf( intf_thread_t *p_intf )
                 p_input = playlist_CurrentInput( p_playlist );
                 if( p_input )
                 {
-                    var_SetVoid( p_input, "rate-faster" );
+                    var_TriggerCallback( p_input, "rate-faster" );
                     vlc_object_release( p_input );
                 }
                 break;
index dbf440aa3e7d34f1d000e27b5719049e99be0d60..8d98461a910ff67272f3e38aa25e290fd57af0b8 100644 (file)
@@ -689,19 +689,19 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
             }
             else if( i_action == ACTIONID_FRAME_NEXT )
             {
-                var_SetVoid( p_input, "frame-next" );
+                var_TriggerCallback( p_input, "frame-next" );
                 vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
                                  "%s", _("Next frame") );
             }
             else if( i_action == ACTIONID_FASTER )
             {
-                var_SetVoid( p_input, "rate-faster" );
+                var_TriggerCallback( p_input, "rate-faster" );
                 vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
                                  "%s", _("Faster") );
             }
             else if( i_action == ACTIONID_SLOWER )
             {
-                var_SetVoid( p_input, "rate-slower" );
+                var_TriggerCallback( p_input, "rate-slower" );
                 vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
                                  "%s", _("Slower") );
             }
@@ -754,13 +754,13 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
             }
             /* Only makes sense with DVD */
             else if( i_action == ACTIONID_TITLE_PREV )
-                var_SetVoid( p_input, "prev-title" );
+                var_TriggerCallback( p_input, "prev-title" );
             else if( i_action == ACTIONID_TITLE_NEXT )
-                var_SetVoid( p_input, "next-title" );
+                var_TriggerCallback( p_input, "next-title" );
             else if( i_action == ACTIONID_CHAPTER_PREV )
-                var_SetVoid( p_input, "prev-chapter" );
+                var_TriggerCallback( p_input, "prev-chapter" );
             else if( i_action == ACTIONID_CHAPTER_NEXT )
-                var_SetVoid( p_input, "next-chapter" );
+                var_TriggerCallback( p_input, "next-chapter" );
             else if( i_action == ACTIONID_DISC_MENU )
                 var_SetInteger( p_input, "title  0", 2 );
 
index 1aadf3eefc28fd178d2ce496c9b874435b5ca1ed..e1edcaf6aa276e3d1b34dac5880b597f92db0af9 100644 (file)
@@ -1086,12 +1086,12 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
     }
     else if ( !strcmp( psz_cmd, "faster" ) )
     {
-        var_SetVoid( p_input, "rate-faster" );
+        var_TriggerCallback( p_input, "rate-faster" );
         i_error = VLC_SUCCESS;
     }
     else if ( !strcmp( psz_cmd, "slower" ) )
     {
-        var_SetVoid( p_input, "rate-slower" );
+        var_TriggerCallback( p_input, "rate-slower" );
         i_error = VLC_SUCCESS;
     }
     else if ( !strcmp( psz_cmd, "normal" ) )
@@ -1120,9 +1120,9 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
             }
         }
         else if( !strcmp( psz_cmd, "chapter_n" ) )
-            var_SetVoid( p_input, "next-chapter" );
+            var_TriggerCallback( p_input, "next-chapter" );
         else if( !strcmp( psz_cmd, "chapter_p" ) )
-            var_SetVoid( p_input, "prev-chapter" );
+            var_TriggerCallback( p_input, "prev-chapter" );
         i_error = VLC_SUCCESS;
     }
     else if( !strcmp( psz_cmd, "title" ) ||
@@ -1144,9 +1144,9 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
             }
         }
         else if( !strcmp( psz_cmd, "title_n" ) )
-            var_SetVoid( p_input, "next-title" );
+            var_TriggerCallback( p_input, "next-title" );
         else if( !strcmp( psz_cmd, "title_p" ) )
-            var_SetVoid( p_input, "prev-title" );
+            var_TriggerCallback( p_input, "prev-title" );
 
         i_error = VLC_SUCCESS;
     }
index 59b688cf2d798e14a58da30b2487d6ac51ae2ad2..45d0bd970bf70e4a3b26808f2e7d1e204bfc9811 100644 (file)
@@ -565,14 +565,14 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
         case PREV_TITLE:
             if( p_input )
             {
-                var_SetVoid( p_input, "prev-title" );
+                var_TriggerCallback( p_input, "prev-title" );
             }
             break;
 
         case NEXT_TITLE:
             if( p_input )
             {
-                var_SetVoid( p_input, "next-title" );
+                var_TriggerCallback( p_input, "next-title" );
             }
             break;
 
@@ -590,14 +590,14 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
         case PREV_CHAPTER:
             if( p_input )
             {
-                var_SetVoid( p_input, "prev-chapter" );
+                var_TriggerCallback( p_input, "prev-chapter" );
             }
             break;
 
         case NEXT_CHAPTER:
             if( p_input )
             {
-                var_SetVoid( p_input, "next-chapter" );
+                var_TriggerCallback( p_input, "next-chapter" );
             }
             break;
 
@@ -636,7 +636,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                 {
                     if( val.i_int > 1 )
                     {
-                        var_SetVoid( p_input, "prev-chapter" );
+                        var_TriggerCallback( p_input, "prev-chapter" );
                         break;
                     }
                 }
@@ -646,7 +646,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                 {
                     if( val.i_int > 1 )
                     {
-                        var_SetVoid( p_input, "prev-title" );
+                        var_TriggerCallback( p_input, "prev-title" );
                         break;
                     }
                 }
@@ -668,7 +668,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                     int i_chapter_count = var_CountChoices( p_input, "chapter" );
                     if( i_chapter_count > val.i_int )
                     {
-                        var_SetVoid( p_input, "next-chapter" );
+                        var_TriggerCallback( p_input, "next-chapter" );
                         break;
                     }
                 }
@@ -679,7 +679,7 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
                     int i_title_count = var_CountChoices( p_input, "title" );
                     if( i_title_count > val.i_int )
                     {
-                        var_SetVoid( p_input, "next-title" );
+                        var_TriggerCallback( p_input, "next-title" );
                         break;
                     }
                 }
index 3a23b6ae13679ad66855d52c8b47d7f65787f61b..137a461e37fb04203f7db74debafc2ab0a584060 100644 (file)
@@ -1167,22 +1167,22 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
 
         case '[':
             if( p_sys->p_input )
-                var_SetVoid( p_sys->p_input, "prev-title" );
+                var_TriggerCallback( p_sys->p_input, "prev-title" );
             break;
 
         case ']':
             if( p_sys->p_input )
-                var_SetVoid( p_sys->p_input, "next-title" );
+                var_TriggerCallback( p_sys->p_input, "next-title" );
             break;
 
         case '<':
             if( p_sys->p_input )
-                var_SetVoid( p_sys->p_input, "prev-chapter" );
+                var_TriggerCallback( p_sys->p_input, "prev-chapter" );
             break;
 
         case '>':
             if( p_sys->p_input )
-                var_SetVoid( p_sys->p_input, "next-chapter" );
+                var_TriggerCallback( p_sys->p_input, "next-chapter" );
             break;
 
         case 'p':
index 9e4100ac28bb78cd9d1695b2362ecb548ef6b6e5..9f31246660d11043b01372bf3f5bcc9047fddd85 100644 (file)
@@ -358,7 +358,7 @@ void onRewind(GtkButton *button, gpointer user_data)
 
     if (p_intf->p_sys->p_input != NULL)
     {
-        var_SetVoid( p_intf->p_sys->p_input, "rate-slower" );
+        var_TriggerCallback( p_intf->p_sys->p_input, "rate-slower" );
     }
 }
 
@@ -413,7 +413,7 @@ void onForward(GtkButton *button, gpointer user_data)
 
     if (p_intf->p_sys->p_input != NULL)
     {
-        var_SetVoid( p_intf->p_sys->p_input, "rate-faster" );
+        var_TriggerCallback( p_intf->p_sys->p_input, "rate-faster" );
     }
 }
 
index 77413aeabf9cd4936637232e5252d4af643d14b1..2dc3209ce0e077cb4f9342391ffbd03426e96df0 100644 (file)
@@ -165,7 +165,7 @@ void ActionsManager::frame()
 {
     input_thread_t *p_input = THEMIM->getInput();
     if( p_input )
-        var_SetVoid( p_input, "frame-next" );
+        var_TriggerCallback( p_input, "frame-next" );
 }
 
 void ActionsManager::toggleMuteAudio()
index 1630ed78d24ff855d743b7b3ca9ebf0dba4aa059..69927573f89fdbc077b7d4c19ea1d9b92224aa47 100644 (file)
@@ -803,7 +803,7 @@ void ExtV4l2::ValueChange( int value )
                 var_SetBool( p_obj, psz_var, value );
                 break;
             case VLC_VAR_VOID:
-                var_SetVoid( p_obj, psz_var );
+                var_TriggerCallback( p_obj, psz_var );
                 break;
         }
         free( psz_var );
index c3d65d52bf0e55d98e80afb5d75fa7fe0922ca08..867c07d13b8b68497d4b4715914a1213f8b2c912 100644 (file)
@@ -672,8 +672,8 @@ void InputManager::sectionPrev()
     if( hasInput() )
     {
         int i_type = var_Type( p_input, "next-chapter" );
-        var_SetVoid( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
-                            "prev-chapter":"prev-title" );
+        var_TriggerCallback( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
+                             "prev-chapter":"prev-title" );
     }
 }
 
@@ -682,8 +682,8 @@ void InputManager::sectionNext()
     if( hasInput() )
     {
         int i_type = var_Type( p_input, "next-chapter" );
-        var_SetVoid( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
-                            "next-chapter":"next-title" );
+        var_TriggerCallback( p_input, (i_type & VLC_VAR_TYPE) != 0 ?
+                             "next-chapter":"next-title" );
     }
 }
 
@@ -787,13 +787,13 @@ void InputManager::reverse()
 void InputManager::slower()
 {
     if( hasInput() )
-        var_SetVoid( p_input, "rate-slower" );
+        var_TriggerCallback( p_input, "rate-slower" );
 }
 
 void InputManager::faster()
 {
     if( hasInput() )
-        var_SetVoid( p_input, "rate-faster" );
+        var_TriggerCallback( p_input, "rate-faster" );
 }
 
 void InputManager::littlefaster()
index 232f7e5d2521ee5ba2af0913d460f67b2c737240..b96f4b7cbe03ae3e640afdc57a41e6a6ebacb144 100644 (file)
@@ -31,7 +31,7 @@ void CmdDvdNextTitle::execute()
                                            FIND_ANYWHERE );
     if( p_input )
     {
-        var_SetVoid( p_input, "next-title" );
+        var_TriggerCallback( p_input, "next-title" );
         vlc_object_release( p_input );
     }
 }
@@ -44,7 +44,7 @@ void CmdDvdPreviousTitle::execute()
                                            FIND_ANYWHERE );
     if( p_input )
     {
-        var_SetVoid( p_input, "prev-title" );
+        var_TriggerCallback( p_input, "prev-title" );
         vlc_object_release( p_input );
     }
 }
@@ -57,7 +57,7 @@ void CmdDvdNextChapter::execute()
                                            FIND_ANYWHERE );
     if( p_input )
     {
-        var_SetVoid( p_input, "next-chapter" );
+        var_TriggerCallback( p_input, "next-chapter" );
         vlc_object_release( p_input );
     }
 }
@@ -70,7 +70,7 @@ void CmdDvdPreviousChapter::execute()
                                            FIND_ANYWHERE );
     if( p_input )
     {
-        var_SetVoid( p_input, "prev-chapter" );
+        var_TriggerCallback( p_input, "prev-chapter" );
         vlc_object_release( p_input );
     }
 }
index 4610a6a66e69e0c396ad856719aaa77414270ee2..cc4319e7d4bcdbec0cd2177720c39ee0e634db65 100644 (file)
@@ -1144,7 +1144,7 @@ static int CropCallback( vlc_object_t *p_this, char const *psz_cmd,
              p_vout->fmt_in.i_visible_width,
              p_vout->fmt_in.i_visible_height );
 
-    var_SetVoid( p_vout, "crop-update" );
+    var_TriggerCallback( p_vout, "crop-update" );
 
     return VLC_SUCCESS;
 }