Element that reads chunks of data from given file and sends them as buffers through the output pad. May also read from standard input by setting location to :stdin.
Can work in two modes, determined by the seekable? option.
Seekable mode is not supported when reading from standard input.
Element options
Passed via struct Membrane.File.Source.t/0
locationPath.t() | :stdinRequired
Path to the file or :stdinchunk_sizepos_integer()Default value:
2048
Size of chunks being readseekable?boolean()Default value:
false
Withseekable?: false, the source will start reading data from the file exactly the moment it starts playing and will read it till the end of file, setting theend_of_streamaction on the:outputpad when the reading is done. Withseekable?: true, the process of reading is driven by receivingMembrane.File.SeekSourceEventevents. The source working inseekable?: truemode won't send any data before that event is received. For more information about how to steer reading inseekable?: truemode, see:Membrane.File.SeekSourceEvent.
Pads
:output
Accepted formats:
%RemoteStream{type: :bytestream}| Direction: | :output |
| Availability: | :always |
| Flow control: | :manual |
| Demand unit: | nil |
Summary
Types
Struct containing options for Membrane.File.Source
Types
@type t() :: %Membrane.File.Source{ chunk_size: pos_integer(), location: Path.t() | :stdin, seekable?: boolean() }
Struct containing options for Membrane.File.Source
Functions
@spec options() :: keyword()
Returns description of options available for this module