Membrane Core v0.3.0 Membrane.Testing.Source View Source

Testing Element for supplying data based on generator function passed through options.

Element options

Passed via struct Membrane.Testing.Source.t/0

  • actions_generator

    Default value: &Membrane.Testing.Source.default_buf_gen/2

    Function invoked each time handle_demand is invoked. It is an action generator that takes two arguments. First argument is counter which is incremented by 1 every call and second argument represents size of demand.

Pads

:output

Availability:always
Caps:any
Direction:output
Mode:pull

Link to this section Summary

Types

t()

Struct containing options for Membrane.Testing.Source

Functions

Returns pads descriptions for Membrane.Testing.Source

Returns description of options available for this module

Link to this section Types

Link to this type

t() View Source
t() :: %Membrane.Testing.Source{
  actions_generator:
    (non_neg_integer(), non_neg_integer() -> [Membrane.Element.Action.t()])
}

Struct containing options for Membrane.Testing.Source

Link to this section Functions

Link to this function

default_buf_gen(cnt, size) View Source

Returns pads descriptions for Membrane.Testing.Source

Returns description of options available for this module