Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit bcc5acc

Browse files
webrtc-sendrecv.py: required gstreamer 1.14.2
Addresses #25
1 parent b019112 commit bcc5acc

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ $ gcc webrtc-sendrecv.c $(pkg-config --cflags --libs gstreamer-webrtc-1.0 gstrea
7474
* python3 -m pip install --user websockets
7575
* run `python3 sendrecv/gst/webrtc-sendrecv.py ID` with the `id` from the browser. You will see state changes and an SDP exchange.
7676

77-
> The python version currently requires the master branches from `gst-plugins-bad` and `gst-plugins-base`.
78-
79-
<!---
80-
TODO: replace the note above when 1.16 is released
81-
-->
77+
> The python version requires at least version 1.14.2 of gstreamer and its plugins.
8278
8379
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.
8480

sendrecv/gst/webrtc-sendrecv.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ async def handle_sdp(self, message):
121121
assert(sdp['type'] == 'answer')
122122
sdp = sdp['sdp']
123123
print ('Received answer:\n%s' % sdp)
124-
res, sdpmsg = GstSdp.SDPMessage.new_from_text(sdp)
124+
res, sdpmsg = GstSdp.SDPMessage.new()
125+
GstSdp.sdp_message_parse_buffer(bytes(sdp.encode()), sdpmsg)
125126
answer = GstWebRTC.WebRTCSessionDescription.new(GstWebRTC.WebRTCSDPType.ANSWER, sdpmsg)
126127
promise = Gst.Promise.new()
127128
self.webrtc.emit('set-remote-description', answer, promise)

0 commit comments

Comments
 (0)