X-Git-Url: https://git.toastfreeware.priv.at/toast/stream2beamer.git/blobdiff_plain/3a4448810c5ee5360befc23b8e27fa04bcc86015..b528286b88f14a0e9baadd9f8c871677156900fe:/lagarde.py?ds=inline diff --git a/lagarde.py b/lagarde.py index e9fca23..faf833f 100755 --- a/lagarde.py +++ b/lagarde.py @@ -194,7 +194,20 @@ class WebRTCClient: 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)