View Source Membrane.AAC.Parser (Membrane AAC plugin v0.18.1)

Parser for Advanced Audio Codec.

Supports both plain and ADTS-encapsulated output (configured by out_encapsulation). Input with encapsulation :none is supported, but correct AAC stream format needs to be supplied with the stream.

If PTS is absent, it calculates and puts one based on the sample rate.

Element options

Passed via struct Membrane.AAC.Parser.t/0

  • samples_per_frame

    AAC.samples_per_frame()

    Default value: 1024
    Count of audio samples in each AAC frame

  • out_encapsulation

    AAC.encapsulation()

    Default value: :ADTS
    Determines whether output AAC frames should be prefixed with ADTS headers

  • output_config

    :audio_specific_config
    | :esds
    | {:esds, avg_bit_rate :: non_neg_integer(), max_bit_rate :: non_neg_integer()}
    | nil

    Default value: nil
    Determines which config spec will be generated and included in output stream format as config. For esds config avg_bit_rate and max_bit_rate can be additionally provided and will be encoded in the esds. If not known they should be set to 0.

Pads

:input

Accepted formats:

AAC
Membrane.RemoteStream
Direction::input
Availability::always
Flow control::manual
Demand unit::buffers

:output

Accepted formats:

AAC
Direction::output
Availability::always
Flow control::manual
Demand unit:nil

Summary

Types

t()

Struct containing options for Membrane.AAC.Parser

Functions

Returns description of options available for this module

Types

@type t() :: %Membrane.AAC.Parser{
  out_encapsulation: Membrane.AAC.encapsulation(),
  output_config:
    :audio_specific_config
    | :esds
    | {:esds, avg_bit_rate :: non_neg_integer(),
       max_bit_rate :: non_neg_integer()}
    | nil,
  samples_per_frame: Membrane.AAC.samples_per_frame()
}

Struct containing options for Membrane.AAC.Parser

@type timestamp() :: Ratio.t() | Membrane.Time.t()

Functions

@spec options() :: keyword()

Returns description of options available for this module