ogg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PAGE_HEAD_LENGTH = 282
)

Variables

View Source
var (
	CapturePattern [4]byte = [4]byte{'O', 'g', 'g', 'S'}
)

Functions

func PrintPage

func PrintPage(page *oggPage)

Types

type AudioParam

type AudioParam struct {
	CodecId        codec.CodecID
	SampleRate     uint32
	ChannelCount   uint32
	InitialPadding uint32
	ExtraData      []byte
}

type DemuxState

type DemuxState int
const (
	DEMUX_PAGE_HEAD DemuxState = iota
	DEMUX_PAGE_PAYLOAD
)

type Demuxer

type Demuxer struct {
	OnPage   func(page *oggPage)
	OnPacket func(streamId uint32, granule uint64, packet []byte, lost int)
	OnFrame  func(streamId uint32, cid codec.CodecID, frame []byte, pts uint64, dts uint64, lost int)
	// contains filtered or unexported fields
}

func NewDemuxer

func NewDemuxer() *Demuxer

func (*Demuxer) GetAudioParam

func (demuxer *Demuxer) GetAudioParam() *AudioParam

func (*Demuxer) GetVideoParam

func (demuxer *Demuxer) GetVideoParam() *VideoParam

func (*Demuxer) Input

func (demuxer *Demuxer) Input(buf []byte) (err error)

type OpusCodec

type OpusCodec struct {
}

type VP8Codec

type VP8Codec struct {
}

type VideoParam

type VideoParam struct {
	CodecId     codec.CodecID
	Width       uint32
	Height      uint32
	FrameRate   uint32
	Aspectratio uint32
	ExtraData   []byte
}

Jump to

Keyboard shortcuts

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