Remove DummyChannel* objects

Submitted by Frediano Ziglio on Dec. 2, 2016, 10:53 a.m.

Details

Reviewer None
Submitted Dec. 2, 2016, 10:53 a.m.
Last Updated Dec. 2, 2016, 10:54 a.m.
Revision 1

Cover Letter(s)

Revision 1
      These objects were used by the sound channel as
this channel read/write to/from client directly.
This make the code of this channel quite different
from the other ones.
Also this reduce code duplication from RedChannelClient
and increase encapsulation.
Also there are multiple cleanup following this
conversion.

Changes since v5:
- split conversion SndChannelClient to GObject;
- remove some TODO/FIXME already resolved;
- remove some useless spice_asserts;
- fully define GObject classes;
- some reordering to minimize changes.

Changes since v4:
- merged some patches;
- make sure all commit are working;
- some comment updates;
- added some additional cleanup patches.

Changes since v3:
- updated some commit message;
- rename structures and related fields in the same commit.
- reverted wrong field rename (RedChannel *client).

Changes since v2:
- send playback data as soon as possible;
- split renames putting client renames first then worker ones;
- some commit message changes.

Changes since v1:
- split some long lines;
- do not attempt to free in progress frame before is full sent.
  This could cause raw frames to be overridden.

Frediano Ziglio (18):
  sound: Convert SndChannel to GObject
  sound: Implements config_socket RedChannel callback
  sound: Reuse record_client variable
  sound: Change AudioFrame allocation
  sound: Introduce a macro to cast to SndChannelClient
  sound: Reuse client variable if available
  sound: Load marshaller into a variable
  sound: Convert SndChannelClient to GObject
  Remove DummyChannel* objects
  Make RedChannelClient::incoming private
  sound: Free more on SndChannel finalize
  sound: Use default disconnect for client channels
  sound: Reuse code for snd_set_{playback,record}_peer
  sound: Reuse code for migrating client channels
  sound: Reuse code to set volume and mute
  sound: Use default message handler if possible
  sound: Make clear active and client_active are boolean
  sound: Use memcpy instead of manually copy volume array

 server/Makefile.am                  |    4 +-
 server/dummy-channel-client.c       |  138 +---
 server/dummy-channel-client.h       |   64 +-
 server/dummy-channel.c              |   94 +--
 server/dummy-channel.h              |   60 +-
 server/red-channel-client-private.h |   11 +-
 server/red-channel-client.c         |   12 +-
 server/red-channel-client.h         |   13 +-
 server/sound.c                      | 1359 +++++++++++++---------------
 9 files changed, 668 insertions(+), 1087 deletions(-)
 delete mode 100644 server/dummy-channel-client.c
 delete mode 100644 server/dummy-channel-client.h
 delete mode 100644 server/dummy-channel.c
 delete mode 100644 server/dummy-channel.h

base-commit: 41d52961dbb5f6a999ba93cca3763998aa9409da
    

Revisions

Patches download mbox

# Name Submitter State A F R T
[Spice-devel,v6,01/18] sound: Convert SndChannel to GObject Frediano Ziglio Accepted 1
[Spice-devel,v6,02/18] sound: Implements config_socket RedChannel callback Frediano Ziglio Accepted
[Spice-devel,v6,03/18] sound: Reuse record_client variable Frediano Ziglio Accepted 1
[Spice-devel,v6,04/18] sound: Change AudioFrame allocation Frediano Ziglio Accepted 1
[Spice-devel,v6,05/18] sound: Introduce a macro to cast to SndChannelClient Frediano Ziglio Accepted 1
[Spice-devel,v6,06/18] sound: Reuse client variable if available Frediano Ziglio Accepted 1
[Spice-devel,v6,07/18] sound: Load marshaller into a variable Frediano Ziglio Accepted 1
[Spice-devel,v6,08/18] sound: Convert SndChannelClient to GObject Frediano Ziglio Superseded
[Spice-devel,v6,09/18] Remove DummyChannel* objects Frediano Ziglio Superseded
[Spice-devel,v6,10/18] Make RedChannelClient::incoming private Frediano Ziglio Accepted
[Spice-devel,v6,11/18] sound: Free more on SndChannel finalize Frediano Ziglio Accepted
[Spice-devel,v6,12/18] sound: Use default disconnect for client channels Frediano Ziglio Accepted
[Spice-devel,v6,13/18] sound: Reuse code for snd_set_{playback, record}_peer Frediano Ziglio Accepted
[Spice-devel,v6,14/18] sound: Reuse code for migrating client channels Frediano Ziglio Accepted
[Spice-devel,v6,15/18] sound: Reuse code to set volume and mute Frediano Ziglio Accepted
[Spice-devel,v6,16/18] sound: Use default message handler if possible Frediano Ziglio Accepted
[Spice-devel,v6,17/18] sound: Make clear active and client_active are boolean Frediano Ziglio Accepted
[Spice-devel,v6,18/18] sound: Use memcpy instead of manually copy volume array Frediano Ziglio Rejected