[farsight2/master] Merge FS_STREAM_ERROR and FS_SESSION_ERROR in FS_ERROR (they are the same errors)
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:19:27 PST 2008
---
docs/libs/farsight-libs-sections.txt | 9 +--
gst-libs/gst/farsight/fs-base-conference.c | 2 +-
gst-libs/gst/farsight/fs-conference-iface.c | 8 ++
gst-libs/gst/farsight/fs-conference-iface.h | 35 +++++++++
gst-libs/gst/farsight/fs-plugin.c | 10 ++--
gst-libs/gst/farsight/fs-session.c | 12 +---
gst-libs/gst/farsight/fs-session.h | 24 -------
gst-libs/gst/farsight/fs-stream-transmitter.c | 6 +-
gst-libs/gst/farsight/fs-stream.c | 19 ++---
gst-libs/gst/farsight/fs-stream.h | 29 --------
gst-libs/gst/farsight/fs-transmitter.c | 4 +-
gst/fsrtpconference/fs-rtp-session.c | 54 +++++++-------
gst/fsrtpconference/fs-rtp-stream.c | 4 +-
transmitters/rawudp/fs-rawudp-stream-transmitter.c | 26 ++++----
transmitters/rawudp/fs-rawudp-transmitter.c | 73 ++++++++++----------
15 files changed, 145 insertions(+), 170 deletions(-)
diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
index d7559bc..d1021cd 100644
--- a/docs/libs/farsight-libs-sections.txt
+++ b/docs/libs/farsight-libs-sections.txt
@@ -21,8 +21,6 @@ FsParticipantPrivate
FsStream
FsStreamClass
FsStreamDirection
-FS_STREAM_ERROR
-FsStreamError
fs_stream_add_remote_candidate
fs_stream_remote_candidates_added
fs_stream_select_candidate_pair
@@ -40,7 +38,6 @@ FS_IS_STREAM_CLASS
FS_STREAM_GET_CLASS
FS_STREAM_CAST
FsStreamPrivate
-fs_stream_error_quark
</SECTION>
<SECTION>
@@ -50,8 +47,6 @@ FsDTMFMethod
<TITLE>FsSession</TITLE>
FsSession
FsSessionClass
-FS_SESSION_ERROR
-FsSessionError
fs_session_new_stream
fs_session_start_telephony_event
fs_session_stop_telephony_event
@@ -67,7 +62,6 @@ FS_SESSION_CLASS
FS_IS_SESSION_CLASS
FS_SESSION_GET_CLASS
FsSessionPrivate
-fs_session_error_quark
</SECTION>
<SECTION>
@@ -76,6 +70,8 @@ fs_session_error_quark
FsConferenceInterface
fs_conference_new_session
fs_conference_new_participant
+FS_ERROR
+FsError
<SUBSECTION Standard>
FS_CONFERENCE
FS_IS_CONFERENCE
@@ -83,6 +79,7 @@ FS_TYPE_CONFERENCE
fs_conference_get_type
FS_CONFERENCE_GET_IFACE
FsConference
+fs_error_quark
</SECTION>
<SECTION>
diff --git a/gst-libs/gst/farsight/fs-base-conference.c b/gst-libs/gst/farsight/fs-base-conference.c
index 25963c6..eda758f 100644
--- a/gst-libs/gst/farsight/fs-base-conference.c
+++ b/gst-libs/gst/farsight/fs-base-conference.c
@@ -257,7 +257,7 @@ fs_base_conference_new_session (FsConference *conf,
base_conf);
} else {
GST_WARNING_OBJECT (conf, "new_session not defined in element");
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"new_session not defined in element");
}
diff --git a/gst-libs/gst/farsight/fs-conference-iface.c b/gst-libs/gst/farsight/fs-conference-iface.c
index 62d0ef7..1cb64b3 100644
--- a/gst-libs/gst/farsight/fs-conference-iface.c
+++ b/gst-libs/gst/farsight/fs-conference-iface.c
@@ -71,6 +71,14 @@ fs_conference_get_type (void)
return fs_conference_type;
}
+
+GQuark
+fs_error_quark (void)
+{
+ return g_quark_from_static_string ("fs-error");
+}
+
+
static void
fs_conference_iface_init (FsConferenceInterface * iface)
{
diff --git a/gst-libs/gst/farsight/fs-conference-iface.h b/gst-libs/gst/farsight/fs-conference-iface.h
index c07e347..17c1f72 100644
--- a/gst-libs/gst/farsight/fs-conference-iface.h
+++ b/gst-libs/gst/farsight/fs-conference-iface.h
@@ -76,6 +76,38 @@ struct _FsConferenceInterface {
GType fs_conference_get_type (void);
+
+
+/**
+ * FsError:
+ * @FS_ERROR_CONSTRUCTION: Error constructing some of the sub-elements
+ * @FS_ERROR_INVALID_ARGUMENTS: Invalid arguments to the function
+ * @FS_ERROR_NETWORK: A network related error
+ * @FS_ERROR_NOT_IMPLEMENTED: This functionality is not implemented
+ * by this plugins
+ *
+ * This is the enum of error numbers that will come either on the "error"
+ * signal or from the Gst Bus.
+ */
+
+typedef enum {
+ FS_ERROR_CONSTRUCTION,
+ FS_ERROR_INVALID_ARGUMENTS,
+ FS_ERROR_NETWORK,
+ FS_ERROR_NOT_IMPLEMENTED
+} FsError;
+
+/**
+ * FS_ERROR:
+ *
+ * This quark is used to denote errors coming from Farsight objects
+ */
+
+#define FS_ERROR (fs_error_quark ())
+
+GQuark fs_error_quark (void);
+
+
/* virtual class function wrappers */
FsSession *fs_conference_new_session (FsConference *conference,
FsMediaType media_type,
@@ -84,6 +116,9 @@ FsSession *fs_conference_new_session (FsConference *conference,
FsParticipant *fs_conference_new_participant (FsConference *conference,
gchar *cname);
+
G_END_DECLS
#endif /* __FS_CONFERENCE_H__ */
+
+
diff --git a/gst-libs/gst/farsight/fs-plugin.c b/gst-libs/gst/farsight/fs-plugin.c
index 6bdbbb2..e3222ca 100644
--- a/gst-libs/gst/farsight/fs-plugin.c
+++ b/gst-libs/gst/farsight/fs-plugin.c
@@ -31,7 +31,7 @@
#include "fs-plugin.h"
-#include <gst/farsight/fs-stream.h>
+#include "fs-conference-iface.h"
#include <string.h>
@@ -304,12 +304,12 @@ fs_plugin_create_valist (const gchar *name, const gchar *type_suffix,
FsPlugin *plugin;
if (name == NULL) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"You need to pass a name");
return NULL;
}
if (type_suffix == NULL) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"You need to pass a type suffix");
return NULL;
}
@@ -319,7 +319,7 @@ fs_plugin_create_valist (const gchar *name, const gchar *type_suffix,
if (!plugin) {
plugin = g_object_new (FS_TYPE_PLUGIN, NULL);
if (!plugin) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not create a fsplugin object");
return NULL;
}
@@ -329,7 +329,7 @@ fs_plugin_create_valist (const gchar *name, const gchar *type_suffix,
}
if (!g_type_module_use (G_TYPE_MODULE (plugin))) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not load the %s-%s transmitter plugin", name, type_suffix);
return NULL;
}
diff --git a/gst-libs/gst/farsight/fs-session.c b/gst-libs/gst/farsight/fs-session.c
index d08203e..80b382b 100644
--- a/gst-libs/gst/farsight/fs-session.c
+++ b/gst-libs/gst/farsight/fs-session.c
@@ -40,6 +40,7 @@
#include "config.h"
#endif
+#include "fs-conference-iface.h"
#include "fs-session.h"
#include "fs-codec.h"
#include "fs-marshal.h"
@@ -95,13 +96,6 @@ static void fs_session_set_property (GObject *object,
static GObjectClass *parent_class = NULL;
static guint signals[LAST_SIGNAL] = { 0 };
-GQuark
-fs_session_error_quark (void)
-{
- return g_quark_from_static_string ("fs-session-error");
-}
-
-
GType
fs_session_get_type (void)
{
@@ -449,7 +443,7 @@ fs_session_new_stream (FsSession *session, FsParticipant *participant,
g_object_weak_ref (G_OBJECT (new_stream), (GWeakNotify)_remove_stream_ptr,
session);
} else {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"new_stream not defined for %s", G_OBJECT_TYPE_NAME (session));
}
return new_stream;
@@ -537,7 +531,7 @@ fs_session_set_send_codec (FsSession *session, FsCodec *send_codec,
if (klass->set_send_codec) {
return klass->set_send_codec (session, send_codec, error);
} else {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"set_send_codec not defined in class");
}
return FALSE;
diff --git a/gst-libs/gst/farsight/fs-session.h b/gst-libs/gst/farsight/fs-session.h
index dfa5337..3f9ecf1 100644
--- a/gst-libs/gst/farsight/fs-session.h
+++ b/gst-libs/gst/farsight/fs-session.h
@@ -100,30 +100,6 @@ typedef enum
} FsDTMFMethod;
/**
- * FsSessionError:
- * @FS_SESSION_ERROR_CONSTRUCTION: Error constructing some of the sub-elements
- * @FS_SESSION_ERROR_NOT_IMPLEMENTED: This functionality is not implemented
- *
- * This is the enum of error numbers that will come either on the "error" signal
- * or from the Gst Bus.
- */
-
-typedef enum {
- FS_SESSION_ERROR_CONSTRUCTION,
- FS_SESSION_ERROR_NOT_IMPLEMENTED
-} FsSessionError;
-
-/**
- * FS_SESSION_ERROR
- *
- * This quark is used to denote errors coming from the #FsSession object
- */
-
-#define FS_SESSION_ERROR (fs_session_error_quark ())
-
-GQuark fs_session_error_quark (void);
-
-/**
* FsSessionClass:
* @parent_class: Our parent
* @new_stream: Create a new #FsStream
diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.c b/gst-libs/gst/farsight/fs-stream-transmitter.c
index 9fc188d..56ae68d 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.c
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.c
@@ -41,7 +41,7 @@
#include "fs-marshal.h"
#include "fs-stream-transmitter.h"
-#include "fs-stream.h"
+#include "fs-conference-iface.h"
#include <gst/gst.h>
@@ -313,7 +313,7 @@ fs_stream_transmitter_add_remote_candidate (
if (klass->add_remote_candidate) {
return klass->add_remote_candidate (streamtransmitter, candidate, error);
} else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"add_remote_candidate not defined in stream transmitter class");
}
@@ -368,7 +368,7 @@ fs_stream_transmitter_select_candidate_pair (
return klass->select_candidate_pair (streamtransmitter, lfoundation, rfoundation,
error);
} else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"select_candidate_pair not defined in stream transmitter class");
}
diff --git a/gst-libs/gst/farsight/fs-stream.c b/gst-libs/gst/farsight/fs-stream.c
index c9c2b3e..0b1b671 100644
--- a/gst-libs/gst/farsight/fs-stream.c
+++ b/gst-libs/gst/farsight/fs-stream.c
@@ -38,12 +38,14 @@
#include "config.h"
#endif
-#include "fs-session.h"
#include "fs-stream.h"
+
+#include "fs-session.h"
#include "fs-marshal.h"
#include "fs-codec.h"
#include "fs-candidate.h"
#include "fs-stream-transmitter.h"
+#include "fs-conference-iface.h"
#include <gst/gst.h>
@@ -101,13 +103,6 @@ static void fs_stream_set_property (GObject *object,
static GObjectClass *parent_class = NULL;
static guint signals[LAST_SIGNAL] = { 0 };
-GQuark
-fs_stream_error_quark (void)
-{
- return g_quark_from_static_string ("fs-stream-error");
-}
-
-
GType
fs_stream_get_type (void)
{
@@ -485,7 +480,7 @@ fs_stream_add_remote_candidate (FsStream *stream, FsCandidate *candidate,
if (klass->add_remote_candidate) {
return klass->add_remote_candidate (stream, candidate, error);
} else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"add_remote_candidate not defined in class");
}
@@ -535,7 +530,7 @@ fs_stream_select_candidate_pair (FsStream *stream, gchar *lfoundation,
return klass->select_candidate_pair (stream, lfoundation, rfoundation,
error);
} else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"select_candidate_pair not defined in class");
}
@@ -564,7 +559,7 @@ fs_stream_preload_recv_codec (FsStream *stream, FsCodec *codec, GError **error)
if (klass->preload_recv_codec) {
return klass->preload_recv_codec (stream, codec, error);
} else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"preload_recv_codec not defined in class");
}
@@ -594,7 +589,7 @@ fs_stream_set_remote_codecs (FsStream *stream,
if (klass->set_remote_codecs) {
return klass->set_remote_codecs (stream, remote_codecs, error);
} else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"set_remote_codecs not defined in class");
}
diff --git a/gst-libs/gst/farsight/fs-stream.h b/gst-libs/gst/farsight/fs-stream.h
index 05fa09e..649378e 100644
--- a/gst-libs/gst/farsight/fs-stream.h
+++ b/gst-libs/gst/farsight/fs-stream.h
@@ -74,35 +74,6 @@ typedef struct _FsStreamPrivate FsStreamPrivate;
/**
- * FsStreamError:
- * @FS_STREAM_ERROR_CONSTRUCTION: Error constructing some of the sub-elements
- * @FS_STREAM_ERROR_INVALID_ARGUMENTS: Invalid arguments to the function
- * @FS_STREAM_ERROR_NETWORK: A network related error
- * @FS_STREAM_ERROR_NOT_IMPLEMENTED: This functionality is not implemented
- * by this plugins
- *
- * This is the enum of error numbers that will come either on the "error" signal
- * or from the Gst Bus.
- */
-
-typedef enum {
- FS_STREAM_ERROR_CONSTRUCTION,
- FS_STREAM_ERROR_INVALID_ARGUMENTS,
- FS_STREAM_ERROR_NETWORK,
- FS_STREAM_ERROR_NOT_IMPLEMENTED
-} FsStreamError;
-
-/**
- * FS_STREAM_ERROR:
- *
- * This quark is used to denote errors coming from the #FsStream object
- */
-
-#define FS_STREAM_ERROR (fs_stream_error_quark ())
-
-GQuark fs_stream_error_quark (void);
-
-/**
* FsStreamClass:
* @parent_class: Our parent
* @add_remote_candidate: Adds a remote candidate
diff --git a/gst-libs/gst/farsight/fs-transmitter.c b/gst-libs/gst/farsight/fs-transmitter.c
index dcd5a28..d47ac83 100644
--- a/gst-libs/gst/farsight/fs-transmitter.c
+++ b/gst-libs/gst/farsight/fs-transmitter.c
@@ -43,7 +43,7 @@
#include "fs-plugin.h"
-#include "fs-stream.h"
+#include "fs-conference-iface.h"
#include <gst/gst.h>
@@ -261,7 +261,7 @@ fs_transmitter_new_stream_transmitter (FsTransmitter *transmitter,
return klass->new_stream_transmitter (transmitter, participant,
n_parameters, parameters, error);
} else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NOT_IMPLEMENTED,
+ g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
"new_stream_transmitter not defined in class");
}
diff --git a/gst/fsrtpconference/fs-rtp-session.c b/gst/fsrtpconference/fs-rtp-session.c
index d77e062..f8f3f47 100644
--- a/gst/fsrtpconference/fs-rtp-session.c
+++ b/gst/fsrtpconference/fs-rtp-session.c
@@ -369,15 +369,15 @@ fs_rtp_session_constructed (GObject *object)
g_free (tmp);
if (!valve) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not create the fsvalve element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->conference), valve)) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the valve element to the FsRtpConference");
gst_object_unref (valve);
return;
@@ -408,15 +408,15 @@ fs_rtp_session_constructed (GObject *object)
g_free (tmp);
if (!tee) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not create the rtp tee element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->conference), tee)) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the rtp tee element to the FsRtpConference");
gst_object_unref (tee);
return;
@@ -434,15 +434,15 @@ fs_rtp_session_constructed (GObject *object)
g_free (tmp);
if (!tee) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not create the rtcp tee element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->conference), tee)) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the rtcp tee element to the FsRtpConference");
gst_object_unref (tee);
return;
@@ -460,15 +460,15 @@ fs_rtp_session_constructed (GObject *object)
g_free (tmp);
if (!funnel) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not create the rtp funnel element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->conference), funnel)) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the rtp funnel element to the FsRtpConference");
gst_object_unref (funnel);
return;
@@ -487,8 +487,8 @@ fs_rtp_session_constructed (GObject *object)
ret = gst_pad_link (funnel_src_pad, self->priv->rtpbin_recv_rtp_sink);
if (GST_PAD_LINK_FAILED (ret)) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not link pad %s (%p) with pad %s (%p)",
GST_PAD_NAME (funnel_src_pad), GST_PAD_CAPS (funnel_src_pad),
GST_PAD_NAME (self->priv->rtpbin_recv_rtp_sink),
@@ -510,15 +510,15 @@ fs_rtp_session_constructed (GObject *object)
g_free (tmp);
if (!funnel) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not create the rtcp funnel element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->conference), funnel)) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the rtcp funnel element to the FsRtcpConference");
gst_object_unref (funnel);
return;
@@ -537,8 +537,8 @@ fs_rtp_session_constructed (GObject *object)
ret = gst_pad_link (funnel_src_pad, self->priv->rtpbin_recv_rtcp_sink);
if (GST_PAD_LINK_FAILED (ret)) {
- self->priv->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ self->priv->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not link pad %s (%p) with pad %s (%p)",
GST_PAD_NAME (funnel_src_pad), GST_PAD_CAPS (funnel_src_pad),
GST_PAD_NAME (self->priv->rtpbin_recv_rtcp_sink),
@@ -578,7 +578,7 @@ fs_rtp_session_new_stream (FsSession *session, FsParticipant *participant,
FsStream *new_stream = NULL;
if (!FS_IS_RTP_PARTICIPANT (participant)) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"You have to provide a participant of type RTP");
return NULL;
}
@@ -707,7 +707,7 @@ fs_rtp_session_link_network_sink (FsRtpSession *session, GstPad *src_pad)
GST_PAD_NAME (src_pad), GST_PAD_CAPS (src_pad),
GST_PAD_NAME (transmitter_rtp_tee_sink_pad),
GST_PAD_CAPS (transmitter_rtp_tee_sink_pad));
- fs_session_emit_error (FS_SESSION (session), FS_SESSION_ERROR_CONSTRUCTION,
+ fs_session_emit_error (FS_SESSION (session), FS_ERROR_CONSTRUCTION,
"Could not link rtpbin network src to tee", tmp);
g_free (tmp);
@@ -735,7 +735,7 @@ fs_rtp_session_link_network_sink (FsRtpSession *session, GstPad *src_pad)
GST_PAD_CAPS (session->priv->rtpbin_send_rtcp_src),
GST_PAD_NAME (transmitter_rtcp_tee_sink_pad),
GST_PAD_CAPS (transmitter_rtcp_tee_sink_pad));
- fs_session_emit_error (FS_SESSION (session), FS_SESSION_ERROR_CONSTRUCTION,
+ fs_session_emit_error (FS_SESSION (session), FS_ERROR_CONSTRUCTION,
"Could not link rtpbin network rtcp src to tee", tmp);
g_free (tmp);
diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
index 35f60ea..ad68f8f 100644
--- a/gst/fsrtpconference/fs-rtp-stream.c
+++ b/gst/fsrtpconference/fs-rtp-stream.c
@@ -321,8 +321,8 @@ fs_rtp_stream_constructed (GObject *object)
if (!self->priv->stream_transmitter) {
/* FIXME
- g_error_new (FS_STREAM_ERROR,
- FS_STREAM_ERROR_CONSTRUCTION,
+ g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"The Stream Transmitter has not been set");
*/
return;
diff --git a/transmitters/rawudp/fs-rawudp-stream-transmitter.c b/transmitters/rawudp/fs-rawudp-stream-transmitter.c
index be5457c..68be41f 100644
--- a/transmitters/rawudp/fs-rawudp-stream-transmitter.c
+++ b/transmitters/rawudp/fs-rawudp-stream-transmitter.c
@@ -39,8 +39,8 @@
#include "stun.h"
#include "fs-interfaces.h"
-#include <gst/farsight/fs-stream.h>
#include <gst/farsight/fs-candidate.h>
+#include <gst/farsight/fs-conference-iface.h>
#include <gst/gst.h>
@@ -441,7 +441,7 @@ fs_rawudp_stream_transmitter_build (FsRawUdpStreamTransmitter *self,
FsCandidate *candidate = item->data;
if (candidate->proto != FS_NETWORK_PROTOCOL_UDP) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"You set prefered candidate of a type %d that is not"
" FS_NETWORK_PROTOCOL_UDP",
candidate->proto);
@@ -451,8 +451,8 @@ fs_rawudp_stream_transmitter_build (FsRawUdpStreamTransmitter *self,
switch (candidate->component_id) {
case 1: /* RTP */
if (ip) {
- g_set_error (error, FS_STREAM_ERROR,
- FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR,
+ FS_ERROR_INVALID_ARGUMENTS,
"You set more than one candidate for component 1");
return FALSE;
}
@@ -461,8 +461,8 @@ fs_rawudp_stream_transmitter_build (FsRawUdpStreamTransmitter *self,
break;
case 2: /* RTCP */
if (rtcp_ip) {
- g_set_error (error, FS_STREAM_ERROR,
- FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR,
+ FS_ERROR_INVALID_ARGUMENTS,
"You set more than one candidate for component 2");
return FALSE;
}
@@ -470,7 +470,7 @@ fs_rawudp_stream_transmitter_build (FsRawUdpStreamTransmitter *self,
rtcp_port = candidate->port;
break;
default:
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"Only components 1 and 2 are supported, %d isnt",
candidate->component_id);
return FALSE;
@@ -548,14 +548,14 @@ fs_rawudp_stream_transmitter_add_remote_candidate (
FS_RAWUDP_STREAM_TRANSMITTER (streamtransmitter);
if (candidate->proto != FS_NETWORK_PROTOCOL_UDP) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"You set a candidate of a type %d that is not FS_NETWORK_PROTOCOL_UDP",
candidate->proto);
return FALSE;
}
if (!candidate->ip || !candidate->port) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"The candidate passed does not contain a valid ip or port");
return FALSE;
}
@@ -595,7 +595,7 @@ fs_rawudp_stream_transmitter_add_remote_candidate (
break;
default:
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"Only components 1 and 2 are supported, %d isn't",
candidate->component_id);
return FALSE;
@@ -802,7 +802,7 @@ fs_rawudp_stream_transmitter_start_stun (FsRawUdpStreamTransmitter *self,
else if (component_id == FS_COMPONENT_RTCP)
udpport = self->priv->rtcp_udpport;
else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"Only components RTP(1) and RTCP(2) are support, %u isnt",
component_id);
return FALSE;
@@ -813,7 +813,7 @@ fs_rawudp_stream_transmitter_start_stun (FsRawUdpStreamTransmitter *self,
hints.ai_flags = AI_NUMERICHOST;
retval = getaddrinfo (self->priv->stun_ip, NULL, &hints, &result);
if (retval != 0) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NETWORK,
+ g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
"Invalid IP address %s passed for STUN: %s",
self->priv->stun_ip, gai_strerror (retval));
return FALSE;
@@ -836,7 +836,7 @@ fs_rawudp_stream_transmitter_start_stun (FsRawUdpStreamTransmitter *self,
msg = stun_message_new (STUN_MESSAGE_BINDING_REQUEST,
self->priv->stun_cookie, 0);
if (!msg) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NETWORK,
+ g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
"Could not create a new STUN binding request");
return FALSE;
}
diff --git a/transmitters/rawudp/fs-rawudp-transmitter.c b/transmitters/rawudp/fs-rawudp-transmitter.c
index 476ab97..8e23821 100644
--- a/transmitters/rawudp/fs-rawudp-transmitter.c
+++ b/transmitters/rawudp/fs-rawudp-transmitter.c
@@ -37,8 +37,7 @@
#include "fs-rawudp-transmitter.h"
#include "fs-rawudp-stream-transmitter.h"
-#include <gst/farsight/fs-session.h>
-#include <gst/farsight/fs-stream.h>
+#include <gst/farsight/fs-conference-iface.h>
#include <string.h>
#include <sys/types.h>
@@ -172,8 +171,8 @@ fs_rawudp_transmitter_init (FsRawUdpTransmitter *self)
self->priv->gst_src = gst_element_factory_make ("bin", NULL);
if (!self->priv->gst_src) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not build the transmitter src bin");
return;
}
@@ -183,15 +182,15 @@ fs_rawudp_transmitter_init (FsRawUdpTransmitter *self)
self->priv->udpsrc_funnel = gst_element_factory_make ("fsfunnel", NULL);
if (!self->priv->udpsrc_funnel) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not make the fsfunnel element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->gst_src), self->priv->udpsrc_funnel)) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the fsfunnel element to the transmitter src bin");
}
@@ -207,16 +206,16 @@ fs_rawudp_transmitter_init (FsRawUdpTransmitter *self)
self->priv->udprtcpsrc_funnel = gst_element_factory_make ("fsfunnel", NULL);
if (!self->priv->udprtcpsrc_funnel) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not make the fsfunnnel element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->gst_src),
self->priv->udprtcpsrc_funnel)) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the rtcp fsfunnel element to the transmitter src bin");
}
@@ -233,8 +232,8 @@ fs_rawudp_transmitter_init (FsRawUdpTransmitter *self)
self->priv->gst_sink = gst_element_factory_make ("bin", NULL);
if (!self->priv->gst_sink) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not build the transmitter sink bin");
return;
}
@@ -244,15 +243,15 @@ fs_rawudp_transmitter_init (FsRawUdpTransmitter *self)
self->priv->udpsink_tee = gst_element_factory_make ("tee", NULL);
if (!self->priv->udpsink_tee) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not make the tee element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->gst_sink), self->priv->udpsink_tee)) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the tee element to the transmitter sink bin");
}
@@ -268,16 +267,16 @@ fs_rawudp_transmitter_init (FsRawUdpTransmitter *self)
self->priv->udprtcpsink_tee = gst_element_factory_make ("tee", NULL);
if (!self->priv->udprtcpsink_tee) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not make the fsfunnnel element");
return;
}
if (!gst_bin_add (GST_BIN (self->priv->gst_sink),
self->priv->udprtcpsink_tee)) {
- trans->construction_error = g_error_new (FS_SESSION_ERROR,
- FS_SESSION_ERROR_CONSTRUCTION,
+ trans->construction_error = g_error_new (FS_ERROR,
+ FS_ERROR_CONSTRUCTION,
"Could not add the rtcp tee element to the transmitter sink bin");
}
@@ -418,7 +417,7 @@ _bind_port (const gchar *ip, guint port, guint *used_port, GError **error)
hints.ai_flags = AI_NUMERICHOST;
retval = getaddrinfo (ip, NULL, &hints, &result);
if (retval != 0) {
- *error = g_error_new (FS_STREAM_ERROR, FS_STREAM_ERROR_NETWORK,
+ *error = g_error_new (FS_ERROR, FS_ERROR_NETWORK,
"Invalid IP address %s passed: %s", ip, gai_strerror (retval));
return -1;
}
@@ -432,7 +431,7 @@ _bind_port (const gchar *ip, guint port, guint *used_port, GError **error)
if ((sock = socket (AF_INET, SOCK_DGRAM, 0)) <= 0) {
- *error = g_error_new (FS_STREAM_ERROR, FS_STREAM_ERROR_NETWORK,
+ *error = g_error_new (FS_ERROR, FS_ERROR_NETWORK,
"Error creating socket: %s", g_strerror (errno));
return -1;
}
@@ -447,7 +446,7 @@ _bind_port (const gchar *ip, guint port, guint *used_port, GError **error)
g_debug ("could not bind port %d", port);
port += 2;
if (port > 65535) {
- *error = g_error_new (FS_STREAM_ERROR, FS_STREAM_ERROR_NETWORK,
+ *error = g_error_new (FS_ERROR, FS_ERROR_NETWORK,
"Could not bind the socket to a port");
close (sock);
return -1;
@@ -473,7 +472,7 @@ _create_sinksource (gchar *elementname, GstBin *bin,
elem = gst_element_factory_make (elementname, NULL);
if (!elem) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not create the %s element", elementname);
return NULL;
}
@@ -484,7 +483,7 @@ _create_sinksource (gchar *elementname, GstBin *bin,
NULL);
if (!gst_bin_add (bin, elem)) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not add the %s element to the gst %s bin", elementname,
(direction == GST_PAD_SINK) ? "sink" : "src");
gst_object_unref (elem);
@@ -497,7 +496,7 @@ _create_sinksource (gchar *elementname, GstBin *bin,
*requested_pad = gst_element_get_request_pad (teefunnel, "src%d");
if (!*requested_pad) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not get the %s request pad from the %s",
(direction == GST_PAD_SINK) ? "sink" : "src",
(direction == GST_PAD_SINK) ? "tee" : "funnel");
@@ -514,13 +513,13 @@ _create_sinksource (gchar *elementname, GstBin *bin,
*queue = gst_element_factory_make ("queue", NULL);
if (!*queue) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not create the queue element");
goto error;
}
if (!gst_bin_add (bin, *queue)) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not add the queue element to the gst %s bin",
(direction == GST_PAD_SINK) ? "sink" : "src");
gst_object_unref (*queue);
@@ -533,14 +532,14 @@ _create_sinksource (gchar *elementname, GstBin *bin,
ret = gst_pad_link (*requested_pad, queuesink);
if (GST_PAD_LINK_FAILED(ret)) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not link the new element %s (%d)", elementname, ret);
goto error;
}
if (GST_PAD_LINK_FAILED(ret)) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not link the new queue (%d)", ret);
gst_object_unref (queuesink);
goto error;
@@ -552,7 +551,7 @@ _create_sinksource (gchar *elementname, GstBin *bin,
if (!gst_element_sync_state_with_parent (*queue)) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not sync the state of the new queue with its parent");
goto error;
}
@@ -567,13 +566,13 @@ _create_sinksource (gchar *elementname, GstBin *bin,
gst_object_unref (ourpad);
if (GST_PAD_LINK_FAILED(ret)) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not link the new element %s (%d)", elementname, ret);
goto error;
}
if (!gst_element_sync_state_with_parent (elem)) {
- g_set_error (error, FS_SESSION_ERROR, FS_SESSION_ERROR_CONSTRUCTION,
+ g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
"Could not sync the state of the new %s with its parent",
elementname);
goto error;
@@ -610,7 +609,7 @@ fs_rawudp_transmitter_get_udpport (FsRawUdpTransmitter *trans,
else if (component_id == FS_COMPONENT_RTCP)
udpport_e = g_list_first (trans->priv->rtcp_udpports);
else {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_INVALID_ARGUMENTS,
+ g_set_error (error, FS_ERROR, FS_ERROR_INVALID_ARGUMENTS,
"Invalid component %d", component_id);
return NULL;
}
@@ -765,7 +764,7 @@ fs_rawudp_transmitter_udpport_sendto (UdpPort *udpport,
GError **error)
{
if (sendto (udpport->fd, msg, len, 0, to, tolen) != len) {
- g_set_error (error, FS_STREAM_ERROR, FS_STREAM_ERROR_NETWORK,
+ g_set_error (error, FS_ERROR, FS_ERROR_NETWORK,
"Could not send STUN request: %s", g_strerror (errno));
return FALSE;
}
--
1.5.6.5
More information about the farsight-commits
mailing list