[Telepathy-commits] [mingle/master] Parse and insert optional codec parameters
Sjoerd Simons
sjoerd at luon.net
Tue Nov 11 11:10:37 PST 2008
---
mingle-client.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/mingle-client.py b/mingle-client.py
index 5fc183f..32851cf 100644
--- a/mingle-client.py
+++ b/mingle-client.py
@@ -258,6 +258,11 @@ class Muc:
if codec.channels > 0:
pt['channels'] = str(codec.channels)
+ for (name, value) in codec.optional_params:
+ param = pt.addElement('parameter')
+ param['name'] = name
+ param['value'] = value
+
self.update_presence(mingle)
# call the lot using the existing conference
@@ -293,6 +298,15 @@ class Muc:
p["name"],
session.type,
int(p["rate"]))
+ params = xpath.queryForNodes("/payload-type/parameter", p)
+ if params !=None:
+ optional_params = []
+
+ for param in params:
+ optional_params.append(
+ (str(param['name']), str(param['value'])))
+ codec.optional_params = optional_params
+
codecs.append(codec)
stream.set_remote_codecs(codecs)
--
1.5.6.5
More information about the Telepathy-commits
mailing list