[vlc-devel] [PATCH] vout: fix fullscreen race condition
rom1v at videolabs.io
Tue Apr 17 18:50:33 CEST 2018
On Tue, Apr 17, 2018 at 07:25:53PM +0300, Rémi Denis-Courmont wrote:
> > So fullscreen is and remains true
> > (resp. false) for the playlist object while it is and remains false
> > (resp. true) for the vout object.
> That is by design.
> Pressing F when there is no video window toggles fullscreen mode for future
> video windows. Pressing F while there is a video window should toggle the
> fullscreen mode of the focused window, or if none, the embedded video window.
OK, this makes sense.
> > More fundamentally, the fullscreen flag is duplicated into several
> > objects, while it represents exactly 1 state (so the variables must be
> > kept in sync, and they are/were not).
> No, it does _not_ represent exactly one state. There can be any number of
> video windows at a time, each with their independent fullscreen flag. The
> input manager flag is *only* the initial value for future video windows.
OK, that clarifies the meaning of having several variables here. Thank
> > > Meanwhile, Qt shows a fullscreen video window, and, at the same time, does
> > > not show the FSC. That is totally a bug within Qt GUI.
> > Anything using both the playlist "fullscreen" variable and the vout
> > "fullscreen" variable would have this inconsistency, since the values
> > may be different indefinitely.
> If there are no video outputs, then there are no FSC to show, and thus the
> playlist flag is irrelevant. If there are video outputs, then each of them has
> its own fullscreen flag, and there are also no reasons to check the playlist
> flag ever as far as the FSC is concerned.
> > The fact that the Qt GUI reveals it is just a consequence.
> No, the Qt GUI is just buggy.
What do you think about this alternate patch:
diff --git a/modules/gui/qt/components/controller.cpp b/modules/gui/qt/components/controller.cpp
index e10b1e4208..3b4e3bbd66 100644
@@ -1209,9 +1209,7 @@ void FullscreenControllerWidget::setVoutList( vout_thread_t **pp_vout, int i_vou
vout.append( p_vout );
var_AddCallback( p_vout, "fullscreen",
FullscreenControllerWidget::FullscreenChanged, this );
- /* I miss a add and fire */
- emit fullscreenChanged( p_vout, var_InheritBool( THEPL, "fullscreen" ),
- var_GetInteger( p_vout, "mouse-hide-timeout" ) );
+ var_SetBool( p_vout, "fullscreen", var_InheritBool( THEPL, "fullscreen" ) );
vlc_mutex_unlock( &lock );
More information about the vlc-devel