Skip to content
Snippets Groups Projects
Commit 938d4b13 authored by Kipp Cannon's avatar Kipp Cannon
Browse files

pipeparts: improve error message

- when plugin cannot be loaded
parent a6a253d1
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,8 @@ def mkgeneric(pipeline, src, elem_type_name, **properties):
elem = Gst.ElementFactory.make(elem_type_name, properties.pop("name"))
else:
elem = Gst.ElementFactory.make(elem_type_name, None)
if elem is None:
raise RuntimeError("unknown failure creating \"%s\" element: confirm that the correct plugins are being loaded" % elem_type_name)
for name, value in properties.items():
elem.set_property(name.replace("_", "-"), value)
pipeline.add(elem)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment