cc

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 7 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 {
	TLCC      uint16
	Size      int
	Departure time.Time
	Arrival   time.Time
	RTT       time.Duration
}

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) OnFeedback

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

OnFeedback converts incoming RTCP packet feedback to Acknowledgments. Currently only TWCC is supported.

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

Jump to

Keyboard shortcuts

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