From: Philipp Spitzer Date: Wed, 21 Apr 2021 20:24:56 +0000 (+0200) Subject: Revert "Remove audio path." X-Git-Url: https://git.toastfreeware.priv.at/toast/stream2beamer.git/commitdiff_plain/b528286b88f14a0e9baadd9f8c871677156900fe Revert "Remove audio path." This reverts commit cfcb3a3892ccea7e0168d707f8aa31851ad5a438. --- 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)