webrtc-sendrecv.py: required gstreamer 1.14.2
authorMathieu Duponchelle <mathieu@centricular.com>
Mon, 25 Jun 2018 12:44:58 +0000 (14:44 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Mon, 25 Jun 2018 12:45:57 +0000 (14:45 +0200)
Addresses #25

webrtc/README.md
webrtc/sendrecv/gst/webrtc-sendrecv.py

index 20e3488..0c2a006 100644 (file)
@@ -74,11 +74,7 @@ $ gcc webrtc-sendrecv.c $(pkg-config --cflags --libs gstreamer-webrtc-1.0 gstrea
 * python3 -m pip install --user websockets
 * run `python3 sendrecv/gst/webrtc-sendrecv.py ID` with the `id` from the browser. You will see state changes and an SDP exchange.
 
-> The python version currently requires the master branches from `gst-plugins-bad` and `gst-plugins-base`.
-
-<!---
-TODO: replace the note above when 1.16 is released
--->
+> The python version requires at least version 1.14.2 of gstreamer and its plugins.
 
 With all versions, you will see a bouncing ball + hear red noise in the browser, and your browser's webcam + mic in the gst app.
 
index 83b49ae..083788d 100644 (file)
@@ -121,7 +121,8 @@ class WebRTCClient:
             assert(sdp['type'] == 'answer')
             sdp = sdp['sdp']
             print ('Received answer:\n%s' % sdp)
-            res, sdpmsg = GstSdp.SDPMessage.new_from_text(sdp)
+            res, sdpmsg = GstSdp.SDPMessage.new()
+            GstSdp.sdp_message_parse_buffer(bytes(sdp.encode()), sdpmsg)
             answer = GstWebRTC.WebRTCSessionDescription.new(GstWebRTC.WebRTCSDPType.ANSWER, sdpmsg)
             promise = Gst.Promise.new()
             self.webrtc.emit('set-remote-description', answer, promise)