[farsight2/master] Add fs_stream_emit_error function

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


---
 docs/libs/farsight-libs-sections.txt |    1 +
 gst-libs/gst/farsight/fs-session.c   |    2 +-
 gst-libs/gst/farsight/fs-stream.c    |   18 ++++++++++++++++++
 gst-libs/gst/farsight/fs-stream.h    |    3 +++
 4 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
index 26ab6ee..cc420eb 100644
--- a/docs/libs/farsight-libs-sections.txt
+++ b/docs/libs/farsight-libs-sections.txt
@@ -26,6 +26,7 @@ FsStreamError
 fs_stream_add_remote_candidate
 fs_stream_preload_recv_codec
 fs_stream_set_remote_codecs
+fs_stream_emit_error
 <SUBSECTION Standard>
 FS_TYPE_STREAM_DIRECTION
 FS_STREAM
diff --git a/gst-libs/gst/farsight/fs-session.c b/gst-libs/gst/farsight/fs-session.c
index 8d5f3cc..ebb4da1 100644
--- a/gst-libs/gst/farsight/fs-session.c
+++ b/gst-libs/gst/farsight/fs-session.c
@@ -561,5 +561,5 @@ fs_session_emit_error (FsSession *session, gint error_no,
                        gchar *error_msg, gchar *debug_msg)
 {
   g_signal_emit (session, signals[ERROR], 0, session, error_no, error_msg,
-                 debug_msg, NULL);
+                 debug_msg);
 }
diff --git a/gst-libs/gst/farsight/fs-stream.c b/gst-libs/gst/farsight/fs-stream.c
index 774cc9d..306af24 100644
--- a/gst-libs/gst/farsight/fs-stream.c
+++ b/gst-libs/gst/farsight/fs-stream.c
@@ -551,3 +551,21 @@ fs_stream_set_remote_codecs (FsStream *stream,
 
   return FALSE;
 }
+
+
+/**
+ * fs_stream_emit_error:
+ * @stream: #FsStream 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 #FsStream, it should only be
+ * called by subclasses.
+ */
+void
+fs_stream_emit_error (FsStream *stream, gint error_no,
+                      gchar *error_msg, gchar *debug_msg)
+{
+  g_signal_emit (stream, signals[ERROR], 0, error_no, error_msg, debug_msg);
+}
diff --git a/gst-libs/gst/farsight/fs-stream.h b/gst-libs/gst/farsight/fs-stream.h
index b5b5b39..047c229 100644
--- a/gst-libs/gst/farsight/fs-stream.h
+++ b/gst-libs/gst/farsight/fs-stream.h
@@ -142,6 +142,9 @@ gboolean fs_stream_preload_recv_codec (FsStream *stream, FsCodec *codec,
 gboolean fs_stream_set_remote_codecs (FsStream *stream,
                                       GList *remote_codecs, GError **error);
 
+void fs_stream_emit_error (FsStream *stream, gint error_no,
+                           gchar *error_msg, gchar *debug_msg);
+
 G_END_DECLS
 
 #endif /* __FS_STREAM_H__ */
-- 
1.5.6.5




More information about the farsight-commits mailing list