View Source Membrane.EventProtocol protocol (Membrane Core v0.11.0)
Protocol that allows to configure behaviour of Membrane.Event
s.
Each event has to implement or derive this protocol.
Link to this section Summary
Functions
Determines whether event is synchronized with buffers (sync) or not (async). Defaults to false (sync).
Specifies whether event is sent right away (not sticky), or it is 'pushed' by the next sent buffer (sticky). Defaults to false (not sticky).
Link to this section Types
@type t() :: struct()
Link to this section Functions
Determines whether event is synchronized with buffers (sync) or not (async). Defaults to false (sync).
Buffers and sync events are always received in the same order they are sent. Async events are handled before any buffers enqueued that are waiting in Membrane internal queues to be processed.
Specifies whether event is sent right away (not sticky), or it is 'pushed' by the next sent buffer (sticky). Defaults to false (not sticky).
Returning a sticky event from a callback stores it in a queue. When the next
buffer is to be sent, all events from the queue are sent before it. An example
can be the Membrane.Event.StartOfStream
event.