{"modulePath":"github.com/Monibuca/plugin-rtp","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package plugin_rtp\n\n## Constants\n\n```go\nconst (\n\tUDPTransfer        int = 0\n\tTCPTransferActive  int = 1\n\tTCPTransferPassive int = 2\n\tLocalCache         int = 3\n)\n```\n\n```go\nconst (\n\tStreamTypeH264 = 0x1b\n\tStreamTypeH265 = 0x24\n\tG711Mu         = 0x90\n\tG7221AUDIOTYPE = 0x92\n\tG7231AUDIOTYPE = 0x93\n\tG729AUDIOTYPE  = 0x99\n)\n```\n\n```go\nconst (\n\tStreamIDVideo = 0xe0\n\tStreamIDAudio = 0xc0\n)\n```\n\n```go\nconst (\n\tStartCodePS        = 0x000001ba\n\tStartCodeSYS       = 0x000001bb\n\tStartCodeMAP       = 0x000001bc\n\tStartCodeVideo     = 0x000001e0\n\tStartCodeAudio     = 0x000001c0\n\tHaiKangCode        = 0x000001bd\n\tMEPGProgramEndCode = 0x000001b9\n)\n```\n\n```go\nconst (\n\tRTPHeaderLength    int = 12\n\tPSHeaderLength     int = 14\n\tSystemHeaderLength int = 18\n\tMAPHeaderLength    int = 24\n\tPESHeaderLength    int = 19\n\tRtpLoadLength      int = 1460\n\tPESLoadLength      int = 0xFFFF\n\tMAXFrameLen        int = 1024 * 1024 * 2\n)\n```\n... len limit\n\n## Variables\n\n```go\nvar (\n\tErrNotFoundStartCode = errors.New(\"not found the need start code flag\")\n\tErrMarkerBit         = errors.New(\"marker bit value error\")\n\tErrFormatPack        = errors.New(\"not package standard\")\n\tErrParsePakcet       = errors.New(\"parse ps packet error\")\n)\n```\n\n## Types\n\n```go\ntype DecPSPackage struct {\n\tVideoStreamType uint32\n\tAudioStreamType uint32\n\tbuffer.RawBuffer\n\tVideoPayload []byte\n\tAudioPayload []byte\n\t// contains filtered or unexported fields\n}\n```\n[https://github.com/videolan/vlc/blob/master/modules/demux/mpeg](https://github.com/videolan/vlc/blob/master/modules/demux/mpeg)\n\n```go\nfunc (dec *DecPSPackage) Read(data []byte) error\n```\ndata包含 接受到完整一帧数据后，所有的payload, 解析出去后是一阵完整的raw数据\n\n```go\ntype RTP struct {\n\tNALU\n}\n```\n\n```go\nfunc (rtp *RTP) PushPack(pack *RTPPack)\n```\n\n```go\ntype RTPPack struct {\n\tType RTPType\n\trtp.Packet\n}\n```\n\n```go\ntype RTPType int\n```\n\n```go\nconst (\n\tRTP_TYPE_AUDIO RTPType = iota\n\tRTP_TYPE_VIDEO\n\tRTP_TYPE_AUDIOCONTROL\n\tRTP_TYPE_VIDEOCONTROL\n)\n```\n\n```go\nfunc (rt RTPType) String() string\n```\n\n```go\ntype RTP_PS struct {\n\tRTP\n\trtp.Packet\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (rtp *RTP_PS) PushPS(ps []byte)\n```\n\n","path":"github.com/Monibuca/plugin-rtp","name":"plugin_rtp","synopsis":"","isRedistributable":true}
