send_event
Description:
public bool send_event (
owned Event event)
Sends the event to the pad.
This function can be used by applications to send events in the pipeline.
If pad is a source pad, event should be an upstream event. If pad is a sink pad, event
should be a downstream event. For example, you would not send a EOS on a
src pad; EOS events only propagate downstream. Furthermore, some downstream events have to be serialized with data flow, like EOS, while some
can travel out-of-band, like FLUSH_START. If the event needs to
be serialized with data flow, this function will take the pad's stream lock while calling its event function.
To find out whether an event type is upstream, downstream, or downstream and serialized, see
EventTypeFlags,
get_flags,
is_upstream,
is_downstream, and
is_serialized. Note that in practice that an application or plugin
doesn't need to bother itself with this information; the core handles all necessary locks and checks.
This function takes owership of the provided event so you should @ref it if
you want to reuse the event after this call.
Parameters:
| event |
the Event to send to the pad. |
Returns:
| TRUE if the event was handled. |