[farsight2/master] Add ttl field to FsCandidate
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:21:06 PST 2008
---
gst-libs/gst/farsight/fs-candidate.c | 1 +
gst-libs/gst/farsight/fs-candidate.h | 2 ++
python/pyfarsight.override | 4 ++++
3 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-candidate.c b/gst-libs/gst/farsight/fs-candidate.c
index 0dd3b23..622b429 100644
--- a/gst-libs/gst/farsight/fs-candidate.c
+++ b/gst-libs/gst/farsight/fs-candidate.c
@@ -109,6 +109,7 @@ fs_candidate_copy (const FsCandidate * cand)
copy->proto = cand->proto;
copy->priority = cand->priority;
copy->type = cand->type;
+ copy->ttl = cand->ttl;
copy->foundation = g_strdup (cand->foundation);
copy->candidate_id = g_strdup (cand->candidate_id);
diff --git a/gst-libs/gst/farsight/fs-candidate.h b/gst-libs/gst/farsight/fs-candidate.h
index e096971..ce14171 100644
--- a/gst-libs/gst/farsight/fs-candidate.h
+++ b/gst-libs/gst/farsight/fs-candidate.h
@@ -102,6 +102,7 @@ typedef struct _FsCandidate FsCandidate;
* NULL otherwise
* @password: Username to use to connect to client if necessary,
* NULL otherwise
+ * @ttl: The TTL used when sending Multicast packet (0 = auto)
*
* Struct to hold information about ICE-19 compliant candidates
*/
@@ -119,6 +120,7 @@ struct _FsCandidate
FsCandidateType type;
const gchar *username;
const gchar *password;
+ guint ttl;
/*< private >*/
gpointer _padding[4];
};
diff --git a/python/pyfarsight.override b/python/pyfarsight.override
index 51bfdba..1927687 100644
--- a/python/pyfarsight.override
+++ b/python/pyfarsight.override
@@ -492,6 +492,8 @@ _wrap_fs_candidate_tp_setattr(PyObject *self, char *attr, PyObject *value)
CHECK_SET_INT (base_port, 0, G_MAXUINT16);
else if (!strcmp (attr, "priority"))
CHECK_SET_INT (priority, G_MININT, G_MAXINT);
+ else if (!strcmp (attr, "ttl"))
+ CHECK_SET_INT (ttl, 0, 255);
else if (!strcmp (attr, "username"))
CHECK_SET_STR (username);
else if (!strcmp (attr, "password"))
@@ -548,6 +550,8 @@ _wrap_fs_candidate_tp_getattr(PyObject *self, char *attr)
return PyInt_FromLong(candidate->base_port);
else if (!strcmp (attr, "priority"))
return PyInt_FromLong(candidate->priority);
+ else if (!strcmp (attr, "ttl"))
+ return PyInt_FromLong(candidate->ttl);
else if (!strcmp (attr, "username"))
return PyString_FromString (CHECK_NULL(candidate->username));
else if (!strcmp (attr, "password"))
--
1.5.6.5
More information about the farsight-commits
mailing list