[vlc-devel] commit: skins2: use input_GetVout when possible. ( Rémi Duraffort )

git version control git at videolan.org
Fri Jan 23 16:55:12 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jan 23 16:54:17 2009 +0100| [3396d9f390cac568f01b42c5dbdb58b3593b032b] | committer: Rémi Duraffort 

skins2: use input_GetVout when possible.

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

 modules/gui/skins2/commands/cmd_fullscreen.cpp |    8 ++------
 modules/gui/skins2/commands/cmd_snapshot.cpp   |    9 ++-------
 modules/gui/skins2/src/vlcproc.cpp             |    5 ++---
 3 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/modules/gui/skins2/commands/cmd_fullscreen.cpp b/modules/gui/skins2/commands/cmd_fullscreen.cpp
index 04f14a9..74a920d 100644
--- a/modules/gui/skins2/commands/cmd_fullscreen.cpp
+++ b/modules/gui/skins2/commands/cmd_fullscreen.cpp
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * cmd_fullscreen.cpp
  *****************************************************************************
- * Copyright (C) 2003 the VideoLAN team
+ * Copyright (C) 2003-2009 the VideoLAN team
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax at via.ecp.fr>
@@ -29,15 +29,11 @@
 
 void CmdFullscreen::execute()
 {
-    vout_thread_t *pVout;
 
     if( getIntf()->p_sys->p_input == NULL )
-    {
         return;
-    }
 
-    pVout = (vout_thread_t *)vlc_object_find( getIntf()->p_sys->p_input,
-                                              VLC_OBJECT_VOUT, FIND_ANYWHERE );
+    vout_thread_t *pVout = input_GetVout( getIntf()->p_sys->p_input );
     if( pVout )
     {
         // Switch to fullscreen
diff --git a/modules/gui/skins2/commands/cmd_snapshot.cpp b/modules/gui/skins2/commands/cmd_snapshot.cpp
index 23e5a37..80d12ca 100644
--- a/modules/gui/skins2/commands/cmd_snapshot.cpp
+++ b/modules/gui/skins2/commands/cmd_snapshot.cpp
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * cmd_snapshot.cpp
  *****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006-2009 the VideoLAN team
  * $Id$
  *
  * Authors: Olivier Teulière <ipkiss at via.ecp.fr>
@@ -27,15 +27,10 @@
 
 void CmdSnapshot::execute()
 {
-    vout_thread_t *pVout;
-
     if( getIntf()->p_sys->p_input == NULL )
-    {
         return;
-    }
 
-    pVout = (vout_thread_t *)vlc_object_find( getIntf()->p_sys->p_input,
-                                              VLC_OBJECT_VOUT, FIND_CHILD );
+    vout_thread_t *pVout = input_GetVout( getIntf()->p_sys->p_input );
     if( pVout )
     {
         // Take a snapshot
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index 451e7be..8d6baab 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * vlcproc.cpp
  *****************************************************************************
- * Copyright (C) 2003 the VideoLAN team
+ * Copyright (C) 2003-2009 the VideoLAN team
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax at via.ecp.fr>
@@ -369,8 +369,7 @@ void VlcProc::refreshInput()
         pVarHasAudio->set( audio_es.i_int > 0 );
 
         // Refresh fullscreen status
-        vout_thread_t *pVout = (vout_thread_t *)vlc_object_find( pInput,
-                                     VLC_OBJECT_VOUT, FIND_CHILD );
+        vout_thread_t *pVout = input_GetVout( pInput );
         pVarHasVout->set( pVout != NULL );
         if( pVout )
         {




More information about the vlc-devel mailing list