flv

package module
v0.0.0-...-065f610 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 9 Imported by: 2

README

flv

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBytes

func GetBytes(s int) []byte

func PutBytes

func PutBytes(slice []byte)

Types

type Demuxer

type Demuxer interface {
	ReadHeader(*HeaderCompo) error
	ReadTag(*TagCompo) error
	Close() error
}

func NewDemuxer

func NewDemuxer(r io.ReadCloser) (Demuxer, error)
type Header struct {
	Signature [3]uint8
	Version   uint8
	// the below four vars combine as a var TypeFlags
	// TypeFlagsReserved1 [5]uint1
	// TypeFlagsAudio     uint1
	// TypeFlagsReserved2 uint1
	// TypeFlagsVideo     uint1
	TypeFlags       uint8
	DataOffset      uint32
	PreviousTagSize uint32
}

func (*Header) HasAudio

func (this *Header) HasAudio() bool

func (*Header) HasVedio

func (this *Header) HasVedio() bool

func (*Header) Valid

func (this *Header) Valid() bool

type HeaderCompo

type HeaderCompo struct {
	Raw [13]byte

	Header
}

func GetHeaderCompo

func GetHeaderCompo() *HeaderCompo

func (*HeaderCompo) Put

func (this *HeaderCompo) Put()

type Muxer

type Muxer interface {
	WriteHeader(*HeaderCompo) (err error)
	WriteTag(*TagCompo) (err error)
	Close() error
}

func NewMuxer

func NewMuxer(w io.WriteCloser) (Muxer, error)

type Parser

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

func NewParser

func NewParser() *Parser

func (*Parser) New

func (p *Parser) New() *Parser

func (*Parser) Parse

func (p *Parser) Parse(streamUrl string, out string) (err error)

func (*Parser) Stop

func (p *Parser) Stop()

func (*Parser) Type

func (p *Parser) Type() string

type TagCompo

type TagCompo struct {
	TagHeaderRaw [11]byte
	TagBodyRaw   []byte

	TagHeader
	// // equal to TagBodyRaw [0 : len-4]
	// TagData         []byte
	PreviousTagSize uint32
}

func (*TagCompo) ContainAVCSeqHeader

func (this *TagCompo) ContainAVCSeqHeader() bool

func (*TagCompo) Free

func (this *TagCompo) Free()

type TagHeader

type TagHeader struct {
	TagType byte
	// 3 bytes
	DataSize []byte
	// 4 bytes
	Timestamp         []byte
	TimestampExtended byte
	// 3 bytes
	StreamID []byte
}

func (*TagHeader) GetDataSize

func (this *TagHeader) GetDataSize() uint32

func (*TagHeader) GetTimestamp

func (this *TagHeader) GetTimestamp() uint32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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