ac3parser

package
v0.0.0-...-2c73de7 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	A52HalfRate = []int{0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3}

	A52BitRates = []int{
		32, 40, 48, 56, 64, 80, 96, 112, 128, 160,
		192, 224, 256, 320, 384, 448, 512, 576, 640,
	}

	/* Only store frame sizes for 44.1KHz - others are simply multiples
	   of the bitrate */
	A52FrameSizes441 = []int{
		69, 70, 87, 88, 104, 105, 121, 122, 139, 140, 174, 175, 208, 209,
		243, 244, 278, 279, 348, 349, 417, 418, 487, 488, 557, 558, 696, 697,
		835, 836, 975, 976, 1114, 1115, 1253, 1254, 1393, 1394,
	}
)

Functions

func IsValidAC3FrameHeader

func IsValidAC3FrameHeader(header []byte) bool

func ParseAC3

func ParseAC3(frame []byte) (spf_ int, framelen_ int, samplerate_ int)

Types

type CodecData

type CodecData struct {
	CodecType_     av.CodecType
	SampleRate_    int
	SampleFormat_  av.SampleFormat
	ChannelLayout_ av.ChannelLayout
}

func NewCodecDataAC3

func NewCodecDataAC3() (self CodecData)

func (CodecData) ChannelLayout

func (self CodecData) ChannelLayout() av.ChannelLayout

func (CodecData) PacketDuration

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

func (CodecData) SampleFormat

func (self CodecData) SampleFormat() av.SampleFormat

func (CodecData) SampleRate

func (self CodecData) SampleRate() int

func (CodecData) Type

func (self CodecData) Type() av.CodecType

Jump to

Keyboard shortcuts

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