pad.link(q.get_static_pad('sink'))
q.link(conv)
conv.link(sink)
- self.pipe.set_state(Gst.State.PLAYING)
+ elif name.startswith('audio'):
+ q = Gst.ElementFactory.make('queue')
+ conv = Gst.ElementFactory.make('audioconvert')
+ resample = Gst.ElementFactory.make('audioresample')
+ sink = Gst.ElementFactory.make('autoaudiosink')
+ self.pipe.add(q)
+ self.pipe.add(conv)
+ self.pipe.add(resample)
+ self.pipe.add(sink)
+ self.pipe.sync_children_states()
+ pad.link(q.get_static_pad('sink'))
+ q.link(conv)
+ conv.link(resample)
+ resample.link(sink)
def set_remote_desciption_done(self, gst_promise):
gst_promise = Gst.Promise.new_with_change_func(self.create_answer_done)