]> git.sesse.net Git - vlc/commitdiff
Use "can-rate" and "state" input variable when applicable.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 16 Jan 2009 20:19:27 +0000 (21:19 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 17 Jan 2009 11:35:48 +0000 (12:35 +0100)
 It seems that both gui/pda/pda.c and gui/macosx/intf.m fetch "can-rate" value
but does not use it, could maintainers check it ...

 The inhibit and screensaver modules are using bad object_find. Proper
playlist event handling would be cleaner.

modules/gui/macosx/controls.m
modules/gui/macosx/intf.m
modules/gui/pda/pda.c
modules/misc/inhibit.c
modules/misc/screensaver.c

index dfe7bc7546f4478efc9de390b294a862e0c74dd0..0d50a5bb81df6279a83dd5fefbe2739d6a43cf8b 100644 (file)
     {
         if( p_input != NULL )
         {
-            bEnabled = p_input->b_can_pace_control;
+            bEnabled = var_GetBool( p_input, "can-rate" );
         }
         else
         {
index 4d2691a41de683f2daa40ac167c2fd33fe32a206..f0191e3b844c9efd6fe44cc91ff53a19ddcf360a 100644 (file)
@@ -1525,7 +1525,7 @@ static void * manage_cleanup( void * args )
             b_seekable = var_GetBool( p_input, "can-seek" );
 
             /* check whether slow/fast motion is possible */
-            b_control = p_input->b_can_pace_control;
+            b_control = var_GetBool( p_input, "can-rate" );
 
             /* chapters & titles */
             //b_chapters = p_input->stream.i_area_nb > 1;
index e26f802ac5bb69f608d0348d0a49e95ff3893c9c..109cb18c88dd1fe1c5201342870fbf795ccf75eb 100644 (file)
@@ -596,7 +596,7 @@ gint GtkModeManage( intf_thread_t * p_intf )
         }
 
         /* control buttons for free pace streams */
-        b_control = p_intf->p_sys->p_input->b_can_pace_control;
+        b_control = var_GetBool( p_intf->p_sys->p_input, "can-rate" );
 
         msg_Dbg( p_intf, "stream has changed, refreshing interface" );
     }
index 2fe1dd602cfa837f2d75a311bd9ac2aa0ed9d741..e9aeba27619508bc8ecfdaaa3127a3dcffde50ee 100644 (file)
@@ -229,7 +229,7 @@ static void Run( intf_thread_t *p_intf )
         p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
         if( p_input )
         {
-            int i_state = p_input->i_state;
+            const int i_state = var_GetInteger( p_input, "state" );
             vlc_object_release( p_input );
 
             if( PLAYING_S == i_state && !p_intf->p_sys->i_cookie )
index 62525b9f17e64676aa080e208fbc3a66af73385a..f7b56ea29e4c23a1116a51c33ece08c8035a479f 100644 (file)
@@ -185,7 +185,7 @@ static void Run( intf_thread_t *p_intf )
             vlc_object_release( p_vout );
             if( p_input )
             {
-                if( PLAYING_S == p_input->i_state )
+                if( PLAYING_S == var_GetInteger( p_input, "state" ) )
                 {
                     /* http://www.jwz.org/xscreensaver/faq.html#dvd */
                     const char *const ppsz_xsargs[] = { "/bin/sh", "-c",