[vlc-devel] commit: Use "can-rate" and "state" input variable when applicable. ( Laurent Aimar )
git version control
git at videolan.org
Sat Jan 17 12:44:07 CET 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Jan 16 21:19:27 2009 +0100| [6a4e86fffa63e2ae62914acc876e2282d5722d2e] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a4e86fffa63e2ae62914acc876e2282d5722d2e
---
modules/gui/macosx/controls.m | 2 +-
modules/gui/macosx/intf.m | 2 +-
modules/gui/pda/pda.c | 2 +-
modules/misc/inhibit.c | 2 +-
modules/misc/screensaver.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index dfe7bc7..0d50a5b 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -932,7 +932,7 @@
{
if( p_input != NULL )
{
- bEnabled = p_input->b_can_pace_control;
+ bEnabled = var_GetBool( p_input, "can-rate" );
}
else
{
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 4d2691a..f0191e3 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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;
diff --git a/modules/gui/pda/pda.c b/modules/gui/pda/pda.c
index e26f802..109cb18 100644
--- a/modules/gui/pda/pda.c
+++ b/modules/gui/pda/pda.c
@@ -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" );
}
diff --git a/modules/misc/inhibit.c b/modules/misc/inhibit.c
index 2fe1dd6..e9aeba2 100644
--- a/modules/misc/inhibit.c
+++ b/modules/misc/inhibit.c
@@ -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 )
diff --git a/modules/misc/screensaver.c b/modules/misc/screensaver.c
index 62525b9..f7b56ea 100644
--- a/modules/misc/screensaver.c
+++ b/modules/misc/screensaver.c
@@ -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",
More information about the vlc-devel
mailing list