[vlc-devel] commit: Do not access vout_thread_t fields when it can be avoided. ( Derk-Jan Hartman )

git version control git at videolan.org
Tue Jun 2 19:39:41 CEST 2009


vlc | branch: 1.0-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Tue Jun  2 15:05:14 2009 +0200| [9e1f1018775c7207964fb9a87d1fc97c3f294aa8] | committer: Derk-Jan Hartman 

Do not access vout_thread_t fields when it can be avoided.

Partial backport of [cc4f67fe86359bae2db6fc631f0ef96e0c63c1d1]

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9e1f1018775c7207964fb9a87d1fc97c3f294aa8
---

 modules/control/hotkeys.c                      |    4 ++--
 modules/control/http/macro.c                   |    2 +-
 modules/gui/skins2/commands/cmd_fullscreen.cpp |    2 +-
 modules/gui/skins2/src/vlcproc.cpp             |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 706db0c..188cabc 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -1074,7 +1074,7 @@ static void DisplayPosition( intf_thread_t *p_intf, vout_thread_t *p_vout,
         vout_OSDMessage( p_input, POSITION_TEXT_CHAN, "%s", psz_time );
     }
 
-    if( p_vout->b_fullscreen )
+    if( var_GetBool( p_vout, "fullscreen" ) )
     {
         var_Get( p_input, "position", &pos );
         vout_OSDSlider( VLC_OBJECT( p_input ), POSITION_WIDGET_CHAN,
@@ -1091,7 +1091,7 @@ static void DisplayVolume( intf_thread_t *p_intf, vout_thread_t *p_vout,
     }
     ClearChannels( p_intf, p_vout );
 
-    if( p_vout->b_fullscreen )
+    if( var_GetBool( p_vout, "fullscreen" ) )
     {
         vout_OSDSlider( VLC_OBJECT( p_vout ), VOLUME_WIDGET_CHAN,
             i_vol*100/AOUT_VOLUME_MAX, OSD_VERT_SLIDER );
diff --git a/modules/control/http/macro.c b/modules/control/http/macro.c
index 38a6cc1..22e3231 100644
--- a/modules/control/http/macro.c
+++ b/modules/control/http/macro.c
@@ -235,7 +235,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
                         p_vout = input_GetVout( p_sys->p_input );
                         if( p_vout )
                         {
-                            p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
+                            var_SetBool( p_vout, "fullscreen", !var_GetBool( p_vout, "fullscreen" ) );
                             vlc_object_release( p_vout );
                             msg_Dbg( p_intf, "requested fullscreen toggle" );
                         }
diff --git a/modules/gui/skins2/commands/cmd_fullscreen.cpp b/modules/gui/skins2/commands/cmd_fullscreen.cpp
index 74a920d..b3bae4f 100644
--- a/modules/gui/skins2/commands/cmd_fullscreen.cpp
+++ b/modules/gui/skins2/commands/cmd_fullscreen.cpp
@@ -37,7 +37,7 @@ void CmdFullscreen::execute()
     if( pVout )
     {
         // Switch to fullscreen
-        pVout->i_changes |= VOUT_FULLSCREEN_CHANGE;
+        var_SetBool( pVout, "fullscreen", !var_GetBool( pVout, "fullscreen" ) );
         vlc_object_release( pVout );
     }
 }
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index 4c89015..8115afa 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -344,7 +344,7 @@ void VlcProc::refreshInput()
         pVarHasVout->set( pVout != NULL );
         if( pVout )
         {
-            pVarFullscreen->set( pVout->b_fullscreen );
+            pVarFullscreen->set( var_GetBool( pVout, "fullscreen" ) );
             vlc_object_release( pVout );
         }
 




More information about the vlc-devel mailing list