[vlc-devel] commit: Qt: remove calls to vlc_object_find(VLC_OBJECT_VOUT, FIND_CHILD) in extended panel. (Jean-Baptiste Kempf )

git version control git at videolan.org
Mon Jan 19 13:35:59 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jan 19 13:31:17 2009 +0100| [c7a5e17e2ce566797a548913a724474f8083924b] | committer: Jean-Baptiste Kempf 

Qt: remove calls to vlc_object_find(VLC_OBJECT_VOUT, FIND_CHILD) in extended panel.

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

 modules/gui/qt4/components/extended_panels.cpp |   24 +++++++-----------------
 1 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 93a73bd..07e6d07 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -224,17 +224,13 @@ ExtVideo::~ExtVideo()
 
 void ExtVideo::cropChange()
 {
-    if( THEMIM->getInput() )
+    p_vout = THEMIM->getVout();
+    if( p_vout )
     {
-        p_vout = ( vout_thread_t * )vlc_object_find( THEMIM->getInput(),
-                VLC_OBJECT_VOUT, FIND_CHILD );
-        if( p_vout )
-        {
-            var_SetInteger( p_vout, "crop-top", ui.cropTopPx->value() );
-            var_SetInteger( p_vout, "crop-bottom", ui.cropBotPx->value() );
-            var_SetInteger( p_vout, "crop-left", ui.cropLeftPx->value() );
-            var_SetInteger( p_vout, "crop-right", ui.cropRightPx->value() );
-        }
+        var_SetInteger( p_vout, "crop-top", ui.cropTopPx->value() );
+        var_SetInteger( p_vout, "crop-bottom", ui.cropBotPx->value() );
+        var_SetInteger( p_vout, "crop-left", ui.cropLeftPx->value() );
+        var_SetInteger( p_vout, "crop-right", ui.cropRightPx->value() );
         vlc_object_release( p_vout );
     }
 }
@@ -340,13 +336,7 @@ void ExtVideo::ChangeVFiltersString( const char *psz_name, bool b_add )
         ui.subpictureFilterText->setText( psz_string );
 
     /* Try to set on the fly */
-    if( THEMIM->getInput() )
-        p_vout = ( vout_thread_t * )vlc_object_find( THEMIM->getInput(),
-                VLC_OBJECT_VOUT, FIND_CHILD );
-    /* If you have stopped the video, p_vout is still at its old value */
-    else
-        p_vout = NULL;
-
+    p_vout = THEMIM->getVout();
     if( p_vout )
     {
         if( !strcmp( psz_filter_type, "sub-filter" ) )




More information about the vlc-devel mailing list