[farsight2/master] Replace select_candidate_pair with force_remote_candidates in FsStream

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


---
 gst-libs/gst/farsight/fs-stream.c |   26 ++++++++++++--------------
 gst-libs/gst/farsight/fs-stream.h |   12 +++++-------
 2 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/gst-libs/gst/farsight/fs-stream.c b/gst-libs/gst/farsight/fs-stream.c
index 9191000..c505286 100644
--- a/gst-libs/gst/farsight/fs-stream.c
+++ b/gst-libs/gst/farsight/fs-stream.c
@@ -406,34 +406,32 @@ fs_stream_set_remote_candidates (FsStream *stream,
 }
 
 /**
- * fs_stream_select_candidate_pair:
+ * fs_stream_force_remote_candidates:
  * @stream: a #FsStream
- * @local_foundation: The foundation of the local candidates to be selected
- * @remote_foundation: The foundation of the remote candidates to be selected
+ * @remote_candidates: a #GList of #FsCandidate to force
  * @error: location of a #GError, or %NULL if no error occured
  *
- * This function selects one pair of candidates to be selected to start
- * sending media on.
+ * This function forces data to be sent immediately to the selected remote
+ * candidate, by-passing any connectivity checks. There should be at most
+ * one candidate per component.
  *
- * Returns: TRUE if the candidate pair could be selected, FALSE otherwise
+ * Returns: %TRUE if the candidates could be forced, %FALSE otherwise
  */
 
 gboolean
-fs_stream_select_candidate_pair (FsStream *stream,
-    const gchar *local_foundation,
-    const gchar *remote_foundation,
+fs_stream_force_remote_candidates (FsStream *stream,
+    GList *remote_candidates,
     GError **error)
 {
   FsStreamClass *klass = FS_STREAM_GET_CLASS (stream);
 
-  if (klass->select_candidate_pair) {
-    return klass->select_candidate_pair (stream,
-        local_foundation,
-        remote_foundation,
+  if (klass->force_remote_candidates) {
+    return klass->force_remote_candidates (stream,
+        remote_candidates,
         error);
   } else {
     g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED,
-      "select_candidate_pair not defined in class");
+      "force_remote_candidates not defined in class");
   }
 
   return FALSE;
diff --git a/gst-libs/gst/farsight/fs-stream.h b/gst-libs/gst/farsight/fs-stream.h
index 97b89d3..c8b200e 100644
--- a/gst-libs/gst/farsight/fs-stream.h
+++ b/gst-libs/gst/farsight/fs-stream.h
@@ -100,7 +100,7 @@ typedef struct _FsStreamPrivate FsStreamPrivate;
  * FsStreamClass:
  * @parent_class: Our parent
  * @set_remote_candidates: Set sthe remote candidates
- * @select_candidate_pair: Select the candidate pair
+ * @force_remote_candidates: Forces certain remote candidates
  * @set_remote_codecs: Sets the list of remote codecs
  *
  * You must override add_remote_candidate in a subclass.
@@ -116,9 +116,8 @@ struct _FsStreamClass
                                      GList *candidates,
                                      GError **error);
 
-  gboolean (*select_candidate_pair) (FsStream *stream,
-      const gchar *local_foundation,
-      const gchar *remote_foundation,
+  gboolean (*force_remote_candidates) (FsStream *stream,
+      GList *remote_candidates,
       GError **error);
 
   gboolean (*set_remote_codecs) (FsStream *stream,
@@ -150,9 +149,8 @@ gboolean fs_stream_set_remote_candidates (FsStream *stream,
                                           GList *candidates,
                                           GError **error);
 
-gboolean fs_stream_select_candidate_pair (FsStream *stream,
-    const gchar *local_foundation,
-    const gchar *remote_foundation,
+gboolean fs_stream_force_remote_candidates (FsStream *stream,
+    GList *remote_candidates,
     GError **error);
 
 gboolean fs_stream_set_remote_codecs (FsStream *stream,
-- 
1.5.6.5




More information about the farsight-commits mailing list