View Source Membrane.Debug.Filter (Membrane Core v1.1.0)

Membrane Filter, that can be used to create a child that will be used to debug data flowing thouth pipeline.

Any buffers, stream formats and events arriving to Elixir.Membrane.Debug.Filter will be forwarded by it to the opposite side than the one from which they came.

Usage example:

child(:source, CustomSource)
|> child(:filter, %Membrane.Debug.Filter{
  handle_buffer: &IO.inspect(&1, label: "buffer"),
  handle_stream_format: &IO.inspect(&1, label: "stream format")
})
|> child(:sink, CustomSink)

Element options

Passed via struct Membrane.Debug.Filter.t/0

  • handle_buffer

    (Buffer.t() -> any())

    Default value: &Membrane.Debug.Filter.noop/1
    Function with arity 1, that will be called with all buffers handled by this sink. Result of this function is ignored.

  • handle_event

    (Event.t() -> any())

    Default value: &Membrane.Debug.Filter.noop/1
    Function with arity 1, that will be called with all events handled by this sink. Result of this function is ignored.

  • handle_stream_format

    (StreamFormat.t() -> any())

    Default value: &Membrane.Debug.Filter.noop/1
    Function with arity 1, that will be called with all stream formats handled by this sink. Result of this function is ignored.

Pads

:input

Accepted formats:

_any
Direction::input
Availability::always
Flow control::auto

:output

Accepted formats:

_any
Direction::output
Availability::always
Flow control::auto

Summary

Types

t()

Struct containing options for Membrane.Debug.Filter

Functions

Returns description of options available for this module

Types

@type t() :: %Membrane.Debug.Filter{
  handle_buffer: (Membrane.Buffer.t() -> any()),
  handle_event: (Membrane.Event.t() -> any()),
  handle_stream_format: (Membrane.StreamFormat.t() -> any())
}

Struct containing options for Membrane.Debug.Filter

Functions

@spec noop(any()) :: :ok
@spec options() :: keyword()

Returns description of options available for this module