Membrane Element: File v0.1.0 Membrane.Element.File.Sink.Multi 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.

Link to this section Summary

Types

t()

Struct containing options for Membrane.Element.File.Sink.Multi

  • location: Base path to the file, will be passed to the naming function
  • extension: Extension of the file, should be preceeded with dot (.). It is passed to the naming function.
  • naming_fun: 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_type: Type of event causing switching to a new file

Functions

Returns all known sink pads for Membrane.Element.File.Sink.Multi

Returns description of options available for this module

Link to this section Types

Link to this type t() View Source
t() :: %Membrane.Element.File.Sink.Multi{
  location: String.t(),
  extension: String.t(),
  naming_fun: (String.t(), non_neg_integer(), String.t() -> String.t()),
  split_event_type: atom()
}

Struct containing options for Membrane.Element.File.Sink.Multi

  • location: Base path to the file, will be passed to the naming function
  • extension: Extension of the file, should be preceeded with dot (.). It is passed to the naming function.
  • naming_fun: 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_type: Type of event causing switching to a new file

Link to this section Functions

Link to this function default_naming_fun(path, i, ext) View Source

Returns all known sink pads for Membrane.Element.File.Sink.Multi

They are the following:

  • Pad: :sink

    • Availability: :always
    • Mode: {:pull, [demand_in: :buffers]}
    • Caps: any

Returns description of options available for this module