[farsight2/master] Add a GError** to the new_participant method

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


---
 gst-libs/gst/farsight/fs-base-conference.c  |    8 +++++---
 gst-libs/gst/farsight/fs-base-conference.h  |    3 ++-
 gst-libs/gst/farsight/fs-conference-iface.c |    6 ++++--
 gst-libs/gst/farsight/fs-conference-iface.h |    6 ++++--
 gst/fsrtpconference/fs-rtp-conference.c     |    6 ++++--
 5 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/gst-libs/gst/farsight/fs-base-conference.c b/gst-libs/gst/farsight/fs-base-conference.c
index a61f6d9..bc43520 100644
--- a/gst-libs/gst/farsight/fs-base-conference.c
+++ b/gst-libs/gst/farsight/fs-base-conference.c
@@ -129,7 +129,8 @@ static FsSession *fs_base_conference_new_session (FsConference *conf,
                                                   FsMediaType media_type,
                                                   GError **error);
 static FsParticipant *fs_base_conference_new_participant (FsConference *conf,
-                                                          gchar *cname);
+    gchar *cname,
+    GError **error);
 
 void fs_base_conference_error (GObject *signal_src, GObject *error_src,
                                gint error_no, gchar *error_msg,
@@ -304,13 +305,14 @@ fs_base_conference_get_property (GObject *object, guint prop_id,
 
 static FsParticipant *
 fs_base_conference_new_participant (FsConference *conf,
-                                    gchar *cname)
+    gchar *cname,
+    GError **error)
 {
   FsBaseConference *baseconf = FS_BASE_CONFERENCE (conf);
   FsBaseConferenceClass *klass = FS_BASE_CONFERENCE_GET_CLASS (conf);
 
   if (klass->new_participant) {
-    return klass->new_participant (baseconf, cname);
+    return klass->new_participant (baseconf, cname, error);
   } else {
     GST_WARNING_OBJECT (conf, "new_session not defined in element");
   }
diff --git a/gst-libs/gst/farsight/fs-base-conference.h b/gst-libs/gst/farsight/fs-base-conference.h
index b4d4729..2fcc720 100644
--- a/gst-libs/gst/farsight/fs-base-conference.h
+++ b/gst-libs/gst/farsight/fs-base-conference.h
@@ -92,7 +92,8 @@ struct _FsBaseConferenceClass
                              FsMediaType media_type,
                              GError **error);
   FsParticipant *(*new_participant) (FsBaseConference *conference,
-                                     gchar *cname);
+      gchar *cname,
+      GError **error);
 
   /*< private >*/
 
diff --git a/gst-libs/gst/farsight/fs-conference-iface.c b/gst-libs/gst/farsight/fs-conference-iface.c
index 83c5ccd..9750d15 100644
--- a/gst-libs/gst/farsight/fs-conference-iface.c
+++ b/gst-libs/gst/farsight/fs-conference-iface.c
@@ -118,6 +118,7 @@ fs_conference_new_session (FsConference *conference, FsMediaType media_type,
  * fs_conference_new_participant
  * @conference: #FsConference interface of a #GstElement
  * @cname: The cname of the participant
+ * @error: location of a #GError, or NULL if no error occured
  *
  * Create a new Farsight Participant for the type of the given conference.
  *
@@ -125,13 +126,14 @@ fs_conference_new_session (FsConference *conference, FsMediaType media_type,
  * is owned by the user and he must unref it when he is done with it.
  */
 FsParticipant *
-fs_conference_new_participant (FsConference *conference, gchar *cname)
+fs_conference_new_participant (FsConference *conference, gchar *cname,
+    GError **error)
 {
   FsConferenceInterface *iface =
       FS_CONFERENCE_GET_IFACE (conference);
 
   if (iface->new_session) {
-    return iface->new_participant (conference, cname);
+    return iface->new_participant (conference, cname, error);
   } else {
     GST_WARNING_OBJECT (conference, "new_participant not defined in element");
   }
diff --git a/gst-libs/gst/farsight/fs-conference-iface.h b/gst-libs/gst/farsight/fs-conference-iface.h
index d96e1c1..fbd9dca 100644
--- a/gst-libs/gst/farsight/fs-conference-iface.h
+++ b/gst-libs/gst/farsight/fs-conference-iface.h
@@ -68,7 +68,8 @@ struct _FsConferenceInterface {
                               GError **error);
 
   FsParticipant *(* new_participant) (FsConference *conference,
-                                      gchar *cname);
+      gchar *cname,
+      GError **error);
 
   /*< private > */
   gpointer _gst_reserved[GST_PADDING];
@@ -120,7 +121,8 @@ FsSession *fs_conference_new_session (FsConference *conference,
                                       GError **error);
 
 FsParticipant *fs_conference_new_participant (FsConference *conference,
-                                              gchar *cname);
+    gchar *cname,
+    GError **error);
 
 
 G_END_DECLS
diff --git a/gst/fsrtpconference/fs-rtp-conference.c b/gst/fsrtpconference/fs-rtp-conference.c
index 709c429..b965f60 100644
--- a/gst/fsrtpconference/fs-rtp-conference.c
+++ b/gst/fsrtpconference/fs-rtp-conference.c
@@ -99,7 +99,8 @@ static FsSession *fs_rtp_conference_new_session (FsBaseConference *conf,
                                                  FsMediaType media_type,
                                                  GError **error);
 static FsParticipant *fs_rtp_conference_new_participant (FsBaseConference *conf,
-                                                         gchar *cname);
+    gchar *cname,
+    GError **error);
 
 static FsRtpSession *fs_rtp_conference_get_session_by_id_locked (
     FsRtpConference *self, guint session_id);
@@ -376,7 +377,8 @@ fs_rtp_conference_new_session (FsBaseConference *conf,
 
 static FsParticipant *
 fs_rtp_conference_new_participant (FsBaseConference *conf,
-                                   gchar *cname)
+    gchar *cname,
+    GError **error)
 {
   FsParticipant *new_participant = NULL;
 
-- 
1.5.6.5




More information about the farsight-commits mailing list