View Source Membrane.AAC (Membrane AAC Format v0.8.0)

Capabilities for Advanced Audio Codec.

Link to this section Summary

Types

Contains the configuration data of the audio stream. The options are

Indicates whether stream contains AAC frames only or are they encapsulated in ADTS

AAC frame length identifiers.

MPEG version identifiers.

t()

Link to this section Types

Link to this type

audio_object_type_id()

View Source
@type audio_object_type_id() :: 1..5 | 29

Identifiers of MPEG Audio Object Types

@type channel_config_id() :: 0..7

Identifiers of MPEG Audio channel configurations

@type config() :: {:esds | :audio_specific_config, binary()} | nil

Contains the configuration data of the audio stream. The options are:

  • Elementary Stream Descriptor, :esds - ISO/IEC 14496-14
  • Audio Specific Config, :audio_specific_config - ISO/IEC 14496-3 If the data is already parsed and the stream doesn't contain external config it can be set to nil.
@type encapsulation() :: :none | :ADTS

Indicates whether stream contains AAC frames only or are they encapsulated in ADTS

@type frame_length_id() :: 0 | 1

AAC frame length identifiers.

0 indicates 1024 samples/frame and 1 - 960 samples/frame.

@type mpeg_version() :: 2 | 4
@type mpeg_version_id() :: 0 | 1

MPEG version identifiers.

0 indicates MPEG-4 and 1 indicates MPEG-2

@type profile() :: :main | :LC | :SSR | :LTP | :HE | :HEv2 | nil
@type samples_per_frame() :: 1024 | 960
Link to this type

sampling_frequency_id()

View Source
@type sampling_frequency_id() :: 0..12 | 15

Identifiers of MPEG Audio sampling frequencies

@type t() :: %Membrane.AAC{
  channels: pos_integer() | nil,
  config: config(),
  encapsulation: encapsulation(),
  frames_per_buffer: pos_integer(),
  mpeg_version: mpeg_version(),
  profile: profile(),
  sample_rate: pos_integer() | nil,
  samples_per_frame: samples_per_frame()
}

Link to this section Functions

Link to this function

aot_id_to_profile(audio_object_type_id)

View Source
@spec aot_id_to_profile(audio_object_type_id()) :: profile()
Link to this function

channel_config_id_to_channels(channel_config_id)

View Source
@spec channel_config_id_to_channels(channel_config_id()) ::
  pos_integer() | :AOT_specific
Link to this function

channels_to_channel_config_id(channels)

View Source
@spec channels_to_channel_config_id(channels :: pos_integer() | :AOT_specific) ::
  channel_config_id()
Link to this function

frame_length_id_to_samples_per_frame(frame_length_id)

View Source
@spec frame_length_id_to_samples_per_frame(frame_length_id()) :: samples_per_frame()
Link to this function

mpeg_version_id_to_mpeg_version(mpeg_version_id)

View Source
@spec mpeg_version_id_to_mpeg_version(mpeg_version_id()) :: mpeg_version()
Link to this function

mpeg_version_to_mpeg_version_id(mpeg_version)

View Source
@spec mpeg_version_to_mpeg_version_id(mpeg_version()) :: mpeg_version_id()
Link to this function

profile_to_aot_id(profile)

View Source
@spec profile_to_aot_id(profile()) :: audio_object_type_id()
Link to this function

sample_rate_to_sampling_frequency_id(sample_rate)

View Source
@spec sample_rate_to_sampling_frequency_id(sample_rate :: pos_integer()) ::
  sampling_frequency_id()
Link to this function

samples_per_frame_to_frame_length_id(samples_per_frame)

View Source
@spec samples_per_frame_to_frame_length_id(samples_per_frame()) :: pos_integer()
Link to this function

sampling_frequency_id_to_sample_rate(sampling_frequency_id)

View Source
@spec sampling_frequency_id_to_sample_rate(sampling_frequency_id()) ::
  pos_integer() | :explicit