Documentation ¶
Overview ¶
Package twcc provides interceptors to implement transport wide congestion control.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeaderExtensionInterceptor ¶
type HeaderExtensionInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
HeaderExtensionInterceptor adds transport wide sequence numbers as header extension to each RTP packet
func (*HeaderExtensionInterceptor) BindLocalStream ¶
func (h *HeaderExtensionInterceptor) BindLocalStream(info *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter
BindLocalStream returns a writer that adds a rtp.TransportCCExtension header with increasing sequence numbers to each outgoing packet.
type HeaderExtensionInterceptorFactory ¶ added in v0.1.0
type HeaderExtensionInterceptorFactory struct{}
HeaderExtensionInterceptorFactory is a interceptor.Factory for a HeaderExtensionInterceptor
func NewHeaderExtensionInterceptor ¶
func NewHeaderExtensionInterceptor() (*HeaderExtensionInterceptorFactory, error)
NewHeaderExtensionInterceptor returns a HeaderExtensionInterceptorFactory
func (*HeaderExtensionInterceptorFactory) NewInterceptor ¶ added in v0.1.0
func (h *HeaderExtensionInterceptorFactory) NewInterceptor(_ string) (interceptor.Interceptor, error)
NewInterceptor constructs a new HeaderExtensionInterceptor
type Option ¶
type Option func(*SenderInterceptor) error
An Option is a function that can be used to configure a SenderInterceptor
func SendInterval ¶
SendInterval sets the interval at which the interceptor will send new feedback reports.
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
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
func NewRecorder ¶
NewRecorder creates a new Recorder which uses the given senderSSRC in the created feedback packets.
func (*Recorder) BuildFeedbackPacket ¶
BuildFeedbackPacket creates a new RTCP packet containing a TWCC feedback report.
func (*Recorder) PacketsHeld ¶ added in v0.1.18
PacketsHeld returns the number of received packets currently held by the recorder
type SenderInterceptor ¶
type SenderInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
SenderInterceptor sends transport wide congestion control reports as specified in: https://datatracker.ietf.org/doc/html/draft-holmer-rmcat-transport-wide-cc-extensions-01
func (*SenderInterceptor) BindRTCPWriter ¶
func (s *SenderInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter
BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method will be called once per packet batch.
func (*SenderInterceptor) BindRemoteStream ¶
func (s *SenderInterceptor) BindRemoteStream(info *interceptor.StreamInfo, reader interceptor.RTPReader) interceptor.RTPReader
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.
func (*SenderInterceptor) Close ¶
func (s *SenderInterceptor) Close() error
Close closes the interceptor.
type SenderInterceptorFactory ¶ added in v0.1.0
type SenderInterceptorFactory struct {
// contains filtered or unexported fields
}
SenderInterceptorFactory is a interceptor.Factory for a SenderInterceptor
func NewSenderInterceptor ¶
func NewSenderInterceptor(opts ...Option) (*SenderInterceptorFactory, error)
NewSenderInterceptor returns a new SenderInterceptorFactory configured with the given options.
func (*SenderInterceptorFactory) NewInterceptor ¶ added in v0.1.0
func (s *SenderInterceptorFactory) NewInterceptor(_ string) (interceptor.Interceptor, error)
NewInterceptor constructs a new SenderInterceptor