<div dir="ltr"><div><div><div>For values that are not currently saved in the configuration, you are right that it won't work.<br><br></div>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.<br>
<br></div>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?<br>
</div>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.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-11 9:30 GMT+01:00 Rémi Denis-Courmont <span dir="ltr"><<a href="mailto:remi@remlab.net" target="_blank">remi@remlab.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">On Mon, 10 Feb 2014 19:14:53 +0100, Felix Abecassis<br>
<<a href="mailto:felix.abecassis@gmail.com">felix.abecassis@gmail.com</a>> wrote:<br>
> Triggering callback is overwriting initialization done by<br>
> VoutGetDisplayCfg. The structure vout_display_cfg_t is saved when<br>
> reusing a vout and thus should be responsible of saving user<br>
> preferences instead of doing this through callback trigger.<br>
<br>
</div>For zoom, aspect-ration, and maybe crop.<br>
<br>
What about the other values? Maybe it works, but the comment is explaining<br>
how.<br>
<div class="HOEnZb"><div class="h5"><br>
> ---<br>
> src/video_output/video_output.c | 1 -<br>
> src/video_output/vout_internal.h | 1 -<br>
> src/video_output/vout_intf.c | 17 -----------------<br>
> 3 files changed, 19 deletions(-)<br>
><br>
> diff --git a/src/video_output/video_output.c<br>
> b/src/video_output/video_output.c<br>
> index 629b8d2..52910da 100644<br>
> --- a/src/video_output/video_output.c<br>
> +++ b/src/video_output/video_output.c<br>
> @@ -222,7 +222,6 @@ vout_thread_t *vout_Request(vlc_object_t *object,<br>
><br>
> if (!vout->p->dead) {<br>
> msg_Dbg(object, "reusing provided vout");<br>
> - vout_IntfReinit(vout);<br>
> return vout;<br>
> }<br>
> vout_CloseAndRelease(vout);<br>
> diff --git a/src/video_output/vout_internal.h<br>
> b/src/video_output/vout_internal.h<br>
> index f6ad269..1de0305 100644<br>
> --- a/src/video_output/vout_internal.h<br>
> +++ b/src/video_output/vout_internal.h<br>
> @@ -154,7 +154,6 @@ void vout_ControlChangeSubMargin(vout_thread_t *,<br>
int);<br>
><br>
> /* */<br>
> void vout_IntfInit( vout_thread_t * );<br>
> -void vout_IntfReinit( vout_thread_t * );<br>
><br>
> /* */<br>
> int vout_OpenWrapper (vout_thread_t *, const char *, const<br>
> vout_display_state_t *);<br>
> diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c<br>
> index 20e262a..c492bac 100644<br>
> --- a/src/video_output/vout_intf.c<br>
> +++ b/src/video_output/vout_intf.c<br>
> @@ -323,23 +323,6 @@ void vout_IntfInit( vout_thread_t *p_vout )<br>
> var_Create( p_vout, "mouse-moved", VLC_VAR_COORDS );<br>
> var_Create( p_vout, "mouse-clicked", VLC_VAR_COORDS );<br>
> var_Create( p_vout, "mouse-object", VLC_VAR_BOOL );<br>
> -<br>
> - vout_IntfReinit( p_vout );<br>
> -}<br>
> -<br>
> -void vout_IntfReinit( vout_thread_t *p_vout )<br>
> -{<br>
> - var_TriggerCallback( p_vout, "zoom" );<br>
> - var_TriggerCallback( p_vout, "crop" );<br>
> - var_TriggerCallback( p_vout, "aspect-ratio" );<br>
> -<br>
> - var_TriggerCallback( p_vout, "video-on-top" );<br>
> - var_TriggerCallback( p_vout, "video-wallpaper" );<br>
> -<br>
> - var_TriggerCallback( p_vout, "video-filter" );<br>
> - var_TriggerCallback( p_vout, "sub-source" );<br>
> - var_TriggerCallback( p_vout, "sub-filter" );<br>
> - var_TriggerCallback( p_vout, "sub-margin" );<br>
> }<br>
><br>
><br>
/*****************************************************************************<br>
<br>
--<br>
</div></div><span class="HOEnZb"><font color="#888888">Rémi Denis-Courmont<br>
Sent from my collocated server<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Félix Abecassis<div><a href="http://felix.abecassis.me" target="_blank">http://felix.abecassis.me</a></div>
</div>