rtcpsender

package
v4.16.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package rtcpsender contains a utility to generate RTCP sender reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RTCPSender

type RTCPSender struct {
	ClockRate       int
	Period          time.Duration
	TimeNow         func() time.Time
	WritePacketRTCP func(rtcp.Packet)
	// contains filtered or unexported fields
}

RTCPSender is a utility to send RTP packets. It is in charge of generating RTCP sender reports.

func New deprecated

func New(
	clockRate int,
	period time.Duration,
	timeNow func() time.Time,
	writePacketRTCP func(rtcp.Packet),
) *RTCPSender

New allocates a RTCPSender.

Deprecated: replaced by Initialize().

func (*RTCPSender) Close

func (rs *RTCPSender) Close()

Close closes the RTCPSender.

func (*RTCPSender) Initialize

func (rs *RTCPSender) Initialize()

Initialize initializes a RTCPSender.

func (*RTCPSender) LastPacketData deprecated

func (rs *RTCPSender) LastPacketData() (uint16, uint32, time.Time, bool)

LastPacketData returns metadata of the last RTP packet.

Deprecated: replaced by Stats().

func (*RTCPSender) ProcessPacket

func (rs *RTCPSender) ProcessPacket(pkt *rtp.Packet, ntp time.Time, ptsEqualsDTS bool)

ProcessPacket extracts data from RTP packets.

func (*RTCPSender) SenderSSRC deprecated

func (rs *RTCPSender) SenderSSRC() (uint32, bool)

SenderSSRC returns the SSRC of outgoing RTP packets.

Deprecated: replaced by Stats().

func (*RTCPSender) Stats

func (rs *RTCPSender) Stats() *Stats

Stats returns statistics.

type Stats

type Stats struct {
	// Deprecated: this is not a statistics anymore but a fixed parameter.
	// it will be removed in next version.
	LocalSSRC uint32

	LastSequenceNumber uint16
	LastRTP            uint32
	LastNTP            time.Time
}

Stats are statistics.

Jump to

Keyboard shortcuts

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