[vlc-devel] [PATCH 4/4] vout: remove function vout_IntfReinit

Felix Abecassis felix.abecassis at gmail.com
Tue Feb 11 10:55:27 CET 2014


For values that are not currently saved in the configuration, you are right
that it won't work.

Now, when a variable callback is triggered, an event is sent to the vout
display (such as vout_SetDisplayZoom), if this event is processed correctly
(in vout_ManageDisplay) then the new value is saved in the configuration
and the next video in the playlist will use the same preferences.

I'm not sure everything is well-defined here. For instance, if we specify
an aspect-ratio on the command line but changes it during playback with
hotkey "A", which aspect-ratio should be used for the next video?
Also, with the current code triggering callbacks the vout receives several
events at the same time (e.g. zoom and AR), these operations are not
commutative (alt-1, A is not the same as A, alt-1) but we currently have an
arbitrary order for processing them. For this reason we get different
results when comparing 2.0.8 and the dev version.


2014-02-11 9:30 GMT+01:00 Rémi Denis-Courmont <remi at remlab.net>:

> On Mon, 10 Feb 2014 19:14:53 +0100, Felix Abecassis
> <felix.abecassis at gmail.com> wrote:
> > Triggering callback is overwriting initialization done by
> > VoutGetDisplayCfg. The structure vout_display_cfg_t is saved when
> > reusing a vout and thus should be responsible of saving user
> > preferences instead of doing this through callback trigger.
>
> For zoom, aspect-ration, and maybe crop.
>
> What about the other values? Maybe it works, but the comment is explaining
> how.
>
> > ---
> >  src/video_output/video_output.c  |  1 -
> >  src/video_output/vout_internal.h |  1 -
> >  src/video_output/vout_intf.c     | 17 -----------------
> >  3 files changed, 19 deletions(-)
> >
> > diff --git a/src/video_output/video_output.c
> > b/src/video_output/video_output.c
> > index 629b8d2..52910da 100644
> > --- a/src/video_output/video_output.c
> > +++ b/src/video_output/video_output.c
> > @@ -222,7 +222,6 @@ vout_thread_t *vout_Request(vlc_object_t *object,
> >
> >          if (!vout->p->dead) {
> >              msg_Dbg(object, "reusing provided vout");
> > -            vout_IntfReinit(vout);
> >              return vout;
> >          }
> >          vout_CloseAndRelease(vout);
> > diff --git a/src/video_output/vout_internal.h
> > b/src/video_output/vout_internal.h
> > index f6ad269..1de0305 100644
> > --- a/src/video_output/vout_internal.h
> > +++ b/src/video_output/vout_internal.h
> > @@ -154,7 +154,6 @@ void vout_ControlChangeSubMargin(vout_thread_t *,
> int);
> >
> >  /* */
> >  void vout_IntfInit( vout_thread_t * );
> > -void vout_IntfReinit( vout_thread_t * );
> >
> >  /* */
> >  int  vout_OpenWrapper (vout_thread_t *, const char *, const
> >  vout_display_state_t *);
> > diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
> > index 20e262a..c492bac 100644
> > --- a/src/video_output/vout_intf.c
> > +++ b/src/video_output/vout_intf.c
> > @@ -323,23 +323,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
> >      var_Create( p_vout, "mouse-moved", VLC_VAR_COORDS );
> >      var_Create( p_vout, "mouse-clicked", VLC_VAR_COORDS );
> >      var_Create( p_vout, "mouse-object", VLC_VAR_BOOL );
> > -
> > -    vout_IntfReinit( p_vout );
> > -}
> > -
> > -void vout_IntfReinit( vout_thread_t *p_vout )
> > -{
> > -    var_TriggerCallback( p_vout, "zoom" );
> > -    var_TriggerCallback( p_vout, "crop" );
> > -    var_TriggerCallback( p_vout, "aspect-ratio" );
> > -
> > -    var_TriggerCallback( p_vout, "video-on-top" );
> > -    var_TriggerCallback( p_vout, "video-wallpaper" );
> > -
> > -    var_TriggerCallback( p_vout, "video-filter" );
> > -    var_TriggerCallback( p_vout, "sub-source" );
> > -    var_TriggerCallback( p_vout, "sub-filter" );
> > -    var_TriggerCallback( p_vout, "sub-margin" );
> >  }
> >
> >
>
> /*****************************************************************************
>
> --
> Rémi Denis-Courmont
> Sent from my collocated server
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>



-- 
Félix Abecassis
http://felix.abecassis.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140211/f41af5b9/attachment.html>


More information about the vlc-devel mailing list