View Source Membrane.WAV.Serializer (Membrane WAV Plugin v0.7.0)

Element responsible for raw audio serialization to WAV format.

Creates WAV header (its description can be found with Membrane.WAV.Parser) based on a format received in caps and puts it before audio samples. The element assumes that audio is in PCM format.

file length and data length fields can be calculated only after processing all samples, so the serializer uses Membrane.File.SeekEvent to supply them with proper values before the end of stream. If your sink doesn't support seeking, set disable_seeking option to true and fix the header using Membrane.WAV.Postprocessing.

element-options

Element options

Passed via struct Membrane.WAV.Serializer.t/0

  • disable_seeking

    boolean()

    Default value: false
    Whether the element should disable emitting Membrane.File.SeekEvent.

    The event is used to supply the WAV header with proper values before the end of stream. If your sink doesn't support it, you should set this option to true and use Membrane.WAV.Postprocessing to fix the header.

pads

Pads

input

:input

Availability :always
Caps Membrane.RawAudio
Demand mode :auto
Demand unit :bytes
Direction :input
Mode :pull
Name :input

output

:output

Availability :always
Caps :any
Demand mode :auto
Demand unit :buffers
Direction :output
Mode :pull
Name :output

Link to this section Summary

Types

t()

Struct containing options for Membrane.WAV.Serializer

Functions

Returns pads descriptions for Membrane.WAV.Serializer

Returns description of options available for this module

Link to this section Types

@type t() :: %Membrane.WAV.Serializer{disable_seeking: boolean()}

Struct containing options for Membrane.WAV.Serializer

Link to this section Functions

@spec membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]

Returns pads descriptions for Membrane.WAV.Serializer

@spec options() :: keyword()

Returns description of options available for this module