From: gregor herrmann Date: Wed, 24 Jun 2020 21:29:23 +0000 (+0200) Subject: add back (commented out ) bundle X-Git-Url: https://git.toastfreeware.priv.at/toast/stream2beamer.git/commitdiff_plain/69b5f80f02ef3d49a5f3a077ab6494ebbe8aed3b add back (commented out ) bundle and rename *caps variables --- diff --git a/laplace_client.py b/laplace_client.py index 2778341..3600fdc 100755 --- a/laplace_client.py +++ b/laplace_client.py @@ -120,12 +120,12 @@ class WebRTCClient: def start_pipeline(self): self.webrtc = Gst.ElementFactory.make('webrtcbin', 'laplace') + # self.webrtc.set_property("bundle-policy", 3) direction = GstWebRTC.WebRTCRTPTransceiverDirection.RECVONLY - vcaps = Gst.caps_from_string("application/x-rtp,media=video,encoding-name=VP8/9000,payload=96") - acaps = Gst.caps_from_string("application/x-rtp,media=audio,encoding-name=OPUS,media=audio,clock-rate=48000,payload=97") - # vcaps.append(acaps) - self.webrtc.emit('add-transceiver', direction, vcaps) - self.webrtc.emit('add-transceiver', direction, acaps) + video_caps = Gst.caps_from_string("application/x-rtp,media=video,encoding-name=VP8/9000,payload=96") + audio_caps = Gst.caps_from_string("application/x-rtp,media=audio,encoding-name=OPUS,clock-rate=48000,payload=111") + self.webrtc.emit('add-transceiver', direction, video_caps) + self.webrtc.emit('add-transceiver', direction, audio_caps) self.pipe = Gst.Pipeline.new("pipeline") Gst.Bin.do_add_element(self.pipe, self.webrtc) self.webrtc.connect('on-negotiation-needed', self.on_negotiation_needed)