[vlc-devel] commit: Remove invalid VOUT_REPARENT uses ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Mar 4 18:38:45 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar  4 19:31:29 2009 +0200| [2b50f07bea0f617a949fd9e57428b533d743395c] | committer: Rémi Denis-Courmont 

Remove invalid VOUT_REPARENT uses

as discussed^Wmonologued on the mailing list.

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

 modules/gui/maemo/maemo.c          |   10 +---------
 modules/gui/skins2/src/vlcproc.cpp |   13 +++----------
 src/control/media_player.c         |    7 -------
 src/control/video.c                |   13 ++++---------
 4 files changed, 8 insertions(+), 35 deletions(-)

diff --git a/modules/gui/maemo/maemo.c b/modules/gui/maemo/maemo.c
index 96e6080..4d2234c 100644
--- a/modules/gui/maemo/maemo.c
+++ b/modules/gui/maemo/maemo.c
@@ -249,15 +249,7 @@ static void Run( intf_thread_t *p_intf )
     var_DelCallback( p_intf->p_sys->p_playlist, "activity",
                      activity_cb, p_intf );
 
-    // Asking the vout to close
-    vout_thread_t *p_vout = p_intf->p_sys->p_vout;
-
-    if( p_vout )
-    {
-        vout_Control( p_vout, VOUT_REPARENT, 0 );
-        vlc_object_release( p_vout );
-    }
-
+    assert( !p_intf->p_sys->p_vout ); /* too late */
     gtk_object_destroy( GTK_OBJECT( window ) );
 }
 
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index a124845..2d8abea 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -196,15 +196,12 @@ VlcProc::~VlcProc()
     var_DelCallback( getIntf(), "skin-to-load", onSkinToLoad, this );
 }
 
+#include <assert.h>
 
 void VlcProc::registerVoutWindow( void *pVoutWindow )
 {
     m_handleSet.insert( pVoutWindow );
-    // Reparent the vout window
-    if( m_pVout )
-    {
-        vout_Control( m_pVout, VOUT_REPARENT, 0 );
-    }
+    assert( !m_pVout );
 }
 
 
@@ -216,11 +213,7 @@ void VlcProc::unregisterVoutWindow( void *pVoutWindow )
 
 void VlcProc::dropVout()
 {
-    if( m_pVout )
-    {
-        vout_Control( m_pVout, VOUT_REPARENT, 0 );
-        m_pVout = NULL;
-    }
+    assert( !m_pVout );
 }
 
 
diff --git a/src/control/media_player.c b/src/control/media_player.c
index 66fe1f3..3e9c15e 100644
--- a/src/control/media_player.c
+++ b/src/control/media_player.c
@@ -764,7 +764,6 @@ void libvlc_media_player_set_drawable( libvlc_media_player_t *p_mi,
                                        libvlc_exception_t *p_e )
 {
     input_thread_t *p_input_thread;
-    vout_thread_t *p_vout = NULL;
 
     p_mi->drawable.xid = drawable;
 
@@ -779,12 +778,6 @@ void libvlc_media_player_set_drawable( libvlc_media_player_t *p_mi,
         return;
     }
 
-    p_vout = vlc_object_find( p_input_thread, VLC_OBJECT_VOUT, FIND_CHILD );
-    if( p_vout )
-    {
-        vout_Control( p_vout , VOUT_REPARENT, drawable);
-        vlc_object_release( p_vout );
-    }
     vlc_object_release( p_input_thread );
 }
 
diff --git a/src/control/video.c b/src/control/video.c
index ba1ae88..68e19d6 100644
--- a/src/control/video.c
+++ b/src/control/video.c
@@ -5,7 +5,7 @@
  *
  * $Id$
  *
- * Authors: Cl�ent Stenac <zorglub at videolan.org>
+ * Authors: Clément Stenac <zorglub at videolan.org>
  *          Filippo Carone <littlejohn at videolan.org>
  *          Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
  *          Damien Fouilleul <damienf a_t videolan dot org>
@@ -190,14 +190,9 @@ int libvlc_media_player_has_vout( libvlc_media_player_t *p_mi,
 int libvlc_video_reparent( libvlc_media_player_t *p_mi, libvlc_drawable_t d,
                            libvlc_exception_t *p_e )
 {
-    vout_thread_t *p_vout = GetVout( p_mi, p_e );
-
-    if( p_vout )
-    {
-        vout_Control( p_vout , VOUT_REPARENT, d);
-        vlc_object_release( p_vout );
-    }
-    return 0;
+    (void) p_mi; (void) d;
+    libvlc_exception_raise(p_e, "Reparenting not supported");
+    return -1;
 }
 
 void libvlc_video_resize( libvlc_media_player_t *p_mi, int width, int height, libvlc_exception_t *p_e )




More information about the vlc-devel mailing list