<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div><br></div>
<div>On Sat, Sep 24, 2016, at 01:16, <a href="mailto:remi@remlab.net">remi@remlab.net</a> wrote:<br></div>
<blockquote type="cite"><p dir="ltr"><br></p><p dir="ltr"><br></p><div>Le 22 sept. 2016 11:32, git@videolan.org a écrit :<br></div>
<div> ><br></div>
<div> > vlc | branch: master | Thomas Guillem <thomas@gllm.fr> | Thu Sep 22 16:40:43 2016 +0200| [a3925097aa23b6179ddf61bb04e43cd9a90e6f7f] | committer: Thomas Guillem<br></div>
<div> ><br></div>
<div> > pulse: restart when we need to move a passthrough input<br></div>
<p><br></p><p dir="ltr">Why? If the moved-to sink supports pass-through, there should be no problems. If it doesn't, then we should get a format-lost event so the change seems redundant. If our input is movef by another client or by the daemon, this patch has no effects. And if somehow policy rejects the change, the code just breakd audio needlessly.<br></p></blockquote><div><br></div>
<div>Could I request a restart only if the sink move failed ?<br></div>
<div>I agree this is not the same behavior when you change a sink via pavucontrol. But, for me, if the user explicitly selects a new device, we shouldn't ignore it.<br></div>
<div><br></div>
<blockquote type="cite"><div>><br></div>
<div> > > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a3925097aa23b6179ddf61bb04e43cd9a90e6f7f<br></div>
<div> > ---<br></div>
<div> ><br></div>
<div> > modules/audio_output/pulse.c | 11 +++++++++++<br></div>
<div> > 1 file changed, 11 insertions(+)<br></div>
<div> ><br></div>
<div> > diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c<br></div>
<div> > index a088e44..bde37d3 100644<br></div>
<div> > --- a/modules/audio_output/pulse.c<br></div>
<div> > +++ b/modules/audio_output/pulse.c<br></div>
<div> > @@ -75,6 +75,7 @@ struct aout_sys_t<br></div>
<div> >      char *sink_force; /**< Forced sink name (stream must be NULL) */<br></div>
<div> ><br></div>
<div> >      struct sink *sinks; /**< Locally-cached list of sinks */<br></div>
<div> > +    bool passthrough;<br></div>
<div> > };<br></div>
<div> ><br></div>
<div> > static void VolumeReport(audio_output_t *aout)<br></div>
<div> > @@ -655,6 +656,15 @@ static int StreamMove(audio_output_t *aout, const char *name)<br></div>
<div> >          aout_DeviceReport(aout, name);<br></div>
<div> >          return 0;<br></div>
<div> >      }<br></div>
<div> > +    else if (sys->passthrough)<br></div>
<div> > +    {<br></div>
<div> > +        /* A sink connected with a passthrough input cannot be moved */<br></div>
<div> > +        msg_Dbg(aout, "request restart to connect to sink %s", name);<br></div>
<div> > +        free(sys->sink_force);<br></div>
<div> > +        sys->sink_force = strdup(name);<br></div>
<div> > +        aout_RestartRequest(aout, AOUT_RESTART_OUTPUT);<br></div>
<div> > +        return 0;<br></div>
<div> > +    }<br></div>
<div> ><br></div>
<div> >      pa_operation *op;<br></div>
<div> >      uint32_t idx = pa_stream_get_index(sys->stream);<br></div>
<div> > @@ -924,6 +934,7 @@ static int Start(audio_output_t *aout, audio_sample_format_t *restrict fmt)<br></div>
<div> >      sys->flags_force = PA_STREAM_NOFLAGS;<br></div>
<div> >      free(sys->sink_force);<br></div>
<div> >      sys->sink_force = NULL;<br></div>
<div> > +    sys->passthrough = fmt->i_format == VLC_CODEC_SPDIFL;<br></div>
<div> ><br></div>
<div> >      if (encoding == PA_ENCODING_INVALID)<br></div>
<div> >      {<br></div>
<div> ><br></div>
<div> > _______________________________________________<br></div>
<div> > vlc-commits mailing list<br></div>
<div> > vlc-commits@videolan.org<br></div>
<div> > https://mailman.videolan.org/listinfo/vlc-commits<br></div>
<p><br></p><div><u>_______________________________________________</u><br></div>
<div>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</blockquote><div><br></div>
</body>
</html>