webrtc-sendrecv.py: required gstreamer 1.14.2

Addresses #25
This commit is contained in:
Mathieu Duponchelle 2018-06-25 14:44:58 +02:00
parent 9cf3aa088e
commit 1958814680
2 changed files with 3 additions and 6 deletions

View 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.

View 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)