cc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package cc implements common constructs used by Congestion Controllers

Index

Constants

View Source
const TwccExtensionAttributesKey = iota

TwccExtensionAttributesKey identifies the TWCC value in the attribute collection so we don't need to reparse

Variables

This section is empty.

Functions

This section is empty.

Types

type Acknowledgment

type Acknowledgment struct {
	SequenceNumber uint16 // Either RTP SequenceNumber or TWCC
	SSRC           uint32
	Size           int
	Departure      time.Time
	Arrival        time.Time
	ECN            rtcp.ECN
}

Acknowledgment holds information about a packet and if/when it has been sent/received.

func (Acknowledgment) String

func (a Acknowledgment) String() string

type FeedbackAdapter

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

FeedbackAdapter converts incoming RTCP Packets (TWCC and RFC8888) into Acknowledgments. Acknowledgments are the common format that Congestion Controllers in Pion understand.

func NewFeedbackAdapter

func NewFeedbackAdapter() *FeedbackAdapter

NewFeedbackAdapter returns a new FeedbackAdapter

func (*FeedbackAdapter) OnRFC8888Feedback

func (f *FeedbackAdapter) OnRFC8888Feedback(ts time.Time, feedback *rtcp.CCFeedbackReport) []Acknowledgment

OnRFC8888Feedback converts incoming Congestion Control Feedback RTCP packet to Acknowledgments.

func (*FeedbackAdapter) OnSent

func (f *FeedbackAdapter) OnSent(ts time.Time, header *rtp.Header, size int, attributes interceptor.Attributes) error

OnSent records that and when an outgoing packet was sent for later mapping to acknowledgments

func (*FeedbackAdapter) OnTransportCCFeedback

func (f *FeedbackAdapter) OnTransportCCFeedback(ts time.Time, feedback *rtcp.TransportLayerCC) ([]Acknowledgment, error)

OnTransportCCFeedback converts incoming TWCC RTCP packet feedback to Acknowledgments.

Jump to

Keyboard shortcuts

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