[vlc-devel] [PATCH] vout: Update vlc_player_vout_SetVar to fix fullscreen toggle hotkey

Alexandre Janniaux ajanni at videolabs.io
Thu Jan 9 13:20:02 CET 2020


Hi,

On Thu, Jan 09, 2020 at 10:35:23AM +0100, Steve Lhomme wrote:
> On 2020-01-09 10:28, Alexandre Janniaux wrote:
> > Hi,
> >
> > According to documentation, vlc_player_vout_HoldAll can
> > return NULL and thus vouts must be checked before usage.
>
> In that case the size is 0 so it won't have any impact.

Unfortunately the documentation doesn't tell so, it might
be a good addition if we consider this behaviour to be the
correct one.

>
> > I'm not sure setting variable on all vouts is a correct fix
> > for the issue you are mentioning. In particular, if you
> > enable a visualization with a video, or have a video with
> > multiple video track, you'll get the two vout in
> > fullscreen.
> >
> > The fix is probably in the hotkey module instead IMHO.
> >
> > Regards,
> > --
> > Alexandre Janniaux
> > Videolabs
> >
> > On Thu, Jan 09, 2020 at 12:20:40AM +0530, vvaakshay at gmail.com wrote:
> > > From: akshayaky <akymaster007 at gmail.com>
> > >
> > > this commit fixes:
> > >     -the fullscreen hotkey not exiting fullscreen
> > >     -wallpaper mode hotkey not disabling wallpaper mode
> > >
> > > this commit issue #22418
> > > ---
> > >   src/player/vout.c | 13 ++++++++++---
> > >   1 file changed, 10 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/src/player/vout.c b/src/player/vout.c
> > > index b28599288f..4ba7b1c89c 100644
> > > --- a/src/player/vout.c
> > > +++ b/src/player/vout.c
> > > @@ -157,9 +157,16 @@ static void
> > >   vlc_player_vout_SetVar(vlc_player_t *player, const char *name, int type,
> > >                          vlc_value_t val)
> > >   {
> > > -    vout_thread_t *vout = vlc_player_vout_Hold(player);
> > > -    var_SetChecked(vout, name, type, val);
> > > -    vout_Release(vout);
> > > +    var_SetChecked(player, name, type, val);
> > > +
> > > +    size_t count;
> > > +    vout_thread_t **vouts = vlc_player_vout_HoldAll(player, &count);
> > > +    for (size_t i = 0; i < count; i++)
> > > +    {
> > > +        var_SetChecked(vouts[i], name, type, val);
> > > +        vout_Release(vouts[i]);
> > > +    }
> > > +    free(vouts);
> > >   }
> > >
> > >
> > > --
> > > 2.17.1
> > >
> > > _______________________________________________
> > > vlc-devel mailing list
> > > To unsubscribe or modify your subscription options:
> > > https://mailman.videolan.org/listinfo/vlc-devel
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> >
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list