cc

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 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
	//update guangjin
	ECTCount01 uint8
	ECTCount11 uint8
	Feedback   time.Time
}

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