flv

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: GPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// SoundFormat
	LPCM_PE  SoundFormat = 0 // Linear PCM, platform endian
	ADPCM    SoundFormat = 1
	MP3      SoundFormat = 2
	LPCM_LE  SoundFormat = 3 // Linear PCM, little endian
	AAC      SoundFormat = 10
	Speex    SoundFormat = 11
	MP3_8kHz SoundFormat = 14 // MP3 8 kHz

	// SoundRate
	Rate5kHz  SoundRate = 0 // 5.5kHz
	Rate11kHz SoundRate = 1 // 11 kHz
	Rate22kHz SoundRate = 2 // 22 kHz
	Rate44kHz SoundRate = 3 // 44 kHz

	// SoundSize
	Sample8  uint8 = 0 // 8-bit samples
	Sample16 uint8 = 1 // 16-bit samples

	// SoundType
	Mono   SoundType = 0 // Mono sound
	Stereo SoundType = 1 // Stereo sound

	// AACPacketType
	AACSeqHeader AACPacketType = 0
	AACRaw       AACPacketType = 1
)
View Source
const (
	// Frame Type
	KeyFrame             FrameType = 1 // for AVC, a seekable frame
	InterFrame           FrameType = 2 // for AVC, a non-seekable frame
	DisposableInterFrame FrameType = 3 // H.263 only
	GeneratedKeyFrame    FrameType = 4 // reserved for server use only
	VideoInfoFrame       FrameType = 5 // video info/command frame

	// CodeID
	H263Code          CodeID = 2 // Sorenson H.263
	ScreenVideoCode   CodeID = 3 // Screen video
	VP6Code           CodeID = 4 // On2 VP6
	VP6AlphaCode      CodeID = 5 // On2 VP6 with alpha channel
	ScreenVideoV2Code CodeID = 6 // Screen video version 2
	AVCCode           CodeID = 7 // AVC

	// AVCPacketType
	AVCSeqHeader AVCPacketType = 0 // AVC sequence header
	AVCNALU      AVCPacketType = 1 // NALU
	AVCEndSeq    AVCPacketType = 2 // AVC end of sequence (lower level NALU sequence ender is not required or supported)
)
View Source
const (
	Name = "native"
)

Variables

View Source
var (
	ErrNotFlvStream = errors.New("not flv stream")
	ErrUnknownTag   = errors.New("unknown tag")
)

Functions

This section is empty.

Types

type AACPacketType

type AACPacketType uint8

type AVCPacketType

type AVCPacketType uint8

type AudioTagHeader

type AudioTagHeader struct {
	SoundFormat   SoundFormat
	SoundRate     SoundRate
	SoundSize     SoundSize
	SoundType     SoundType
	AACPacketType AACPacketType
}

type CodeID

type CodeID uint8

type DataType

type DataType uint8
const (
	Number          DataType = 0
	Boolean         DataType = 1
	String          DataType = 2
	Object          DataType = 3
	Null            DataType = 5
	Undefined       DataType = 6
	Reference       DataType = 7
	ECMAArray       DataType = 8
	ObjectEndMarker DataType = 9
	StrictArray     DataType = 10
	Date            DataType = 11
	LongString      DataType = 12
)

type FrameType

type FrameType uint8

type Metadata

type Metadata struct {
	HasVideo, HasAudio bool
}

type Parser

type Parser struct {
	Metadata Metadata
	// contains filtered or unexported fields
}

func (*Parser) ParseLiveStream

func (p *Parser) ParseLiveStream(ctx context.Context, url *url.URL, live live.Live, file string) error

func (*Parser) Stop

func (p *Parser) Stop() error

type SoundFormat

type SoundFormat uint8

type SoundRate

type SoundRate uint8

type SoundSize

type SoundSize uint8

type SoundType

type SoundType uint8

type VideoTagHeader

type VideoTagHeader struct {
	FrameType       FrameType
	CodeID          CodeID
	AVCPacketType   AVCPacketType
	CompositionTime uint32
}

Jump to

Keyboard shortcuts

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