track

package
v0.0.0-...-e0b6167 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Receiver

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

Receiver 对网络rtp排序, 处理rtcp包

func NewReceiver

func NewReceiver(muxer streammuxer.StreamMuxer, writer RtpRtcpWriter, media *rtcsdp.Media, ct format.Format) *Receiver

func (*Receiver) Close

func (c *Receiver) Close()

func (*Receiver) Equal

func (c *Receiver) Equal(ssrc uint32, pt uint8) bool

func (*Receiver) Format

func (c *Receiver) Format() format.Format

func (*Receiver) Media

func (c *Receiver) Media() *rtcsdp.Media

func (*Receiver) Open

func (c *Receiver) Open() error

func (*Receiver) PacketNTP

func (c *Receiver) PacketNTP(pkt *rtp.Packet) (time.Time, bool)

type RtpRtcpReader

type RtpRtcpReader interface {
	ReadPacketRTP(pkt *rtp.Packet, addr net.Addr)
	ReadPacketRTCP(packets []rtcp.Packet, addr net.Addr)
	ParsePacket(data []byte) ([]rtcp.Packet, *rtp.Packet, error)
	Close(cause error)
}

type RtpRtcpWriter

type RtpRtcpWriter interface {
	WriteRTP(*rtp.Packet, net.Addr) error
	WriteRTCP([]rtcp.Packet, net.Addr) error
	Close(cause error)
}

type Sender

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

func NewSender

func NewSender(
	muxer streammuxer.StreamMuxer,
	writer RtpRtcpWriter,
	media *rtcsdp.Media,
	ct format.Format,
	getFirstPacketNTP func() (time.Time, bool),
) *Sender

func (*Sender) Close

func (c *Sender) Close()

func (*Sender) Open

func (c *Sender) Open() error

Jump to

Keyboard shortcuts

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