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

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

 



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

_______________________________________________
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]