mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
webrtc_sendrecv.py: Ensure that gst-python overrides are installed
Otherwise fetching of the offer will fail with a cryptic error: ``` Traceback (most recent call last): File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 56, in on_offer_created offer = reply['offer'] TypeError: 'Structure' object is not subscriptable ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1821>
This commit is contained in:
parent
e9a02a7380
commit
5ca5a83e75
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,13 @@ from gi.repository import GstWebRTC
|
|||
gi.require_version('GstSdp', '1.0')
|
||||
from gi.repository import GstSdp
|
||||
|
||||
# Ensure that gst-python is installed
|
||||
try:
|
||||
from gi.overrides import Gst as _
|
||||
except ImportError:
|
||||
print('gstreamer-python binding overrides aren\'t available, please install them')
|
||||
raise
|
||||
|
||||
PIPELINE_DESC = '''
|
||||
webrtcbin name=sendrecv bundle-policy=max-bundle stun-server=stun://stun.l.google.com:19302
|
||||
videotestsrc is-live=true pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay !
|
||||
|
|
Loading…
Reference in a new issue