Membrane.Scissors (Membrane Scissors plugin v0.4.0) View Source
Element for cutting the stream.
Element options
Passed via struct Membrane.Scissors.t/0
intervals
[{Time.t(), duration :: Time.t() | integer}] | Enumerable.t() | Stream.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
:input
Availability | :always |
Caps | :any |
Demand unit | :buffers |
Direction | :input |
Mode | :pull |
Name | :input |
:output
Availability | :always |
Caps | :any |
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
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