Versions in this module Expand all Collapse all v0 v0.0.2 Aug 24, 2023 v0.0.1 Aug 23, 2023 Changes in this version + const RTP_FIX_HEAD_LEN + type AACPacker struct + func NewAACPacker(pt uint8, ssrc uint32, sequence uint16, mtu int) *AACPacker + func (packer *AACPacker) Pack(data []byte, timestamp uint32) error + type AACUnPacker struct + func NewAACUnPacker(sizeLength int, indexLength int, asc []byte) *AACUnPacker + func (unpacker *AACUnPacker) UnPack(pkt []byte) error + type CommPacker struct + func (pack *CommPacker) HookRtp(cb RTP_HOOK_FUNC) + func (pack *CommPacker) OnPacket(onPkt ON_RTP_PKT_FUNC) + func (pack *CommPacker) SetMtu(mtu int) + type CommUnPacker struct + func (unpack *CommUnPacker) HookRtp(cb RTP_HOOK_FUNC) + func (unpack *CommUnPacker) OnFrame(onframe ON_FRAME_FUNC) + type G711Packer struct + func NewG711Packer(pt uint8, ssrc uint32, sequence uint16, mtu int) *G711Packer + func (packer *G711Packer) Pack(data []byte, timestamp uint32) error + type G711UnPacker struct + func NewG711UnPacker() *G711UnPacker + func (unpacker *G711UnPacker) UnPack(pkt []byte) error + type H264Packer struct + func NewH264Packer(pt uint8, ssrc uint32, sequence uint16, mtu int) *H264Packer + func (pack *H264Packer) EnableStapA() + func (pack *H264Packer) Pack(frame []byte, timestamp uint32) (err error) + type H264UnPacker struct + func NewH264UnPacker() *H264UnPacker + func (unpacker *H264UnPacker) UnPack(pkt []byte) error + type H265Packer struct + func NewH265Packer(pt uint8, ssrc uint32, sequence uint16, mtu int) *H265Packer + func (h265 *H265Packer) Pack(data []byte, timestamp uint32) error + type H265UnPacker struct + func NewH265UnPacker() *H265UnPacker + func (unpacker *H265UnPacker) UnPack(pkt []byte) error + type ON_FRAME_FUNC func(frame []byte, timestamp uint32, lost bool) + type ON_RTP_PKT_FUNC func(pkt []byte) error + type Packer interface + HookRtp func(cb RTP_HOOK_FUNC) + OnPacket func(onPkt ON_RTP_PKT_FUNC) + Pack func(data []byte, timestamp uint32) error + SetMtu func(mtu int) + type RTP_HOOK_FUNC func(pkg *RtpPacket) + type RtpHdr struct + CC uint8 + CSRC []uint32 + ExtensionFlag uint8 + Marker uint8 + PaddingFlag uint8 + PayloadType uint8 + SSRC uint32 + SequenceNumber uint16 + Timestamp uint32 + Version uint8 + func (head *RtpHdr) Decode(pkt []byte) (int, error) + func (head *RtpHdr) Encode() []byte + type RtpPacket struct + Extensions []byte + Header RtpHdr + Padding []byte + Payload []byte + func (pkg *RtpPacket) Decode(data []byte) error + func (pkg *RtpPacket) Encode() []byte + type TsPacker struct + func NewTsPacker(pt uint8, ssrc uint32, sequence uint16, mtu int) *TsPacker + func (pack *TsPacker) Pack(data []byte, timestamp uint32) error + type TsUnPacker struct + func NewTsUnPacker() *TsUnPacker + func (unpacker *TsUnPacker) UnPack(pkt []byte) error + type UnPacker interface + HookRtp func(cb RTP_HOOK_FUNC) + OnFrame func(onframe ON_FRAME_FUNC) + UnPack func(pkt []byte) error