Align default port number with Laplace.
[toast/stream2beamer.git] / laplace_client.py
index 2778341f1296bb9f2ff5ec2e350a2b408ddb88df..6ec2bb83862d92316459f285144701abe7cd0ff7 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)
@@ -193,7 +193,7 @@ def main():
     if not check_plugins():
         sys.exit(1)
     parser = argparse.ArgumentParser()
-    parser.add_argument('--uri', default='wss://localhost:2222/ws_connect?id=cug',
+    parser.add_argument('--uri', default='wss://localhost:1234/ws_connect?id=cug',
         help='Signalling server URI')
     args = parser.parse_args()
     c = WebRTCClient(args.uri)