[farsight2/master] Merge candidate_id field into foundation field (they're the same)
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:22:14 PST 2008
---
gst-libs/gst/farsight/fs-candidate.c | 8 +++-----
gst-libs/gst/farsight/fs-candidate.h | 4 +---
python/pyfarsight.override | 8 ++------
3 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-candidate.c b/gst-libs/gst/farsight/fs-candidate.c
index 0803c39..817c5f4 100644
--- a/gst-libs/gst/farsight/fs-candidate.c
+++ b/gst-libs/gst/farsight/fs-candidate.c
@@ -75,7 +75,6 @@ void
fs_candidate_destroy (FsCandidate * cand)
{
g_free ((gchar *) cand->foundation);
- g_free ((gchar *) cand->candidate_id);
g_free ((gchar *) cand->ip);
g_free ((gchar *) cand->base_ip);
g_free ((gchar *) cand->username);
@@ -106,7 +105,6 @@ fs_candidate_copy (const FsCandidate * cand)
copy->ttl = cand->ttl;
copy->foundation = g_strdup (cand->foundation);
- copy->candidate_id = g_strdup (cand->candidate_id);
copy->ip = g_strdup (cand->ip);
copy->base_ip = g_strdup (cand->base_ip);
copy->username = g_strdup (cand->username);
@@ -161,7 +159,7 @@ fs_candidate_list_copy (const GList *candidate_list)
/**
* fs_candidate_new:
- * @id: The id of the candidate (must be unique for ICE)
+ * @foundation: The foundation of the candidate
* @component_id: The component this candidate is for
* @type: The type of candidate
* @proto: The protocol this component is for
@@ -177,7 +175,7 @@ fs_candidate_list_copy (const GList *candidate_list)
FsCandidate *
fs_candidate_new (
- const gchar *id,
+ const gchar *foundation,
guint component_id,
FsCandidateType type,
FsNetworkProtocol proto,
@@ -186,7 +184,7 @@ fs_candidate_new (
{
FsCandidate *candidate = g_new0 (FsCandidate, 1);
- candidate->candidate_id = g_strdup (id);
+ candidate->foundation = g_strdup (foundation);
candidate->component_id = component_id;
candidate->type = type;
candidate->proto = proto;
diff --git a/gst-libs/gst/farsight/fs-candidate.h b/gst-libs/gst/farsight/fs-candidate.h
index b22ba07..5e97a0b 100644
--- a/gst-libs/gst/farsight/fs-candidate.h
+++ b/gst-libs/gst/farsight/fs-candidate.h
@@ -88,7 +88,6 @@ typedef struct _FsCandidate FsCandidate;
/**
* FsCandidate:
- * @candidate_id: string identifier of the candidate
* @foundation: a string representing the foundation of this candidate (maximum 32 chars)
* @component_id: value between 1 and 256 indicating which component this candidate represents (1 is RTP, 2 is RTCP, #FsComponentType can be used here)
* @ip: IP in dotted format
@@ -108,7 +107,6 @@ typedef struct _FsCandidate FsCandidate;
*/
struct _FsCandidate
{
- const gchar *candidate_id;
gchar *foundation;
guint component_id;
const gchar *ip;
@@ -137,7 +135,7 @@ void fs_candidate_list_destroy (GList *candidate_list);
GList *fs_candidate_list_copy (const GList *candidate_list);
FsCandidate * fs_candidate_new (
- const gchar *id,
+ const gchar *foundation,
guint component_id,
FsCandidateType type,
FsNetworkProtocol proto,
diff --git a/python/pyfarsight.override b/python/pyfarsight.override
index eff36f4..680f7aa 100644
--- a/python/pyfarsight.override
+++ b/python/pyfarsight.override
@@ -484,9 +484,7 @@ _wrap_fs_candidate_tp_setattr(PyObject *self, char *attr, PyObject *value)
- if (!strcmp (attr, "candidate_id"))
- CHECK_SET_STR (candidate_id);
- else if (!strcmp (attr, "foundation"))
+ if (!strcmp (attr, "foundation"))
CHECK_SET_STR (foundation);
else if (!strcmp (attr, "component_id"))
CHECK_SET_INT (component_id, 1, 256);
@@ -542,9 +540,7 @@ _wrap_fs_candidate_tp_getattr(PyObject *self, char *attr)
#define CHECK_NULL(x) ((x) == NULL ? "" : (x))
- if (!strcmp (attr, "candidate_id"))
- return PyString_FromString (CHECK_NULL(candidate->candidate_id));
- else if (!strcmp (attr, "foundation"))
+ if (!strcmp (attr, "foundation"))
return PyString_FromString (CHECK_NULL(candidate->foundation));
else if (!strcmp (attr, "component_id"))
return PyInt_FromLong(candidate->component_id);
--
1.5.6.5
More information about the farsight-commits
mailing list