<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div><br></div>
<div>On Sat, Sep 24, 2016, at 01:18, <a href="mailto:remi@remlab.net">remi@remlab.net</a> wrote:<br></div>
<blockquote type="cite"><p dir="ltr">Hello,<br></p><p dir="ltr"><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:36:59 2016 +0200| [4bba1e84a13a8d340b8a06df155bec8034bcd012] | committer: Thomas Guillem<br></div>
<div> ><br></div>
<div> > aout: always signal when the aout changed<br></div>
<div> ><br></div>
<div> > In a previous patch, we signaled that the aout changed when it was restarted.<br></div>
</p><p dir="ltr">Because the decoder needs to handle it.<br></p><p dir="ltr"><div>> We also need to signal that event when an aout module selects a device without<br></div>
<div> > requesting a restart.<br></div>
</p><p dir="ltr">No? There is nothing for the decoder to do there.<br></p></blockquote><div><br></div>
<div>We may want to restart the decoder in order to try pass-through with the new selected audio device.<br></div>
<div>(If the restarted decoder is the same, the aout won't be restarted since the audio fmt is the same.)<br></div>
<div><br></div>
<div>I also thought about always restarting the aout/decoder after a device_select (and remove sink move in pulse aout) in order to simplify and have only one way to select a new device with all plugins. But this may be too overkill.<br></div>
<div><br></div>
<blockquote type="cite"><p dir="ltr"><div>> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bba1e84a13a8d340b8a06df155bec8034bcd012<br></div>
<div> > ---<br></div>
<div> ><br></div>
<div> > src/audio_output/aout_internal.h | 1 +<br></div>
<div> > src/audio_output/dec.c           | 6 ++++++<br></div>
<div> > src/audio_output/output.c        | 1 +<br></div>
<div> > 3 files changed, 8 insertions(+)<br></div>
<div> ><br></div>
<div> > diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h<br></div>
<div> > index c6edf8e..a0574fa 100644<br></div>
<div> > --- a/src/audio_output/aout_internal.h<br></div>
<div> > +++ b/src/audio_output/aout_internal.h<br></div>
<div> > @@ -83,6 +83,7 @@ typedef struct<br></div>
<div> >      atomic_uint buffers_lost;<br></div>
<div> >      atomic_uint buffers_played;<br></div>
<div> >      atomic_uchar restart;<br></div>
<div> > +    bool device_changed;<br></div>
<div> > } aout_owner_t;<br></div>
<div> ><br></div>
<div> > typedef struct<br></div>
<div> > diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c<br></div>
<div> > index 1751e30..2f97848 100644<br></div>
<div> > --- a/src/audio_output/dec.c<br></div>
<div> > +++ b/src/audio_output/dec.c<br></div>
<div> > @@ -83,6 +83,7 @@ int aout_DecNew( audio_output_t *p_aout,<br></div>
<div> >      owner->input_format = *p_format;<br></div>
<div> >      owner->mixer_format = owner->input_format;<br></div>
<div> >      owner->request_vout = *p_request_vout;<br></div>
<div> > +    owner->device_changed = false;<br></div>
<div> ><br></div>
<div> >      if (aout_OutputNew (p_aout, &owner->mixer_format))<br></div>
<div> >          goto error;<br></div>
<div> > @@ -174,6 +175,11 @@ static int aout_CheckReady (audio_output_t *aout)<br></div>
<div> >           * left over by an audio visualization:<br></div>
<div> >          input_resource_TerminatVout(MAGIC HERE); */<br></div>
<div> >      }<br></div>
<div> > +    if (owner->device_changed)<br></div>
<div> > +    {<br></div>
<div> > +        owner->device_changed = false;<br></div>
<div> > +        status = AOUT_DEC_CHANGED;<br></div>
<div> > +    }<br></div>
<div> >      return (owner->mixer_format.i_format) ? status : AOUT_DEC_FAILED;<br></div>
<div> > }<br></div>
<div> ><br></div>
<div> > diff --git a/src/audio_output/output.c b/src/audio_output/output.c<br></div>
<div> > index 90db056..600705d 100644<br></div>
<div> > --- a/src/audio_output/output.c<br></div>
<div> > +++ b/src/audio_output/output.c<br></div>
<div> > @@ -561,6 +561,7 @@ void aout_OutputUnlock (audio_output_t *aout)<br></div>
<div> >          aout_OutputDeviceSet (aout, owner->req.device);<br></div>
<div> >          free (owner->req.device);<br></div>
<div> >          owner->req.device = (char *)unset_str;<br></div>
<div> > +        owner->device_changed = true;<br></div>
<div> >      }<br></div>
<div> ><br></div>
<div> >      if (owner->req.volume >= 0.f)<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><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>