View Source Membrane.Scissors (Membrane Scissors plugin v0.5.0)
Element for cutting the stream.
element-options
Element options
Passed via struct Membrane.Scissors.t/0
intervals
[{Time.t(), duration :: Time.t() | integer}] | Enumerable.t()
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 theinterval_duration_unit
option. Note that infinite streams are also supported.buffer_duration
(Buffer.t(), caps :: any -> Time.t())
Required
Function returning the duration of given buffer in Membrane Time units.interval_duration_unit
:time | :buffers
Default value:
:time
Unit of the duration of each interval in theintervals
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
(Buffer.t(), caps :: any -> boolean)
Default value:
&Membrane.Scissors.always_pass_filter/2
Function for filtering buffers before they are cut. Each buffer is preserved iff it returnstrue
. By default always returnstrue
.
pads
Pads
input
:input
Availability | :always |
Caps | :any |
Demand mode | :manual |
Demand unit | :buffers |
Direction | :input |
Mode | :pull |
Name | :input |
output
:output
Availability | :always |
Caps | :any |
Demand mode | :manual |
Demand unit | :buffers |
Direction | :output |
Mode | :pull |
Name | :output |
Link to this section Summary
Types
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
@type 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() }
Struct containing options for Membrane.Scissors
Link to this section Functions
@spec membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]
Returns pads descriptions for Membrane.Scissors
@spec options() :: keyword()
Returns description of options available for this module