Catch Gstreamer errors in Python?

Sébastien FENET sebastien.fenet at yahoo.fr
Sat Aug 19 08:59:57 UTC 2017


Hi all,
I'm using Gstreamer 1.0 within Python (running on Windows 7).
I was wondering if it's possible to "catch" Gstreamer errors in my Python code. I tried a few things but wasn't successful. Sorry if it's a silly question but I have not found any working tip on the net...
More specifically, if I build a pipeline with a "filesrc" element looking for a file that does not exist, my code will run forever without any notice. I tried to look at the bus, but I don't get any other message than "state_changed" (no error appears in the bus). The only way I can see that there's actually a problem is by setting the environment variable GST_DEBUG to 3, in which case a "No Such File" message is printed out by GStreamer.
So, at this point, the only way I see would be to set the environment variable to 3 (which probably slows down GStreamer) and intercept the stdout... but I don't think that's a really neat solution. Is there a "good" way to catch these errors?
Thanks,Seb.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170819/52b1404a/attachment.html>


More information about the gstreamer-devel mailing list