aac

package
v0.24.4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package avc - parse and generate AAC meta data including ADTS headers.

Index

Constants

View Source
const (
	// AAClc - AAC-LC Low Complexity
	AAClc = 2
	// HEAACv1 - HE-AAC version 1 with SBR
	HEAACv1 = 5
	// HEAACv2 - HE-AAC version 2 with SBR and PS
	HEAACv2 = 29
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ADTSHeader

type ADTSHeader struct {
	ID                     byte // 0 is MPEG-4, 1 is MPEG-2
	ObjectType             byte
	SamplingFrequencyIndex byte
	ChannelConfig          byte
	PayloadLength          uint16
	BufferFullness         uint16
}

ADTSHeader - data for an unencrypted ADTS Header with one AAC frame. Not used in mp4 files, but in MPEG-2 TS. Defined in ISO/IEC 13818-7

func DecodeADTSHeader

func DecodeADTSHeader(r io.Reader) (header *ADTSHeader, offset int, err error)

DecodeADTSHeader by first looking for sync word

func NewADTSHeader

func NewADTSHeader(samplingFrequency int, channelConfig byte, objectType byte, plLen uint16) (*ADTSHeader, error)

func (ADTSHeader) Encode

func (a ADTSHeader) Encode() []byte

type AudioSpecificConfig

type AudioSpecificConfig struct {
	ObjectType           byte
	ChannelConfiguration byte // Defined in Table 1.19
	SamplingFrequency    int
	ExtensionFrequency   int
	SBRPresentFlag       bool
	PSPresentFlag        bool
}

AudioSpecificConfig according to ISO/IEC 14496-3 Syntax specified in Table 1.15

func DecodeAudioSpecificConfig

func DecodeAudioSpecificConfig(r io.Reader) (*AudioSpecificConfig, error)

DecodeAudioSpecificConfig -

func (*AudioSpecificConfig) Encode

func (a *AudioSpecificConfig) Encode(w io.Writer) error

Encode - write AudioSpecificConfig to w for AAC-LC and HE-AAC

Jump to

Keyboard shortcuts

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