add back (commented out ) bundle
authorgregor herrmann <gregor@toastfreeware.priv.at>
Wed, 24 Jun 2020 21:29:23 +0000 (23:29 +0200)
committergregor herrmann <gregor@toastfreeware.priv.at>
Wed, 24 Jun 2020 21:29:23 +0000 (23:29 +0200)
and rename *caps variables

laplace_client.py

index 2778341f1296bb9f2ff5ec2e350a2b408ddb88df..3600fdc3a30462cd4dbd1ab97ff0412a343d6953 100755 (executable)
@@ -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)