Re: [PATCH spice-gtk 1/5] audio: emit stop when the channels are reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Apr 29, 2015 at 05:06:44PM +0200, Marc-André Lureau wrote:
> Ensure a hint is given to the client that the channel is reset.
>
> Unfortunately, since the handle may be asynchronous due to coroutine,
> the channel functions should be tolerant to a playback/record calls
> functions when the channel is stopped.

So, is it expected the audio to stop (briefly) on channel reset?
Did you this change on migration with audio playing?

> ---
>  gtk/channel-playback.c | 2 ++
>  gtk/channel-record.c   | 3 +++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/gtk/channel-playback.c b/gtk/channel-playback.c
> index ae8a75d..9d45e1f 100644
> --- a/gtk/channel-playback.c
> +++ b/gtk/channel-playback.c
> @@ -172,6 +172,8 @@ static void spice_playback_channel_reset(SpiceChannel *channel, gboolean migrati
>      SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv;
>  
>      snd_codec_destroy(&c->codec);
> +    g_coroutine_signal_emit(channel, signals[SPICE_PLAYBACK_STOP], 0);
> +    c->is_active = FALSE;
>  
>      SPICE_CHANNEL_CLASS(spice_playback_channel_parent_class)->channel_reset(channel, migrating);
>  }
> diff --git a/gtk/channel-record.c b/gtk/channel-record.c
> index ac71999..0b41349 100644
> --- a/gtk/channel-record.c
> +++ b/gtk/channel-record.c
> @@ -169,6 +169,9 @@ static void channel_reset(SpiceChannel *channel, gboolean migrating)
>      g_free(c->last_frame);
>      c->last_frame = NULL;
>  
> +    g_coroutine_signal_emit(channel, signals[SPICE_RECORD_STOP], 0);
> +    c->started = FALSE;
> +
>      snd_codec_destroy(&c->codec);
>  
>      SPICE_CHANNEL_CLASS(spice_record_channel_parent_class)->channel_reset(channel, migrating);
> -- 
> 2.1.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]