simplehandler module

Review Status

Names

Hash

Date

Florent, Sathya, Duncan Me., Jolien, Kipp, Chad

b3ef077fe87b597578000f140e4aa780f3a227aa

2014-05-01

class simplehandler.Handler(mainloop, pipeline)[source]

Bases: object

A simple handler that prints pipeline error messages to stderr, and stops the pipeline and terminates the mainloop at EOS. Complex applications will need to write their own pipeline handler, but for most simple applications this will suffice, and it’s easier than copy-and-pasting this all over the place.

do_on_message(bus, message)[source]

Add extra message handling by overriding this in your subclass. If this method returns True, no further message handling is performed. If this method returns False, message handling continues with default cases or EOS, INFO, WARNING and ERROR messages.

on_message(bus, message)[source]
quit(bus)[source]

Decouple this object from the Bus object to allow the Bus’ reference count to drop to 0, and .quit() the mainloop object. This method is invoked by the default EOS and ERROR message handlers.

class simplehandler.OneTimeSignalHandler(pipeline, signals=[<Signals.SIGINT: 2>, <Signals.SIGTERM: 15>])[source]

Bases: object

A helper class for application signal handling. Use this to help your application to cleanly shutdown gstreamer pipelines when responding to e.g., ctrl+c.

do_on_call(signum, frame)[source]

Over ride this for your subclass