[Telepathy-commits] [telepathy-gabble/master] Send a parameter along with initial local codecs
Will Thompson
will.thompson at collabora.co.uk
Fri Feb 27 07:42:42 PST 2009
---
tests/twisted/jingle/jingletest2.py | 5 +++++
tests/twisted/jingle/test-description-info.py | 9 +++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/tests/twisted/jingle/jingletest2.py b/tests/twisted/jingle/jingletest2.py
index efad283..1a34634 100644
--- a/tests/twisted/jingle/jingletest2.py
+++ b/tests/twisted/jingle/jingletest2.py
@@ -310,6 +310,11 @@ class JingleTest2:
for (name, id, rate) in codecs ]
return dbus.Array(dbussed_codecs, signature='(usuuua{ss})')
+ def dbusify_codecs_with_params(self, codecs):
+ dbussed_codecs = [ (id, name, 0, rate, 1, params)
+ for (name, id, rate, params) in codecs ]
+ return dbus.Array(dbussed_codecs, signature='(usuuua{ss})')
+
def get_audio_codecs_dbus(self):
return self.dbusify_codecs(self.audio_codecs)
diff --git a/tests/twisted/jingle/test-description-info.py b/tests/twisted/jingle/test-description-info.py
index 0f0bea2..bd3b3dd 100644
--- a/tests/twisted/jingle/test-description-info.py
+++ b/tests/twisted/jingle/test-description-info.py
@@ -80,8 +80,13 @@ def test(q, bus, conn, stream):
members = media_chan.GetMembers()
assert set(members) == set([1L, remote_handle]), members
+ local_codecs = [('GSM', 3, 8000, {}),
+ ('PCMA', 8, 8000, {'helix':'woo yay'}),
+ ('PCMU', 0, 8000, {}) ]
+ local_codecs_dbus = jt2.dbusify_codecs_with_params(local_codecs)
+
stream_handler.NewNativeCandidate("fake", jt2.get_remote_transports_dbus())
- stream_handler.Ready(jt2.get_audio_codecs_dbus())
+ stream_handler.Ready(local_codecs_dbus)
stream_handler.StreamState(2)
# First IQ is transport-info; also, we expect to be told what codecs the
@@ -100,7 +105,7 @@ def test(q, bus, conn, stream):
stream.send(jp.xml(jp.ResultIq('test at localhost', e.stanza, [])))
# S-E reports codec intersection, after which gabble can send acceptance
- stream_handler.SupportedCodecs(jt2.get_audio_codecs_dbus())
+ stream_handler.SupportedCodecs(local_codecs_dbus)
# Second one is session-accept
e = q.expect('stream-iq')
--
1.5.6.5
More information about the telepathy-commits
mailing list