aac

package
v1.9.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 8 Imported by: 0

README

AAC-LD and AAC-ELD

Codec Rate QuickTime ffmpeg VLC
AAC-LD 8000 yes no no
AAC-LD 16000 yes no no
AAC-LD 22050 yes yes no
AAC-LD 24000 yes yes no
AAC-LD 32000 yes yes no
AAC-ELD 8000 yes no no
AAC-ELD 16000 yes no no
AAC-ELD 22050 yes yes yes
AAC-ELD 24000 yes yes yes
AAC-ELD 32000 yes yes yes

Documentation

Index

Constants

View Source
const (
	TypeAACMain = 1
	TypeAACLC   = 2  // Low Complexity
	TypeAACLD   = 23 // Low Delay (48000, 44100, 32000, 24000, 22050)
	TypeESCAPE  = 31
	TypeAACELD  = 39 // Enhanced Low Delay

	AUTime = 1024

	// FMTP streamtype=5 - audio stream
	FMTP = "streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config="
)
View Source
const ADTSHeaderSize = 7
View Source
const RTPPacketVersionAAC = 0

Variables

This section is empty.

Functions

func ADTSTimeSize added in v1.7.0

func ADTSTimeSize(b []byte) uint32

func ADTSToCodec added in v1.7.0

func ADTSToCodec(b []byte) *core.Codec

func ADTStoRTP added in v1.7.0

func ADTStoRTP(src []byte) (dst []byte)

func CodecToADTS added in v1.7.0

func CodecToADTS(codec *core.Codec) []byte

func ConfigToCodec added in v1.7.0

func ConfigToCodec(conf []byte) *core.Codec

func DecodeConfig added in v1.7.0

func DecodeConfig(b []byte) (objType, sampleFreqIdx, channels byte, sampleRate uint32)

func EncodeConfig added in v1.7.0

func EncodeConfig(objType byte, sampleRate uint32, channels byte, shortFrame bool) []byte

func EncodeToADTS added in v1.7.0

func EncodeToADTS(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc

func IsADTS added in v1.1.0

func IsADTS(b []byte) bool

func RTPDepay

func RTPDepay(handler core.HandlerFunc) core.HandlerFunc

func RTPPay

func RTPPay(handler core.HandlerFunc) core.HandlerFunc

func RTPTimeSize added in v1.7.0

func RTPTimeSize(b []byte) uint32

func RTPToADTS added in v1.7.0

func RTPToADTS(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc

func RTPToCodec added in v1.7.0

func RTPToCodec(b []byte) *core.Codec

func ReadADTSSize added in v1.7.0

func ReadADTSSize(b []byte) uint16

func WriteADTSSize added in v1.7.0

func WriteADTSSize(b []byte, size uint16)

Types

type Consumer added in v1.7.0

type Consumer struct {
	core.Connection
	// contains filtered or unexported fields
}

func NewConsumer added in v1.7.0

func NewConsumer() *Consumer

func (*Consumer) AddTrack added in v1.7.0

func (c *Consumer) AddTrack(media *core.Media, codec *core.Codec, track *core.Receiver) error

func (*Consumer) WriteTo added in v1.7.0

func (c *Consumer) WriteTo(wr io.Writer) (int64, error)

type Producer added in v1.8.4

type Producer struct {
	core.Connection
	// contains filtered or unexported fields
}

func Open added in v1.8.4

func Open(r io.Reader) (*Producer, error)

func (*Producer) Start added in v1.8.4

func (c *Producer) Start() error

Jump to

Keyboard shortcuts

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