Subscribe to bus messages, no events fired
tim at centricular.com
Tue Aug 22 14:57:27 UTC 2017
On Tue, 2017-08-22 at 06:51 -0700, testermax wrote:
> My goal is to have a lean implementation,with as few dependencies as
> possible, while being notified when the stream is interupted, or
> other errors occurs, and be able to resume when the stream is back.
> Is this possible while only depend on gst library?
GStreamer depends on GLib, so that dependency will always be there no
matter what (pretty much the only hard depdency it has).
You don't have to run a GLib main loop (event loop) to get messages
from a GstBus, but Bus.AddSignalWatch() relies on it.
There are other ways, you can just manually check the bus for messages
with Bus.Pop() or Bus.TimedPop() from time to time when it's convenient
for you. If you have your own event loop, you can also schedule an
event from the sync message handler so that the event loop is woken up
in the main thread and can process the message from there.
Tim Müller, Centricular Ltd - http://www.centricular.com
Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
More information about the gstreamer-devel