[Spice-devel] [PATCH spice-gtk 3/5] RecordChannel: Fix introspection method bindings

Matthew Francis mjay.francis at gmail.com
Tue Sep 19 05:49:56 UTC 2017


Signed-off-by: Matthew Francis <mjay.francis at gmail.com>
---
 doc/reference/spice-gtk-sections.txt |  1 +
 src/channel-record.c                 | 19 +++++++++++++++++++
 src/channel-record.h                 |  6 ++++++
 src/map-file                         |  1 +
 src/spice-glib-sym-file              |  1 +
 src/spice-gstaudio.c                 |  2 +-
 6 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/doc/reference/spice-gtk-sections.txt b/doc/reference/spice-gtk-sections.txt
index ffaf00e..538e07c 100644
--- a/doc/reference/spice-gtk-sections.txt
+++ b/doc/reference/spice-gtk-sections.txt
@@ -216,6 +216,7 @@ SpiceRecordChannel
 SpiceRecordChannelClass
 <SUBSECTION>
 spice_record_send_data
+spice_record_channel_send_data
 <SUBSECTION Standard>
 SPICE_RECORD_CHANNEL
 SPICE_IS_RECORD_CHANNEL
diff --git a/src/channel-record.c b/src/channel-record.c
index 9834e85..88bdb5c 100644
--- a/src/channel-record.c
+++ b/src/channel-record.c
@@ -312,10 +312,29 @@ static void spice_record_start_mark(SpiceRecordChannel *channel, uint32_t time)
  * @time: stream timestamp
  *
  * Send recorded PCM data to the guest.
+ *
+ * Deprecated: 0.35: use spice_record_channel_send_data() instead.
  **/
 void spice_record_send_data(SpiceRecordChannel *channel, gpointer data,
                             gsize bytes, uint32_t time)
 {
+    spice_record_channel_send_data(channel, data, bytes, time);
+}
+
+/**
+ * spice_record_channel_send_data:
+ * @channel: a #SpiceRecordChannel
+ * @data: PCM data
+ * @bytes: size of @data
+ * @time: stream timestamp
+ *
+ * Send recorded PCM data to the guest.
+ *
+ * Since: 0.35
+ **/
+void spice_record_channel_send_data(SpiceRecordChannel *channel, gpointer data,
+                                    gsize bytes, uint32_t time)
+{
     SpiceRecordChannelPrivate *rc;
     SpiceMsgcRecordPacket p = {0, };
 
diff --git a/src/channel-record.h b/src/channel-record.h
index c851421..5702f40 100644
--- a/src/channel-record.h
+++ b/src/channel-record.h
@@ -73,8 +73,14 @@ struct _SpiceRecordChannelClass {
 };
 
 GType	        spice_record_channel_get_type(void);
+void            spice_record_channel_send_data(SpiceRecordChannel *channel, gpointer data,
+                                               gsize bytes, guint32 time);
+
+#ifndef SPICE_DISABLE_DEPRECATED
+G_DEPRECATED_FOR(spice_record_channel_send_data)
 void            spice_record_send_data(SpiceRecordChannel *channel, gpointer data,
                                        gsize bytes, guint32 time);
+#endif
 
 G_END_DECLS
 
diff --git a/src/map-file b/src/map-file
index 8635e92..23bcaa5 100644
--- a/src/map-file
+++ b/src/map-file
@@ -99,6 +99,7 @@ spice_port_event;
 spice_port_write_async;
 spice_port_write_finish;
 spice_record_channel_get_type;
+spice_record_channel_send_data;
 spice_record_send_data;
 spice_session_connect;
 spice_session_disconnect;
diff --git a/src/spice-glib-sym-file b/src/spice-glib-sym-file
index d996dbf..10cc245 100644
--- a/src/spice-glib-sym-file
+++ b/src/spice-glib-sym-file
@@ -78,6 +78,7 @@ spice_port_event
 spice_port_write_async
 spice_port_write_finish
 spice_record_channel_get_type
+spice_record_channel_send_data
 spice_record_send_data
 spice_session_connect
 spice_session_disconnect
diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c
index 715f824..97546b6 100644
--- a/src/spice-gstaudio.c
+++ b/src/spice-gstaudio.c
@@ -175,7 +175,7 @@ static gboolean record_bus_cb(GstBus *bus, GstMessage *msg, gpointer data)
             return TRUE;
         }
 
-        spice_record_send_data(SPICE_RECORD_CHANNEL(p->rchannel),
+        spice_record_channel_send_data(SPICE_RECORD_CHANNEL(p->rchannel),
                                /* FIXME: server side doesn't care about ts?
                                   what is the unit? ms apparently */
                                mapping.data, mapping.size, 0);
-- 
2.7.4



More information about the Spice-devel mailing list