Documentation ¶
Overview ¶
Package cc implements common constructs used by Congestion Controllers
Index ¶
- Constants
- type Acknowledgment
- type FeedbackAdapter
- func (f *FeedbackAdapter) OnRFC8888Feedback(ts time.Time, feedback *rtcp.CCFeedbackReport) []Acknowledgment
- func (f *FeedbackAdapter) OnSent(ts time.Time, header *rtp.Header, size int, attributes interceptor.Attributes) error
- func (f *FeedbackAdapter) OnTransportCCFeedback(ts time.Time, feedback *rtcp.TransportLayerCC) ([]Acknowledgment, error)
Constants ¶
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.