ps

package
v0.0.0-...-b0b2ff3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDPTransfer        int = 0
	TCPTransferActive  int = 1
	TCPTransferPassive int = 2
	LocalCache         int = 3
)
View Source
const (
	StreamTypeH264 = 0x1b
	StreamTypeH265 = 0x24
	StreamTypeAAC  = 0x90
)
View Source
const (
	StreamIDVideo = 0xe0
	StreamIDAudio = 0xc0
)
View Source
const (
	StartCodePS        = 0x000001ba
	StartCodeSYS       = 0x000001bb
	StartCodeMAP       = 0x000001bc
	StartCodeVideo     = 0x000001e0
	StartCodeAudio     = 0x000001c0
	MEPGProgramEndCode = 0x000001b9
)
View Source
const (
	RTPHeaderLength    int = 12
	PSHeaderLength     int = 14
	SystemHeaderLength int = 18
	MAPHeaderLength    int = 24
	PESHeaderLength    int = 19
	RtpLoadLength      int = 1460
	PESLoadLength      int = 0xFFFF
	MAXFrameLen        int = 1024 * 1024 * 2
)

... len limit

Variables

View Source
var (
	ErrNotFoundStartCode = errors.New("not found the need start code flag")
	ErrMarkerBit         = errors.New("marker bit value error")
	ErrFormatPack        = errors.New("not package standard")
	ErrParsePakcet       = errors.New("parse ps packet error")
)

Functions

This section is empty.

Types

type DecPSPackage

type DecPSPackage struct {
	VideoStreamType uint32
	AudioStreamType uint32
	// contains filtered or unexported fields
}

https://github.com/videolan/vlc/blob/master/modules/demux/mpeg

type RtpParsePacket

type RtpParsePacket struct {
	*DecPSPackage
}

func NewRtpParsePacket

func NewRtpParsePacket() *RtpParsePacket

func (*RtpParsePacket) Clean

func (rtp *RtpParsePacket) Clean()

func (*RtpParsePacket) Read

func (rtp *RtpParsePacket) Read(data []byte) ([]byte, error)

data包含 接受到完整一帧数据后,所有的payload, 解析出去后是一阵完整的raw数据

Jump to

Keyboard shortcuts

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