plugin_rtp

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 6 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

plugin-rtp

rtp 插件用于给rtsp、webrtc、gb28181 提供基础功能 主要作用是将RTP包解码传入引擎中

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
	G711Mu         = 0x90
	G7221AUDIOTYPE = 0x92
	G7231AUDIOTYPE = 0x93
	G729AUDIOTYPE  = 0x99
)
View Source
const (
	StreamIDVideo = 0xe0
	StreamIDAudio = 0xc0
)
View Source
const (
	StartCodePS        = 0x000001ba
	StartCodeSYS       = 0x000001bb
	StartCodeMAP       = 0x000001bc
	StartCodeVideo     = 0x000001e0
	StartCodeAudio     = 0x000001c0
	HaiKangCode        = 0x000001bd
	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
	buffer.RawBuffer
	VideoPayload []byte
	AudioPayload []byte
	// contains filtered or unexported fields
}

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

func (*DecPSPackage) Read

func (dec *DecPSPackage) Read(data []byte) error

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

type RTP

type RTP struct {
	NALU
}

func (*RTP) PushPack

func (rtp *RTP) PushPack(pack *RTPPack)

type RTPPack

type RTPPack struct {
	Type RTPType
	rtp.Packet
}

type RTPType

type RTPType int
const (
	RTP_TYPE_AUDIO RTPType = iota
	RTP_TYPE_VIDEO
	RTP_TYPE_AUDIOCONTROL
	RTP_TYPE_VIDEOCONTROL
)

func (RTPType) String

func (rt RTPType) String() string

type RTP_PS

type RTP_PS struct {
	RTP
	rtp.Packet
	// contains filtered or unexported fields
}

func (*RTP_PS) PushPS

func (rtp *RTP_PS) PushPS(ps []byte)

Jump to

Keyboard shortcuts

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