rtpsender

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package rtpsender contains a utility to send RTP packets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

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

Sender is a utility to send RTP packets. It is in charge of: - counting sent packets - generating RTCP sender reports.

func (*Sender) Close

func (rs *Sender) Close()

Close closes the Sender.

func (*Sender) Initialize

func (rs *Sender) Initialize()

Initialize initializes a Sender.

func (*Sender) ProcessPacket

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

ProcessPacket extracts data from RTP packets.

func (*Sender) Stats

func (rs *Sender) Stats() *Stats

Stats returns statistics.

type Stats

type Stats struct {
	LastSequenceNumber uint16
	LastRTP            uint32
	LastNTP            time.Time
	TotalSent          uint64
}

Stats are statistics.

Jump to

Keyboard shortcuts

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