[vlc-devel] [PATCH] Audiotrack: Implement Flush

Rémi Denis-Courmont remi at remlab.net
Tue Dec 4 19:56:00 CET 2012


Le mardi 4 décembre 2012 20:27:50, Sébastien Toque a écrit :
> ---
>  modules/audio_output/audiotrack.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/modules/audio_output/audiotrack.c
> b/modules/audio_output/audiotrack.c index 74ecc02..183195e 100644
> --- a/modules/audio_output/audiotrack.c
> +++ b/modules/audio_output/audiotrack.c
> @@ -116,6 +116,7 @@ static int  Open(vlc_object_t *);
>  static void Close(vlc_object_t *);
>  static void Play(audio_output_t*, block_t*);
>  static void Pause (audio_output_t *, bool, mtime_t);
> +static void Flush (audio_output_t *, bool);
> 
>  vlc_module_begin ()
>      set_shortname("AudioTrack")
> @@ -269,6 +270,7 @@ static int Start(audio_output_t *aout,
> audio_sample_format_t *restrict fmt) aout->time_get = NULL;
>      aout->play = Play;
>      aout->pause = Pause;
> +    aout->flush = Flush;
> 
>      p_sys->at_start(p_sys->AudioTrack);
> 
> @@ -313,6 +315,14 @@ static void Pause(audio_output_t *p_aout, bool pause,
> mtime_t date) }
>  }
> 
> +static void Flush (audio_output_t *p_aout, bool wait)
> +{
> +    VLC_UNUSED(wait); /* FIXME implement drain */
> +    aout_sys_t *p_sys = p_aout->sys;
> +
> +    p_sys->at_flush(p_sys->AudioTrack);

You _cannot_ use flush for drain.

> +}
> +
>  static int Open(vlc_object_t *obj)
>  {
>      audio_output_t *aout = (audio_output_t *)obj;

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list