GStreamer Daemon - Receiving Signals

From RidgeRun Developer Connection
Revision as of 16:29, 17 July 2019 by Mmontero (talk | contribs)
Jump to: navigation, search

Flush start/Flush stop

Home

Enabling the Debug Subsystem

Some GStreamer elements emit signals to notify events to the applications. GStreamer Daemon offers the capability to connect to a signal and wait for the signal event to happen. You must be aware that the GStreamer Daemon signal support is just a mean of nofication, you cannot provide any response to the signal and some argument types may not have any sense on the client context.

This wiki describes the basics on how to interact with GStreamer element signals. Specifically, how to wait for a signal. You'll find that the family of commands used to interact with signals are prefixed with signal_<action>.

List Element Signals

In order to know the signals available for an element use the following command:

 list_signals pipeline element 
     List the signals of element in pipeline.

Connect to Signal

To connect to a signal use the following command:

 signal_connect pipeline element signal 
     Connect and wait for signal of element in pipeline.

Please notice this command blocks until the signal is emitted or the timeout is reached.

Signal Timeout

You can specify a maximum wait time for a signal with the timeout parameter, the time argument is set on microseconds.

 signal_timeout pipeline element signal timeout
     Signal timeout for signal of element in pipeline.

Disconnect from Signal

If you want to stop waiting for a signal before the timeout time you can use the following command:

 signal_disconnect pipeline element signal 
     Disconnect from signal of element in pipeline.




Flush start/Flush stop

Home

Enabling the Debug Subsystem