utils

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitChannelWithTimeout

func WaitChannelWithTimeout(c <-chan bool, nbWaitFor int, d time.Duration) (err error)

WaitChannelWithTimeout read exactly number of nbWaitFor values out from channel then return if this cannot achieve within timeout duration, non-nil error returned

Types

type PacketList added in v0.0.3

type PacketList struct {
	Payload     []byte // rtp payload
	RawBuffer   []byte // rtp payload + rtp header
	PayloadType uint8
	Pts         uint32 // presentation timestamp
	PrevPts     uint32 // previous packet's pts
	Marker      bool   // should mark-bit in rtp header be set?
	Ssrc        uint32
	Csrc        []uint32
	// contains filtered or unexported fields
}

PacketList is either received RTP data packet or generated packets by codecs that can be readily put to stack for transmission. audio data is usually one packet at a time as no pts is required, but video codecs can build multiple packets of the same pts. those packets can be linked and send to rtp stack as a whole.

func NewPacketListFromRtpPacket added in v0.0.3

func NewPacketListFromRtpPacket(packet *rtp.DataPacket) *PacketList

func (*PacketList) GetLast added in v0.0.3

func (pl *PacketList) GetLast() *PacketList

func (*PacketList) Iterate added in v0.0.3

func (pl *PacketList) Iterate(f func(p *PacketList))

func (*PacketList) Len added in v0.0.3

func (pl *PacketList) Len() (length int)

func (*PacketList) Next added in v0.0.3

func (pl *PacketList) Next() *PacketList

func (*PacketList) SetNext added in v0.0.3

func (pl *PacketList) SetNext(npl *PacketList)

Jump to

Keyboard shortcuts

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