[farsight2/master] Add the component to fs_candidate_new and document it
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:21:00 PST 2008
---
gst-libs/gst/farsight/fs-candidate.c | 17 +++++++++++++++++
gst-libs/gst/farsight/fs-candidate.h | 1 +
python/pyfarsight.defs | 1 +
3 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-candidate.c b/gst-libs/gst/farsight/fs-candidate.c
index 5c994f3..0dd3b23 100644
--- a/gst-libs/gst/farsight/fs-candidate.c
+++ b/gst-libs/gst/farsight/fs-candidate.c
@@ -215,10 +215,26 @@ fs_candidate_are_equal (const FsCandidate *cand1,
return FALSE;
}
+/**
+ * fs_candidate_new:
+ * @id: The id of the candidate (must be unique for ICE)
+ * @component_id: The component this candidate is for
+ * @type: The type of candidate
+ * @proto: The protocol this component is for
+ * @ip: The IP address of this component (can be NULL for local candidate to
+ * mean any address)
+ * @port: the UDP/TCP port
+ *
+ * Allocates a new #FsCandidate, the rest of the fields can be optionally
+ * filled manually.
+ *
+ * Returns: a newly-allocated #FsCandidate
+ */
FsCandidate *
fs_candidate_new (
const gchar *id,
+ guint component_id,
FsCandidateType type,
FsNetworkProtocol proto,
const gchar *ip,
@@ -227,6 +243,7 @@ fs_candidate_new (
FsCandidate *candidate = g_new0 (FsCandidate, 1);
candidate->candidate_id = g_strdup (id);
+ candidate->component_id = component_id;
candidate->type = type;
candidate->proto = proto;
candidate->ip = g_strdup (ip);
diff --git a/gst-libs/gst/farsight/fs-candidate.h b/gst-libs/gst/farsight/fs-candidate.h
index 178fda0..e096971 100644
--- a/gst-libs/gst/farsight/fs-candidate.h
+++ b/gst-libs/gst/farsight/fs-candidate.h
@@ -142,6 +142,7 @@ gboolean fs_candidate_are_equal (const FsCandidate *cand1,
FsCandidate * fs_candidate_new (
const gchar *id,
+ guint component_id,
FsCandidateType type,
FsNetworkProtocol proto,
const gchar *ip,
diff --git a/python/pyfarsight.defs b/python/pyfarsight.defs
index b77841d..1a5fa52 100644
--- a/python/pyfarsight.defs
+++ b/python/pyfarsight.defs
@@ -228,6 +228,7 @@
(return-type "FsCandidate*")
(parameters
'("const-gchar*" "id")
+ '("guint" "component_id")
'("FsCandidateType" "type")
'("FsNetworkProtocol" "proto")
'("const-gchar*" "ip")
--
1.5.6.5
More information about the farsight-commits
mailing list