[Spice-devel] [spice-gtk PATCH v6 1/4] audio: spice-audio with get mute and volume

Victor Toso victortoso at redhat.com
Tue Apr 14 05:18:41 PDT 2015


Async functions to be implemented by spice-gstaudio and spice-pulse to
get the updated volume and mute values for playback and record stream.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
---
 gtk/spice-audio.h | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/gtk/spice-audio.h b/gtk/spice-audio.h
index ebc4946..0bf625b 100644
--- a/gtk/spice-audio.h
+++ b/gtk/spice-audio.h
@@ -19,8 +19,10 @@
 #define __SPICE_CLIENT_AUDIO_H__
 
 #include <glib-object.h>
+#include <gio/gio.h>
 #include "spice-util.h"
 #include "spice-session.h"
+#include "channel-main.h"
 
 G_BEGIN_DECLS
 
@@ -67,8 +69,30 @@ struct _SpiceAudioClass {
 
     /*< private >*/
     gboolean (*connect_channel)(SpiceAudio *audio, SpiceChannel *channel);
-
-    gchar _spice_reserved[SPICE_RESERVED_PADDING];
+    void (*get_playback_volume_info_async)(SpiceAudio *audio,
+                                           GCancellable *cancellable,
+                                           SpiceMainChannel *main_channel,
+                                           GAsyncReadyCallback callback,
+                                           gpointer user_data);
+    gboolean (*get_playback_volume_info_finish)(SpiceAudio *audio,
+                                                GAsyncResult *res,
+                                                gboolean *mute,
+                                                guint8 *nchannels,
+                                                guint16 **volume,
+                                                GError **error);
+    void (*get_record_volume_info_async)(SpiceAudio *audio,
+                                         GCancellable *cancellable,
+                                         SpiceMainChannel *main_channel,
+                                         GAsyncReadyCallback callback,
+                                         gpointer user_data);
+    gboolean (*get_record_volume_info_finish)(SpiceAudio *audio,
+                                              GAsyncResult *res,
+                                              gboolean *mute,
+                                              guint8 *nchannels,
+                                              guint16 **volume,
+                                              GError **error);
+
+    gchar _spice_reserved[SPICE_RESERVED_PADDING - 4 * sizeof(void *)];
 };
 
 GType spice_audio_get_type(void);
-- 
2.1.0



More information about the Spice-devel mailing list