]> git.sesse.net Git - vlc/commitdiff
* get the correct vout, when using the opengl-output-module - on-the-fly changing...
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 18 Aug 2005 17:50:41 +0000 (17:50 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 18 Aug 2005 17:50:41 +0000 (17:50 +0000)
modules/gui/macosx/extended.m

index 27133560ef1048e342c932a2499fac5051d9cd43..d415cd774ad23e2ec59d0a3e095afba3dc66d6eb 100644 (file)
@@ -325,6 +325,7 @@ static VLCExtended *_o_sharedInstance = nil;
         FIND_ANYWHERE );
     vout_thread_t * p_vout = (vout_thread_t *)vlc_object_find( p_playlist, \
         VLC_OBJECT_VOUT, FIND_ANYWHERE );
+    vout_thread_t * p_real_vout;
     
     vlc_value_t val;
     val.f_float = [o_sld_opaque floatValue] / 100;
@@ -332,11 +333,21 @@ static VLCExtended *_o_sharedInstance = nil;
     /* Try to set on the fly */
     if( p_vout )
     {
+        if( p_vout->i_object_type == VLC_OBJECT_OPENGL )
+        {
+            p_real_vout = (vout_thread_t *) p_vout->p_parent;
+        }
+        else
+        {
+            p_real_vout = p_vout;
+        }
+        
         /* FIXME: insert the correct pointer here */
-        /* [p_vout->p_sys->o_window setAlpha: var_CreateGetFloat( p_vout, \
-            "macosx-opaqueness")]; */
-        msg_Dbg( p_playlist, "p_vout found");
+        /*[p_vout->p_sys->o_window setAlpha: var_CreateGetFloat( p_vout, \
+            "macosx-opaqueness")];*/
+        
         var_Set( p_vout, "macosx-opaqueness", val );
+        vlc_object_release( p_real_vout );
         vlc_object_release( p_vout );
     }