[Spice-devel] [PATCH spice-gtk v2 4/5] playback channel: reseting channel caps
Yonit Halperin
yhalperi at redhat.com
Thu May 17 05:25:37 PDT 2012
---
gtk/channel-playback.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/gtk/channel-playback.c b/gtk/channel-playback.c
index 37b260e..1485267 100644
--- a/gtk/channel-playback.c
+++ b/gtk/channel-playback.c
@@ -83,15 +83,20 @@ static void spice_playback_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg);
/* ------------------------------------------------------------------ */
-static void spice_playback_channel_init(SpicePlaybackChannel *channel)
+static void spice_playback_channel_reset_capabilities(SpiceChannel *channel)
{
- channel->priv = SPICE_PLAYBACK_CHANNEL_GET_PRIVATE(channel);
-
if (!g_getenv("SPICE_DISABLE_CELT"))
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_PLAYBACK_CAP_CELT_0_5_1);
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_PLAYBACK_CAP_VOLUME);
}
+static void spice_playback_channel_init(SpicePlaybackChannel *channel)
+{
+ channel->priv = SPICE_PLAYBACK_CHANNEL_GET_PRIVATE(channel);
+
+ spice_playback_channel_reset_capabilities(SPICE_CHANNEL(channel));
+}
+
static void spice_playback_channel_finalize(GObject *obj)
{
SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(obj)->priv;
@@ -184,6 +189,7 @@ static void spice_playback_channel_class_init(SpicePlaybackChannelClass *klass)
channel_class->handle_msg = spice_playback_handle_msg;
channel_class->channel_reset = spice_playback_channel_reset;
+ channel_class->channel_reset_capabilities = spice_playback_channel_reset_capabilities;
g_object_class_install_property
(gobject_class, PROP_NCHANNELS,
--
1.7.7.6
More information about the Spice-devel
mailing list