[Spice-devel] [spice-server v2] sound: Don't mute recording when client reconnects

Uri Lublin uril at redhat.com
Sun May 27 11:59:07 UTC 2018


On 05/25/2018 12:12 PM, Christophe Fergeau wrote:
> When a new record channel is added, the code relies on a snd_send() call
> in record_channel_client_constructed() to send RECORD_START to the
> client. However, at this point, snd_send() is non-functional because
> the red_channel_client_pipe_add() call it makes is a no-op because
> prepare_pipe_add() makes a connection check through
> red_channel_client_is_connected() queueing the item. This connection
> check returns FALSE at ::constructed() time as the channel client will
> only become connected towards the end of
> red_channel_client_initable_init() which runs after the object
> instantiation is complete.
> 
> This commit solves this issue by making PlaybackChannelClient and
> RecordChannelClient implement GInitable, and move the code interacting
> with the client in their _initable_init() function, as at this point the
> objects will be able to send data.

nitpick:
Consider moving this second paragraph to be the last.
The other two paragraphs are talking about the problem
and this one talks about the solution.

Uri.

> 
> This causes a bug where starting recording and then
> disconnecting/reconnecting the client does not successfully reenable
> recording. This is a regression introduced by commit d8dc09
> 'sound: Convert SndChannelClient to RedChannelClient'
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1549132
> 
> Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>

[patch snipped]


More information about the Spice-devel mailing list