[farsight2/master] Add fs_stream_select_candidate_pair function

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


---
 docs/libs/farsight-libs-sections.txt |    1 +
 gst-libs/gst/farsight/fs-stream.c    |   29 +++++++++++++++++++++++++++++
 gst-libs/gst/farsight/fs-stream.h    |    6 ++++++
 3 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
index aa390a1..6ba2c0c 100644
--- a/docs/libs/farsight-libs-sections.txt
+++ b/docs/libs/farsight-libs-sections.txt
@@ -25,6 +25,7 @@ FS_STREAM_ERROR
 FsStreamError
 fs_stream_add_remote_candidate
 fs_stream_remote_candidates_added
+fs_stream_select_candidate_pair
 fs_stream_preload_recv_codec
 fs_stream_set_remote_codecs
 fs_stream_emit_error
diff --git a/gst-libs/gst/farsight/fs-stream.c b/gst-libs/gst/farsight/fs-stream.c
index 932f4e0..e7da6e4 100644
--- a/gst-libs/gst/farsight/fs-stream.c
+++ b/gst-libs/gst/farsight/fs-stream.c
@@ -512,6 +512,35 @@ 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
+ * @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.
+ *
+ * Returns: TRUE if the candidate pair could be selected, FALSE otherwise
+ */
+
+gboolean
+fs_stream_select_candidate_pair (FsStream *stream, gchar *lfoundation,
+                                 gchar *rfoundation, GError **error)
+{
+  FsStreamClass *klass = FS_STREAM_GET_CLASS (stream);
+
+  if (klass->select_candidate_pair) {
+    return klass->select_candidate_pair (stream, lfoundation, rfoundation,
+    error);
+  } else {
+    g_warning ("select_candidate_pair not defined in class");
+  }
+
+  return FALSE;
+}
+
+/**
  * fs_stream_preload_recv_codec:
  * @stream: an #FsStream
  * @codec: The #FsCodec to be preloaded
diff --git a/gst-libs/gst/farsight/fs-stream.h b/gst-libs/gst/farsight/fs-stream.h
index ec3215a..3b287c8 100644
--- a/gst-libs/gst/farsight/fs-stream.h
+++ b/gst-libs/gst/farsight/fs-stream.h
@@ -119,6 +119,9 @@ struct _FsStreamClass
 
   void (*remote_candidates_added) (FsStream *stream);
 
+  gboolean (*select_candidate_pair) (FsStream *stream, gchar *lfoundation,
+                                     gchar *rfoundation, GError **error);
+
   gboolean (*preload_recv_codec) (FsStream *stream, FsCodec *codec,
                                   GError **error);
 
@@ -153,6 +156,9 @@ 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_preload_recv_codec (FsStream *stream, FsCodec *codec,
                                        GError **error);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list