Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeGbk(v interface{}, body []byte) error
- func GbkToUtf8(s []byte) ([]byte, error)
- func PrintStack()
- func RandNum16String(n int) string
- func RandNumString(n int) string
- func RandString(n int) string
- func ToJSONString(v interface{}) string
- func ToPrettyString(v interface{}) string
- type DecPSPackage
- type IOBuffer
- type PriorityQueueRtp
- type Pusher
Constants ¶
View Source
const ( UDPTransfer int = 0 TCPTransferActive int = 1 TCPTransferPassive int = 2 LocalCache int = 3 StreamTypeH264 = 0x1b StreamTypeH265 = 0x24 G711A = 0x90 //PCMA G7221AUDIOTYPE = 0x92 G7231AUDIOTYPE = 0x93 G729AUDIOTYPE = 0x99 StreamIDVideo = 0xe0 StreamIDAudio = 0xc0 StartCodePS = 0x000001ba StartCodeSYS = 0x000001bb StartCodeMAP = 0x000001bc StartCodeVideo = 0x000001e0 StartCodeAudio = 0x000001c0 HaiKangCode = 0x000001bd MEPGProgramEndCode = 0x000001b9 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 )
View Source
const MaxRtpDiff = 65000 //相邻两个包之间的最大差值
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") )
View Source
var ErrEOF = errors.New("eof")
Functions ¶
func PrintStack ¶
func PrintStack()
func RandNum16String ¶
func RandNumString ¶
func RandString ¶
func ToJSONString ¶
func ToJSONString(v interface{}) string
func ToPrettyString ¶
func ToPrettyString(v interface{}) string
Types ¶
type DecPSPackage ¶
type DecPSPackage struct { VideoStreamType uint32 AudioStreamType uint32 IOBuffer Payload []byte PTS uint32 DTS uint32 // contains filtered or unexported fields }
https://github.com/videolan/vlc/blob/master/modules/demux/mpeg
func (*DecPSPackage) ReadPayload ¶
func (dec *DecPSPackage) ReadPayload() (payload []byte, err error)
type PriorityQueueRtp ¶
type PriorityQueueRtp struct {
// contains filtered or unexported fields
}
func NewPqRtp ¶
func NewPqRtp() *PriorityQueueRtp
func (*PriorityQueueRtp) Empty ¶
func (p *PriorityQueueRtp) Empty()
func (*PriorityQueueRtp) Len ¶
func (p *PriorityQueueRtp) Len() int
func (*PriorityQueueRtp) Push ¶
func (p *PriorityQueueRtp) Push(v rtp.Packet)
Click to show internal directories.
Click to hide internal directories.