Membrane Core v0.1.1 Membrane.Event View Source
Structure representing a single event that flows between elements.
Each event:
- must contain type,
- may contain payload.
Type is used to distinguish event class.
Payload can hold additional information about the event.
Payload should always be a named struct appropriate for given event type.
Link to this section Summary
Functions
Shorthand for creating a generic Discontinuity event
Shorthand for creating a generic End of Stream event
Shrothand for creating a generic Underrun event
Link to this section Types
Link to this section Functions
discontinuity(Membrane.Event.Discontinuity.Payload.duration_t()) :: t()
Shorthand for creating a generic Discontinuity event.
Discontinuity event means that flow of buffers in the stream was interrupted but stream itself is not done.
Frequent reasons for this are soundcards’ drops while capturing sound, network data loss etc.
If duration of the discontinuity is known, it can be passed as an argument.
See Membrane.Event.Discontinuity.Payload
for the full description of the
payload.
Shorthand for creating a generic End of Stream event.
End of Stream event means that all buffers from the stream were processed and no further buffers are expected to arrive.
Shrothand for creating a generic Underrun event.
Underrun event means that certain element is willing to consume more buffers but there are none available.
It makes sense to use this event as an upstream event to notify previous elements in the pipeline that they should generate more buffers.