Subscribe to bus messages, no events fired
Tim Müller
tim at centricular.com
Tue Aug 22 14:57:27 UTC 2017
On Tue, 2017-08-22 at 06:51 -0700, testermax wrote:
Hi,
> 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.
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
More information about the gstreamer-devel
mailing list