av

package
v0.0.0-...-0acbec0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RtpExtension

type RtpExtension struct {
	// contains filtered or unexported fields
}

Extension RTP Header extension

type RtpHeader

type RtpHeader struct {
	Version          uint8
	Padding          bool
	Extension        bool
	Marker           bool
	PayloadType      uint8
	SequenceNumber   uint16
	Timestamp        uint32
	SSRC             uint32
	CSRC             []uint32
	ExtensionProfile uint16
	Extensions       []RtpExtension
}

RtpHeader represents an RTP packet header

func (*RtpHeader) Marshal

func (h *RtpHeader) Marshal() (buf []byte, err error)

Marshal serializes the header into bytes.

func (*RtpHeader) MarshalSize

func (h *RtpHeader) MarshalSize() int

MarshalSize returns the size of the header once marshaled.

func (*RtpHeader) MarshalTo

func (h *RtpHeader) MarshalTo(buf []byte) (n int, err error)

func (*RtpHeader) Unmarshal

func (h *RtpHeader) Unmarshal(buf []byte) (n int, err error)

Unmarshal parses the passed byte slice and stores the result in the Header. It returns the number of bytes read n and any error.

type RtpPacket

type RtpPacket struct {
	RtpHeader
	Payload     []byte
	PaddingSize byte
}

Packet represents an RTP Packet

func (*RtpPacket) FmtString

func (p *RtpPacket) FmtString() string

String helps with debugging by printing packet information in a readable way

func (*RtpPacket) Marshal

func (p *RtpPacket) Marshal() (buf []byte, err error)

Marshal serializes the packet into bytes.

func (*RtpPacket) MarshalSize

func (p *RtpPacket) MarshalSize() int

MarshalSize returns the size of the packet once marshaled.

func (*RtpPacket) MarshalTo

func (p *RtpPacket) MarshalTo(buf []byte) (n int, err error)

MarshalTo serializes the packet and writes to the buffer.

func (*RtpPacket) Unmarshal

func (p *RtpPacket) Unmarshal(buf []byte) error

Unmarshal parses the passed byte slice and stores the result in the Packet.

Jump to

Keyboard shortcuts

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