Documentation ¶
Overview ¶
Package intervalpli is an interceptor that requests PLI on a static interval. Useful when bridging protocols that don't have receiver feedback
Index ¶
- type GeneratorInterceptor
- func (r *GeneratorInterceptor) BindRTCPReader(reader interceptor.RTCPReader) interceptor.RTCPReader
- func (r *GeneratorInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter
- func (r *GeneratorInterceptor) BindRemoteStream(info *interceptor.StreamInfo, reader interceptor.RTPReader) interceptor.RTPReader
- func (r *GeneratorInterceptor) Close() error
- func (r *GeneratorInterceptor) ForcePLI(ssrc ...uint32)
- func (r *GeneratorInterceptor) UnbindLocalStream(info *interceptor.StreamInfo)
- type GeneratorOption
- type ReceiverInterceptorFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeneratorInterceptor ¶
type GeneratorInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
GeneratorInterceptor interceptor sends PLI packets. Implements PLI in a naive way: sends a PLI for each new track that support PLI, periodically.
func NewGeneratorInterceptor ¶
func NewGeneratorInterceptor(opts ...GeneratorOption) (*GeneratorInterceptor, error)
NewGeneratorInterceptor returns a new GeneratorInterceptor interceptor.
func (*GeneratorInterceptor) BindRTCPReader ¶
func (r *GeneratorInterceptor) BindRTCPReader(reader interceptor.RTCPReader) interceptor.RTCPReader
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.
func (*GeneratorInterceptor) BindRTCPWriter ¶
func (r *GeneratorInterceptor) 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 (*GeneratorInterceptor) BindRemoteStream ¶
func (r *GeneratorInterceptor) 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 (*GeneratorInterceptor) Close ¶
func (r *GeneratorInterceptor) Close() error
Close closes the interceptor.
func (*GeneratorInterceptor) ForcePLI ¶
func (r *GeneratorInterceptor) ForcePLI(ssrc ...uint32)
ForcePLI sends a PLI request to the tracks matching the provided SSRCs.
func (*GeneratorInterceptor) UnbindLocalStream ¶
func (r *GeneratorInterceptor) UnbindLocalStream(info *interceptor.StreamInfo)
UnbindLocalStream is called when the Stream is removed. It can be used to clean up any data related to that track.
type GeneratorOption ¶
type GeneratorOption func(r *GeneratorInterceptor) error
GeneratorOption can be used to configure GeneratorInterceptor.
func GeneratorInterval ¶
func GeneratorInterval(interval time.Duration) GeneratorOption
GeneratorInterval sets send interval for the interceptor.
func GeneratorLog ¶
func GeneratorLog(log logging.LeveledLogger) GeneratorOption
GeneratorLog sets a logger for the interceptor.
type ReceiverInterceptorFactory ¶
type ReceiverInterceptorFactory struct {
// contains filtered or unexported fields
}
ReceiverInterceptorFactory is a interceptor.Factory for a ReceiverInterceptor
func NewReceiverInterceptor ¶
func NewReceiverInterceptor(opts ...GeneratorOption) (*ReceiverInterceptorFactory, error)
NewReceiverInterceptor returns a new ReceiverInterceptor
func (*ReceiverInterceptorFactory) NewInterceptor ¶
func (r *ReceiverInterceptorFactory) NewInterceptor(string) (interceptor.Interceptor, error)
NewInterceptor returns a new ReceiverInterceptor interceptor.