[farsight2/master] Add a per-component stream state signal to the stream transmitter

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:24:01 PST 2008


---
 gst-libs/gst/farsight/fs-marshal.list         |    1 +
 gst-libs/gst/farsight/fs-stream-transmitter.c |   23 ++++++++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/gst-libs/gst/farsight/fs-marshal.list b/gst-libs/gst/farsight/fs-marshal.list
index 1666f05..d265661 100644
--- a/gst-libs/gst/farsight/fs-marshal.list
+++ b/gst-libs/gst/farsight/fs-marshal.list
@@ -3,3 +3,4 @@ VOID:ENUM,STRING,STRING
 VOID:BOXED,BOXED
 VOID:OBJECT,OBJECT
 VOID:UINT,POINTER
+VOID:UINT,ENUM
diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.c b/gst-libs/gst/farsight/fs-stream-transmitter.c
index 40debd0..d2f9288 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.c
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.c
@@ -56,6 +56,7 @@ enum
   NEW_ACTIVE_CANDIDATE_PAIR,
   LOCAL_CANDIDATES_PREPARED,
   KNOWN_SOURCE_PACKET_RECEIVED,
+  STATE_CHANGED,
   LAST_SIGNAL
 };
 
@@ -240,7 +241,6 @@ fs_stream_transmitter_class_init (FsStreamTransmitterClass *klass)
    *
    * This signal is emitted when a buffer coming from a confirmed known source
    * is received.
-   *
    */
   signals[KNOWN_SOURCE_PACKET_RECEIVED] = g_signal_new
     ("known-source-packet-received",
@@ -252,6 +252,27 @@ fs_stream_transmitter_class_init (FsStreamTransmitterClass *klass)
       _fs_marshal_VOID__UINT_POINTER,
       G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER);
 
+
+  /**
+   * FsStreamTransmitter::state-changed
+   * @self: #FsStreamTransmitter that emitted the signal
+   * @component: the id of the component which state has changed
+   * @state: the new state of the component
+   *
+   * This signal is emitted when the ICE state (or equivalent) of the component
+   * changes
+   */
+ signals[STATE_CHANGED] = g_signal_new
+    ("state-changed",
+      G_TYPE_FROM_CLASS (klass),
+      G_SIGNAL_RUN_LAST,
+      0,
+      NULL,
+      NULL,
+      _fs_marshal_VOID__UINT_ENUM,
+      G_TYPE_NONE, 2, G_TYPE_UINT, FS_TYPE_STREAM_STATE);
+
+
   gobject_class->dispose = fs_stream_transmitter_dispose;
   gobject_class->finalize = fs_stream_transmitter_finalize;
 
-- 
1.5.6.5




More information about the farsight-commits mailing list