Documentation ¶
Overview ¶
Package mpeg4audio contains utilities to work with MPEG-4 audio codecs.
Index ¶
Constants ¶
View Source
const ( // MaxAccessUnitSize is the maximum size of an Access Unit (AU). MaxAccessUnitSize = 5 * 1024 // SamplesPerAccessUnit is the number of samples contained by a single AAC AU. SamplesPerAccessUnit = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ADTSPacket ¶
type ADTSPacket struct { Type ObjectType SampleRate int ChannelCount int AU []byte }
ADTSPacket is an ADTS packet.
type ADTSPackets ¶
type ADTSPackets []*ADTSPacket
ADTSPackets is a group od ADTS packets.
func (ADTSPackets) Marshal ¶
func (ps ADTSPackets) Marshal() ([]byte, error)
Marshal encodes ADTS packets into an ADTS stream.
func (*ADTSPackets) Unmarshal ¶
func (ps *ADTSPackets) Unmarshal(buf []byte) error
Unmarshal decodes an ADTS stream into ADTS packets.
type Config ¶
type Config struct { Type ObjectType SampleRate int ChannelCount int // SBR / PS specific ExtensionType ObjectType ExtensionSampleRate int // AAC-LC specific FrameLengthFlag bool DependsOnCoreCoder bool CoreCoderDelay uint16 }
Config is a MPEG-4 Audio configuration.
type ObjectType ¶
type ObjectType int
ObjectType is a MPEG-4 Audio object type.
const ( ObjectTypeAACLC ObjectType = 2 ObjectTypeSBR ObjectType = 5 ObjectTypePS ObjectType = 29 )
supported types.
Click to show internal directories.
Click to hide internal directories.