Commit 6a4e86ff authored by Laurent Aimar's avatar Laurent Aimar

Use "can-rate" and "state" input variable when applicable.

 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.
parent 1cbc9675
......@@ -932,7 +932,7 @@
{
if( p_input != NULL )
{
bEnabled = p_input->b_can_pace_control;
bEnabled = var_GetBool( p_input, "can-rate" );
}
else
{
......
......@@ -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;
......
......@@ -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" );
}
......
......@@ -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 )
......
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment