[Telepathy-commits] [mingle/master] add_payloads should be overridden by the Old jingle descriptions not the GoogleTransport
Sjoerd Simons
sjoerd at luon.net
Tue Nov 11 11:35:22 PST 2008
---
jingle.py | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/jingle.py b/jingle.py
index 7e25807..41d00f9 100644
--- a/jingle.py
+++ b/jingle.py
@@ -107,17 +107,31 @@ class JingleBaseDescription:
def change_direction(self, direction):
self.fsstream.set_direction(direction)
-class JingleOldVideoDescription(JingleBaseDescription):
+class JingleOldBaseDescription(JingleBaseDescription):
def __init__(self, content, type):
- assert type == None or type == farsight.MEDIA_TYPE_VIDEO
JingleBaseDescription.__init__(self, content, type)
+
+ def add_payloads(self, parent):
+ for c in self.codecs:
+ pt = parent.addElement('payload-type')
+ pt['id'] = str(c.id)
+ pt['name'] = c.encoding_name
+ pt['rate'] = str(c.clock_rate)
+ if c.channels > 0:
+ pt['channels'] = str(c.channels)
+
+
+class JingleOldVideoDescription(JingleOldBaseDescription):
+ def __init__(self, content, type):
+ assert type == None or type == farsight.MEDIA_TYPE_VIDEO
+ JingleOldBaseDescription.__init__(self, content, type)
self.namespace = ns.OLD_JINGLE_DESC_VIDEO
self.type = farsight.MEDIA_TYPE_VIDEO
-class JingleOldAudioDescription(JingleBaseDescription):
+class JingleOldAudioDescription(JingleOldBaseDescription):
def __init__(self, content, type):
assert type == None or type == farsight.MEDIA_TYPE_AUDIO
- JingleBaseDescription.__init__(self, content, type)
+ JingleOldBaseDescription.__init__(self, content, type)
self.namespace = ns.OLD_JINGLE_DESC_AUDIO
self.type = farsight.MEDIA_TYPE_AUDIO
@@ -294,14 +308,6 @@ class JingleGoogleTransport(JingleBaseTransport):
self.transmitter_params['compatibility-mode'] = 1
self.transmitter_params['debug'] = False
- def add_payloads(self, parent):
- for c in self.codecs:
- pt = parent.addElement('payload-type')
- pt['id'] = str(c.id)
- pt['name'] = c.encoding_name
- pt['rate'] = str(c.clock_rate)
- if c.channels > 0:
- pt['channels'] = str(c.channels)
def new_local_candidate(self, fscandidate):
if fscandidate.component_id == farsight.COMPONENT_RTP:
--
1.5.6.5
More information about the Telepathy-commits
mailing list