Membrane.File.Sink.Multi (Membrane File plugin v0.7.0) View Source
Element that writes buffers to a set of files. File is switched on event.
Files are named according to naming_fun passed in options. This function receives sequential number of file and should return string. It defaults to file000, file001, ...
The event type, which starts writing to a next file,
is passed as atom in split_on
option.
It defaults to :split
.
Element options
Passed via struct Membrane.File.Sink.Multi.t/0
location
String.t()
Required
Base path to the file, will be passed to the naming functionextension
String.t()
Default value:
""
Extension of the file, should be preceeded with dot (.). It is passed to the naming function.naming_fun
(String.t(), non_neg_integer, String.t() -> String.t())
Default value:
&Membrane.File.Sink.Multi.default_naming_fun/3
Function accepting base path, sequential number and file extension, and returning file path as a string. Default one generates path/to/file0.ext, path/to/file1.ext, ...split_event
any
Default value:
Membrane.File.SplitEvent
Event causing switching to a new file
Pads
:input
Availability | :always |
Caps | :any |
Demand unit | :buffers |
Direction | :input |
Mode | :pull |
Name | :input |
Link to this section Summary
Types
Struct containing options for Membrane.File.Sink.Multi
Functions
Returns pads descriptions for Membrane.File.Sink.Multi
Returns description of options available for this module
Link to this section Types
Specs
t() :: %Membrane.File.Sink.Multi{ extension: String.t(), location: String.t(), naming_fun: (String.t(), non_neg_integer(), String.t() -> String.t()), split_event: any() }
Struct containing options for Membrane.File.Sink.Multi
Link to this section Functions
Specs
membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]
Returns pads descriptions for Membrane.File.Sink.Multi
Specs
options() :: keyword()
Returns description of options available for this module