[farsight2/master] Add a function to emit async errors from the stream transmitters

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


---
 docs/libs/farsight-libs-sections.txt          |    1 +
 gst-libs/gst/farsight/fs-stream-transmitter.c |   19 +++++++++++++++++++
 gst-libs/gst/farsight/fs-stream-transmitter.h |    3 +++
 3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
index 8ec95cd..c9dd980 100644
--- a/docs/libs/farsight-libs-sections.txt
+++ b/docs/libs/farsight-libs-sections.txt
@@ -172,6 +172,7 @@ FsStreamTransmitterClass
 fs_stream_transmitter_add_remote_candidate
 fs_stream_transmitter_remote_candidates_added
 fs_stream_transmitter_select_candidate_pair
+fs_stream_transmitter_emit_error
 <SUBSECTION Standard>
 FS_IS_STREAM_TRANSMITTER
 FS_IS_STREAM_TRANSMITTER_CLASS
diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.c b/gst-libs/gst/farsight/fs-stream-transmitter.c
index 56ae68d..92040ba 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.c
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.c
@@ -374,3 +374,22 @@ fs_stream_transmitter_select_candidate_pair (
 
   return FALSE;
 }
+
+
+/**
+ * fs_stream_transmitter_emit_error:
+ * @streamtransmitter: #FsStreamTransmitter on which to emit the error signal
+ * @error_no: The number of the error
+ * @error_msg: Error message to be displayed to user
+ * @debug_msg: Debugging error message
+ *
+ * This function emit the "error" signal on a #FsStreamTransmitter, it should
+ * only be called by subclasses.
+ */
+void
+fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter,
+  gint error_no, gchar *error_msg, gchar *debug_msg)
+{
+  g_signal_emit (streamtransmitter, signals[ERROR], 0, error_no, error_msg,
+    debug_msg);
+}
diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.h b/gst-libs/gst/farsight/fs-stream-transmitter.h
index 39abc5d..e4d823d 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.h
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.h
@@ -109,6 +109,9 @@ gboolean fs_stream_transmitter_select_candidate_pair (
     FsStreamTransmitter *streamtransmitter, gchar *lfoundation,
     gchar *rfoundation, GError **error);
 
+void fs_stream_transmitter_emit_error (FsStreamTransmitter *streamtransmitter,
+  gint error_no, gchar *error_msg, gchar *debug_msg);
+
 
 G_END_DECLS
 
-- 
1.5.6.5




More information about the farsight-commits mailing list