From: Philipp Spitzer Date: Wed, 16 Jun 2021 21:28:04 +0000 (+0200) Subject: Use new function SDPMessage.new_from_text. X-Git-Url: https://git.toastfreeware.priv.at/toast/stream2beamer.git/commitdiff_plain/a1f8e26a972c2a7db5346e51813c6095044486b6?hp=d0dcf42b0492155e0b8fd3ecd9d5da82700e34e7 Use new function SDPMessage.new_from_text. --- diff --git a/lagarde.py b/lagarde.py index 7c982c3..55b1e1f 100755 --- a/lagarde.py +++ b/lagarde.py @@ -254,11 +254,8 @@ class WebRTCClient: return elif self.events.sdp_offer.qsize() > 0: sdp_offer = self.events.sdp_offer.get_nowait() - res, sm = GstSdp.SDPMessage.new() + res, sm = GstSdp.SDPMessage.new_from_text(sdp_offer) assert res == GstSdp.SDPResult.OK - GstSdp.sdp_message_parse_buffer(bytes(sdp_offer.encode()), sm) - # the three lines above can also be done this way in new versions of GStreamer: - # sm = GstSdp.SDPMessage.new_from_text(sdp_offer) rd = GstWebRTC.WebRTCSessionDescription.new(GstWebRTC.WebRTCSDPType.OFFER, sm) gst_promise = Gst.Promise.new_with_change_func(self.set_remote_desciption_done) self.webrtcbin.emit('set-remote-description', rd, gst_promise)