[vlc-devel] commit: "fullscreen" callback: do nothing if value is unchanged ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed Feb 10 18:56:30 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 10 18:03:47 2010 +0200| [36d657e1df3c214eb547f14cce4ba6080d974861] | committer: Rémi Denis-Courmont 

"fullscreen" callback: do nothing if value is unchanged

The old video output core assumes that the fullscreen state must be
toggled if the VOUT_FULLSCREEN_CHANGE bit is set. So we need to check
that the target state is not already correct, as the VLC variables core
does NOT do it internally. This commit provides rare exception to the
rule that oldval is useless.

This fixes a whole class of race conditions where two threads try to
change fullscreen status at the same time.

In the video filter case, we now enable fullscreen on all childrens, not
just one. This seems a bit more logical for wall. Without this, toggling
fullscreen would only ever work on the first video output. With this,
things should work great if the different pieces of the wall are on
different video ports, and OK (Alt+Tab is your friend) otherwise.

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

 modules/video_filter/wrapper.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/modules/video_filter/wrapper.c b/modules/video_filter/wrapper.c
index dbb837d..928f403 100644
--- a/modules/video_filter/wrapper.c
+++ b/modules/video_filter/wrapper.c
@@ -538,21 +538,6 @@ static void FilterAllocationClean( filter_t *p_filter )
 
 /* -- Splitter callbacks -- */
 
-/**
- * Forward fullscreen event to/from the childrens.
- *
- * FIXME probably unsafe (pp_vout[] content)
- */
-static bool IsFullscreenActive( vout_thread_t *p_vout )
-{
-    vout_sys_t *p_sys = p_vout->p_sys;
-    for( int i = 0; i < p_sys->i_vout; i++ )
-    {
-        if( var_GetBool( p_sys->pp_vout[i], "fullscreen" ) )
-            return true;
-    }
-    return false;
-}
 static int FullscreenEventDown( vlc_object_t *p_this, char const *psz_var,
                                 vlc_value_t oldval, vlc_value_t newval, void *p_data )
 {




More information about the vlc-devel mailing list