[farsight2/master] Add stop() method to FsStreamTransmitter

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


---
 docs/libs/farsight2-libs-sections.txt         |    1 +
 gst-libs/gst/farsight/fs-stream-transmitter.c |   20 ++++++++++++++++++++
 gst-libs/gst/farsight/fs-stream-transmitter.h |    5 ++++-
 3 files changed, 25 insertions(+), 1 deletions(-)

diff --git a/docs/libs/farsight2-libs-sections.txt b/docs/libs/farsight2-libs-sections.txt
index 42a51ee..d5e0844 100644
--- a/docs/libs/farsight2-libs-sections.txt
+++ b/docs/libs/farsight2-libs-sections.txt
@@ -177,6 +177,7 @@ FsStreamTransmitterClass
 fs_stream_transmitter_set_remote_candidates
 fs_stream_transmitter_select_candidate_pair
 fs_stream_transmitter_gather_local_candidates
+fs_stream_transmitter_stop
 fs_stream_transmitter_emit_error
 <SUBSECTION Standard>
 FS_IS_STREAM_TRANSMITTER
diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.c b/gst-libs/gst/farsight/fs-stream-transmitter.c
index d4d6118..021a2e9 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.c
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.c
@@ -381,6 +381,26 @@ fs_stream_transmitter_gather_local_candidates (
 }
 
 
+
+/**
+ * fs_stream_transmitter_stop:
+ * @streamtransmitter: a #FsStreamTransmitter
+ *
+ * This functions stops the #FsStreamTransmitter, it must be called before
+ * the last reference is dropped.
+ */
+
+void
+fs_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter)
+{
+  FsStreamTransmitterClass *klass =
+    FS_STREAM_TRANSMITTER_GET_CLASS (streamtransmitter);
+
+  if (klass->stop)
+    return klass->stop (streamtransmitter);
+}
+
+
 /**
  * fs_stream_transmitter_emit_error:
  * @streamtransmitter: #FsStreamTransmitter on which to emit the error signal
diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.h b/gst-libs/gst/farsight/fs-stream-transmitter.h
index abcfd73..8339a32 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.h
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.h
@@ -60,6 +60,7 @@ typedef struct _FsStreamTransmitterPrivate FsStreamTransmitterPrivate;
  * @set_remote_candidates: Sets the remote candidates
  * @select_candidate_pair: Select the candidate pair
  * @gather_local_candidates: Starts the gathering of local candidates
+ * @stop: Stop the stream transmitter synchronously
  *
  * You must override the add_remote_candidate in a subclass
  */
@@ -78,6 +79,7 @@ struct _FsStreamTransmitterClass
       GError **error);
   gboolean (*gather_local_candidates) (FsStreamTransmitter *streamtransmitter,
                                        GError **error);
+  void (*stop) (FsStreamTransmitter *streamtransmitter);
 
   /*< private >*/
   gpointer _padding[8];
@@ -115,10 +117,11 @@ fs_stream_transmitter_gather_local_candidates (
     FsStreamTransmitter *streamtransmitter,
     GError **error);
 
+void fs_stream_transmitter_stop (FsStreamTransmitter *streamtransmitter);
+
 void fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter,
   gint error_no, gchar *error_msg, gchar *debug_msg);
 
-
 G_END_DECLS
 
 #endif /* __FS_STREAM_TRANSMITTER_H__ */
-- 
1.5.6.5




More information about the farsight-commits mailing list