support range caps

This commit is contained in:
j 2010-11-25 12:18:51 +01:00
parent bcb4036f48
commit e71dbf3bc9

View file

@ -54,6 +54,8 @@ class Audio(gst.Pipeline):
caps = pad.get_caps() caps = pad.get_caps()
if 'audio' in str(caps): if 'audio' in str(caps):
self.samplerate = caps[0]['rate'] self.samplerate = caps[0]['rate']
if not isinstance(self.samplerate, int):
self.samplerate = self.samplerate.high
pad.link(self.queue.get_pad("sink")) pad.link(self.queue.get_pad("sink"))
self.queue.link(self.conv) self.queue.link(self.conv)
self.conv.link(self.rate, self.conv.link(self.rate,