Membrane.Scissors (Membrane Scissors plugin v0.2.0) View Source

Element for cutting the stream.

Element options

Passed via struct Membrane.Scissors.t/0

  • intervals

    Required Enumerable containing {start_time, duration} tuples specifying parts of the stream that should be preserved. All other parts are cut off. Duration unit should conform to the interval_duration_unit option. Note that infinite streams are also supported.

  • buffer_duration

    Required Function returning the duration of given buffer in Membrane Time units.

  • interval_duration_unit

    Default value: :time Unit of the duration of each interval in the intervals option. If :buffers is passed, given amount of buffers is preserved, unless the next interval starts earlier. In that case, the stream is cut according to the subsequent intervals.

  • filter

    Default value: &Membrane.Scissors.always_pass_filter/2 Function for filtering buffers before they are cut. Each buffer is preserved iff it returns true. By default always returns true.

Pads

:input

Availability:always
Bin?false
Caps:any
Demand unit:buffers
Direction:input
Mode:pull
Name:input

:output

Availability:always
Bin?false
Caps:any
Direction:output
Mode:pull
Name:output

Link to this section Summary

Types

t()

Struct containing options for Membrane.Scissors

Functions

Returns pads descriptions for Membrane.Scissors

Returns description of options available for this module

Link to this section Types

Specs

t() :: %Membrane.Scissors{
  buffer_duration: (Membrane.Buffer.t(), caps :: any() -> Membrane.Time.t()),
  filter: (Membrane.Buffer.t(), caps :: any() -> boolean()),
  interval_duration_unit: :time | :buffers,
  intervals:
    [{Membrane.Time.t(), duration :: Membrane.Time.t() | integer()}]
    | Enumerable.t()
    | Stream.t()
}

Struct containing options for Membrane.Scissors

Link to this section Functions

Specs

membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]

Returns pads descriptions for Membrane.Scissors

Specs

options() :: keyword()

Returns description of options available for this module