aacparser

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AotAACMain       = 1 + iota  ///< Y                       Main
	AotAACLc                     ///< Y                       Low Complexity
	AotAACSsr                    ///< N (code in SoC repo)    Scalable Sample Rate
	AotAACLtp                    ///< Y                       Long Term Prediction
	AotSBR                       ///< Y                       Spectral Band Replication
	AotAACScalable               ///< N                       Scalable
	AotTWINVQ                    ///< N                       Twin Vector Quantizer
	AotCELP                      ///< N                       Code Excited Linear Prediction
	AotHVXC                      ///< N                       Harmonic Vector eXcitation Coding
	AotTTSI          = 12 + iota ///< N                       Text-To-Speech Interface
	AotMAINSYNTH                 ///< N                       Main Synthesis
	AotWAVESYNTH                 ///< N                       Wavetable Synthesis
	AotMIDI                      ///< N                       General MIDI
	AotSAFX                      ///< N                       Algorithmic Synthesis and Audio Effects
	AotErAACLc                   ///< N                       Error Resilient Low Complexity
	AotErAACLtp      = 19 + iota ///< N                       Error Resilient Long Term Prediction
	AotErAACScalable             ///< N                       Error Resilient Scalable
	AotErTWINVQ                  ///< N                       Error Resilient Twin Vector Quantizer
	AotErBSAC                    ///< N                       Error Resilient Bit-Sliced Arithmetic Coding
	AotErAACLd                   ///< N                       Error Resilient Low Delay
	AotErCELP                    ///< N                       Error Resilient Code Excited Linear Prediction
	AotErHVXC                    ///< N                       Error Resilient Harmonic Vector eXcitation Coding
	AotErHILN                    ///< N                       Error Resilient Harmonic and Individual Lines plus Noise
	AotErPARAM                   ///< N                       Error Resilient Parametric
	AotSSC                       ///< N                       SinuSoidal Coding
	AotPS                        ///< N                       Parametric Stereo
	AotSURROUND                  ///< N                       MPEG Surround
	AotESCAPE                    ///< Y                       Escape Value
	AotL1                        ///< Y                       Layer 1
	AotL2                        ///< Y                       Layer 2
	AotL3                        ///< Y                       Layer 3
	AotDST                       ///< N                       Direct Stream Transfer
	AotALS                       ///< Y                       Audio LosslesS
	AotSLS                       ///< N                       Scalable LosslesS
	AotSlsNonCore                ///< N                       Scalable LosslesS (non core)
	AotErAACEld                  ///< N                       Error Resilient Enhanced Low Delay
	AotSmrSimple                 ///< N                       Symbolic Music Representation Simple
	AotSmrMain                   ///< N                       Symbolic Music Representation Main
	AotUsacNosbr                 ///< N                       Unified Speech and Audio Coding (no SBR)
	AotSAOC                      ///< N                       Spatial Audio Object Coding
	AotLdSurround                ///< N                       Low Delay MPEG Surround
	AotUsac                      ///< N                       Unified Speech and Audio Coding
)

copied from libavcodec/mpeg4audio.h

View Source
const ADTSHeaderLength = 7

ADTSHeaderLength const

Variables

This section is empty.

Functions

func FillADTSHeader

func FillADTSHeader(header []byte, config MPEG4AudioConfig, samples int, payloadLength int)

FillADTSHeader func

func WriteMPEG4AudioConfig

func WriteMPEG4AudioConfig(w io.Writer, config MPEG4AudioConfig) (err error)

WriteMPEG4AudioConfig func

Types

type CodecData

type CodecData struct {
	ConfigBytes []byte
	Config      MPEG4AudioConfig
}

CodecData struct

func NewCodecDataFromMPEG4AudioConfig

func NewCodecDataFromMPEG4AudioConfig(config MPEG4AudioConfig) (inst CodecData, err error)

NewCodecDataFromMPEG4AudioConfig func

func NewCodecDataFromMPEG4AudioConfigBytes

func NewCodecDataFromMPEG4AudioConfigBytes(config []byte) (inst CodecData, err error)

NewCodecDataFromMPEG4AudioConfigBytes func

func (CodecData) ChannelLayout

func (inst CodecData) ChannelLayout() av.ChannelLayout

ChannelLayout func

func (CodecData) MPEG4AudioConfigBytes

func (inst CodecData) MPEG4AudioConfigBytes() []byte

MPEG4AudioConfigBytes func

func (CodecData) PacketDuration

func (inst CodecData) PacketDuration(data []byte) (dur time.Duration, err error)

PacketDuration func

func (CodecData) SampleFormat

func (inst CodecData) SampleFormat() av.SampleFormat

SampleFormat func

func (CodecData) SampleRate

func (inst CodecData) SampleRate() int

SampleRate func

func (CodecData) Type

func (inst CodecData) Type() av.CodecType

Type func

type MPEG4AudioConfig

type MPEG4AudioConfig struct {
	SampleRate      int
	ChannelLayout   av.ChannelLayout
	ObjectType      uint
	SampleRateIndex uint
	ChannelConfig   uint
}

MPEG4AudioConfig struct

func ParseADTSHeader

func ParseADTSHeader(frame []byte) (config MPEG4AudioConfig, hdrlen int, framelen int, samples int, err error)

ParseADTSHeader func

func ParseMPEG4AudioConfigBytes

func ParseMPEG4AudioConfigBytes(data []byte) (config MPEG4AudioConfig, err error)

ParseMPEG4AudioConfigBytes func

func (*MPEG4AudioConfig) Complete

func (inst *MPEG4AudioConfig) Complete()

Complete func

func (MPEG4AudioConfig) IsValid

func (inst MPEG4AudioConfig) IsValid() bool

IsValid func

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL