[farsight2/master] Select candidate pair now takes const arguments

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


---
 gst-libs/gst/farsight/fs-stream-transmitter.c |   14 ++++++++------
 gst-libs/gst/farsight/fs-stream-transmitter.h |   11 +++++++----
 gst-libs/gst/farsight/fs-stream.c             |   16 ++++++++++------
 gst-libs/gst/farsight/fs-stream.h             |   12 ++++++++----
 gst/fsrtpconference/fs-rtp-stream.c           |   19 +++++++++++--------
 5 files changed, 44 insertions(+), 28 deletions(-)

diff --git a/gst-libs/gst/farsight/fs-stream-transmitter.c b/gst-libs/gst/farsight/fs-stream-transmitter.c
index 7495d85..954feff 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.c
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.c
@@ -326,8 +326,8 @@ fs_stream_transmitter_remote_candidates_added (
 /**
  * fs_stream_transmitter_select_candidate_pair:
  * @streamtransmitter: a #FsStreamTransmitter
- * @lfoundation: The foundation of the local candidate to be selected
- * @rfoundation: The foundation of the remote candidate to be selected
+ * @local_foundation: The foundation of the local candidates to be selected
+ * @remote_foundation: The foundation of the remote candidates to be selected
  * @error: location of a #GErrorh, or NULL if no error occured
  *
  * This function selects one pair of candidates to be selected to start
@@ -338,15 +338,17 @@ fs_stream_transmitter_remote_candidates_added (
 
 gboolean
 fs_stream_transmitter_select_candidate_pair (
-    FsStreamTransmitter *streamtransmitter, gchar *lfoundation,
-    gchar *rfoundation, GError **error)
+    FsStreamTransmitter *streamtransmitter,
+    const gchar *local_foundation,
+    const gchar *remote_foundation,
+    GError **error)
 {
   FsStreamTransmitterClass *klass =
     FS_STREAM_TRANSMITTER_GET_CLASS (streamtransmitter);
 
   if (klass->select_candidate_pair) {
-    return klass->select_candidate_pair (streamtransmitter, lfoundation, rfoundation,
-    error);
+    return klass->select_candidate_pair (streamtransmitter,
+        local_foundation, remote_foundation, error);
   } else {
     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-transmitter.h b/gst-libs/gst/farsight/fs-stream-transmitter.h
index f8aed8c..0004c41 100644
--- a/gst-libs/gst/farsight/fs-stream-transmitter.h
+++ b/gst-libs/gst/farsight/fs-stream-transmitter.h
@@ -76,8 +76,9 @@ struct _FsStreamTransmitterClass
   void (*remote_candidates_added) (FsStreamTransmitter *streamtransmitter);
 
   gboolean (*select_candidate_pair) (FsStreamTransmitter *streamtransmitter,
-                                     gchar *lfoundation, gchar *rfoundation,
-                                     GError **error);
+      const gchar *local_foundation,
+      const gchar *remote_foundation,
+      GError **error);
   gboolean (*gather_local_candidates) (FsStreamTransmitter *streamtransmitter,
                                        GError **error);
 
@@ -109,8 +110,10 @@ void fs_stream_transmitter_remote_candidates_added (
     FsStreamTransmitter *streamtransmitter);
 
 gboolean fs_stream_transmitter_select_candidate_pair (
-    FsStreamTransmitter *streamtransmitter, gchar *lfoundation,
-    gchar *rfoundation, GError **error);
+    FsStreamTransmitter *streamtransmitter,
+    const gchar *local_foundation,
+    const gchar *remote_foundation,
+    GError **error);
 
 gboolean
 fs_stream_transmitter_gather_local_candidates (
diff --git a/gst-libs/gst/farsight/fs-stream.c b/gst-libs/gst/farsight/fs-stream.c
index 9780e11..64c9c12 100644
--- a/gst-libs/gst/farsight/fs-stream.c
+++ b/gst-libs/gst/farsight/fs-stream.c
@@ -396,8 +396,8 @@ fs_stream_remote_candidates_added (FsStream *stream)
 /**
  * fs_stream_select_candidate_pair:
  * @stream: a #FsStream
- * @lfoundation: The foundation of the local candidate to be selected
- * @rfoundation: The foundation of the remote candidate to be selected
+ * @local_foundation: The foundation of the local candidates to be selected
+ * @rremote_foundation: The foundation of the remote candidates to be selected
  * @error: location of a #GError, or %NULL if no error occured
  *
  * This function selects one pair of candidates to be selected to start
@@ -407,14 +407,18 @@ fs_stream_remote_candidates_added (FsStream *stream)
  */
 
 gboolean
-fs_stream_select_candidate_pair (FsStream *stream, gchar *lfoundation,
-                                 gchar *rfoundation, GError **error)
+fs_stream_select_candidate_pair (FsStream *stream,
+    const gchar *local_foundation,
+    const gchar *remote_foundation,
+    GError **error)
 {
   FsStreamClass *klass = FS_STREAM_GET_CLASS (stream);
 
   if (klass->select_candidate_pair) {
-    return klass->select_candidate_pair (stream, lfoundation, rfoundation,
-    error);
+    return klass->select_candidate_pair (stream,
+        local_foundation,
+        remote_foundation,
+        error);
   } else {
     g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
       "select_candidate_pair not defined in class");
diff --git a/gst-libs/gst/farsight/fs-stream.h b/gst-libs/gst/farsight/fs-stream.h
index e788403..216108e 100644
--- a/gst-libs/gst/farsight/fs-stream.h
+++ b/gst-libs/gst/farsight/fs-stream.h
@@ -94,8 +94,10 @@ struct _FsStreamClass
 
   void (*remote_candidates_added) (FsStream *stream);
 
-  gboolean (*select_candidate_pair) (FsStream *stream, gchar *lfoundation,
-                                     gchar *rfoundation, GError **error);
+  gboolean (*select_candidate_pair) (FsStream *stream,
+      const gchar *local_foundation,
+      const gchar *remote_foundation,
+      GError **error);
 
   gboolean (*set_remote_codecs) (FsStream *stream,
                                  GList *remote_codecs, GError **error);
@@ -128,8 +130,10 @@ gboolean fs_stream_add_remote_candidate (FsStream *stream,
 
 void fs_stream_remote_candidates_added (FsStream *stream);
 
-gboolean fs_stream_select_candidate_pair (FsStream *stream, gchar *lfoundation,
-                                          gchar *rfoundation, GError **error);
+gboolean fs_stream_select_candidate_pair (FsStream *stream,
+    const gchar *local_foundation,
+    const gchar *remote_foundation,
+    GError **error);
 
 gboolean fs_stream_set_remote_codecs (FsStream *stream,
                                       GList *remote_codecs, GError **error);
diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
index 78d482c..5850ab8 100644
--- a/gst/fsrtpconference/fs-rtp-stream.c
+++ b/gst/fsrtpconference/fs-rtp-stream.c
@@ -103,9 +103,9 @@ static gboolean fs_rtp_stream_add_remote_candidate (FsStream *stream,
                                                     GError **error);
 static void fs_rtp_stream_remote_candidates_added (FsStream *stream);
 static gboolean fs_rtp_stream_select_candidate_pair (FsStream *stream,
-                                                     gchar *lfoundation,
-                                                     gchar *rfoundatihon,
-                                                     GError **error);
+    const gchar *local_foundation,
+    const gchar *remote_foundatihon,
+    GError **error);
 
 static gboolean fs_rtp_stream_set_remote_codecs (FsStream *stream,
                                                  GList *remote_codecs,
@@ -455,8 +455,8 @@ fs_rtp_stream_remote_candidates_added (FsStream *stream)
 /**
  * fs_rtp_stream_select_candidate_pair:
  * @stream: a #FsStream
- * @lfoundation: The foundation of the local candidate to be selected
- * @rfoundation: The foundation of the remote candidate to be selected
+ * @local_foundation: The foundation of the local candidates to be selected
+ * @remote_foundation: The foundation of the remote candidates to be selected
  * @error: location of a #GError, or NULL if no error occured
  *
  * This function selects one pair of candidates to be selected to start
@@ -466,13 +466,16 @@ fs_rtp_stream_remote_candidates_added (FsStream *stream)
  */
 
 static gboolean
-fs_rtp_stream_select_candidate_pair (FsStream *stream, gchar *lfoundation,
-                                     gchar *rfoundation, GError **error)
+fs_rtp_stream_select_candidate_pair (FsStream *stream,
+    const gchar *local_foundation,
+    const gchar *remote_foundation,
+    GError **error)
 {
   FsRtpStream *self = FS_RTP_STREAM (stream);
 
   return fs_stream_transmitter_select_candidate_pair (
-      self->priv->stream_transmitter, lfoundation, rfoundation, error);
+      self->priv->stream_transmitter, local_foundation, remote_foundation,
+      error);
 }
 
 
-- 
1.5.6.5




More information about the farsight-commits mailing list