package twcc
Import Path
github.com/pion/interceptor/pkg/twcc (on go.dev)
Dependency Relation
imports 11 packages, and imported by one package
Involved Source Files
arrival_time_map.go
header_extension_interceptor.go
sender_interceptor.go
Package twcc provides interceptors to implement transport wide congestion control.
Package-Level Type Names (total 6)
HeaderExtensionInterceptor adds transport wide sequence numbers as header extension to each RTP packet.
NoOp interceptor.NoOp
BindLocalStream returns a writer that adds a rtp.TransportCCExtension
header with increasing sequence numbers to each outgoing packet.
BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might
change in the future. The returned method will be called once per packet batch.
BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
will be called once per packet batch.
BindRemoteStream lets you modify any incoming RTP packets.
It is called once for per RemoteStream. The returned method
will be called once per rtp packet.
Close closes the Interceptor, cleaning up any data if necessary.
UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
UnbindRemoteStream is called when the Stream is removed. It can be used to clean up any data related to that track.
*HeaderExtensionInterceptor : github.com/pion/interceptor.Interceptor
*HeaderExtensionInterceptor : github.com/prometheus/common/expfmt.Closer
*HeaderExtensionInterceptor : io.Closer
HeaderExtensionInterceptorFactory is a interceptor.Factory for a HeaderExtensionInterceptor.
NewInterceptor constructs a new HeaderExtensionInterceptor.
*HeaderExtensionInterceptorFactory : github.com/pion/interceptor.Factory
func NewHeaderExtensionInterceptor() (*HeaderExtensionInterceptorFactory, error)
An Option is a function that can be used to configure a SenderInterceptor.
func SendInterval(interval time.Duration) Option
func NewSenderInterceptor(opts ...Option) (*SenderInterceptorFactory, error)
Recorder records incoming RTP packets and their delays and creates
transport wide congestion control feedback reports as specified in
https://datatracker.ietf.org/doc/html/draft-holmer-rmcat-transport-wide-cc-extensions-01
BuildFeedbackPacket creates a new RTCP packet containing a TWCC feedback report.
PacketsHeld returns the number of received packets currently held by the recorder.
Record marks a packet with mediaSSRC and a transport wide sequence number sequenceNumber as received at arrivalTime.
func NewRecorder(senderSSRC uint32) *Recorder
SenderInterceptor sends transport wide congestion control reports as specified in:
https://datatracker.ietf.org/doc/html/draft-holmer-rmcat-transport-wide-cc-extensions-01
NoOp interceptor.NoOp
BindLocalStream lets you modify any outgoing RTP packets. It is called once for per LocalStream. The returned method
will be called once per rtp packet.
BindRTCPReader lets you modify any incoming RTCP packets. It is called once per sender/receiver, however this might
change in the future. The returned method will be called once per packet batch.
BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
will be called once per packet batch.
BindRemoteStream lets you modify any incoming RTP packets.
It is called once for per RemoteStream. The returned method
will be called once per rtp packet.
Close closes the interceptor.
UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
UnbindRemoteStream is called when the Stream is removed. It can be used to clean up any data related to that track.
*SenderInterceptor : github.com/pion/interceptor.Interceptor
*SenderInterceptor : github.com/prometheus/common/expfmt.Closer
*SenderInterceptor : io.Closer
SenderInterceptorFactory is a interceptor.Factory for a SenderInterceptor.
NewInterceptor constructs a new SenderInterceptor.
*SenderInterceptorFactory : github.com/pion/interceptor.Factory
func NewSenderInterceptor(opts ...Option) (*SenderInterceptorFactory, error)
Package-Level Functions (total 4)
NewHeaderExtensionInterceptor returns a HeaderExtensionInterceptorFactory.
NewRecorder creates a new Recorder which uses the given senderSSRC in the created
feedback packets.
NewSenderInterceptor returns a new SenderInterceptorFactory configured with the given options.
SendInterval sets the interval at which the interceptor
will send new feedback reports.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |