Documentation ¶
Overview ¶
Package report provides interceptors to implement sending sender and receiver reports.
Index ¶
- type ReceiverInterceptor
- func (r *ReceiverInterceptor) BindRTCPReader(reader interceptor.RTCPReader) interceptor.RTCPReader
- func (r *ReceiverInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter
- func (r *ReceiverInterceptor) BindRemoteStream(info *interceptor.StreamInfo, reader interceptor.RTPReader) interceptor.RTPReader
- func (r *ReceiverInterceptor) Close() error
- func (r *ReceiverInterceptor) UnbindRemoteStream(info *interceptor.StreamInfo)
- type ReceiverInterceptorFactory
- type ReceiverOption
- type SenderInterceptor
- func (s *SenderInterceptor) BindLocalStream(info *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter
- func (s *SenderInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter
- func (s *SenderInterceptor) Close() error
- func (s *SenderInterceptor) UnbindLocalStream(info *interceptor.StreamInfo)
- type SenderInterceptorFactory
- type SenderOption
- type Ticker
- type TickerFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReceiverInterceptor ¶
type ReceiverInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
ReceiverInterceptor interceptor generates receiver reports.
func (*ReceiverInterceptor) BindRTCPReader ¶
func (r *ReceiverInterceptor) 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 (*ReceiverInterceptor) BindRTCPWriter ¶
func (r *ReceiverInterceptor) 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 (*ReceiverInterceptor) BindRemoteStream ¶
func (r *ReceiverInterceptor) 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 (*ReceiverInterceptor) Close ¶
func (r *ReceiverInterceptor) Close() error
Close closes the interceptor.
func (*ReceiverInterceptor) UnbindRemoteStream ¶ added in v0.1.26
func (r *ReceiverInterceptor) UnbindRemoteStream(info *interceptor.StreamInfo)
UnbindRemoteStream is called when the Stream is removed. It can be used to clean up any data related to that track.
type ReceiverInterceptorFactory ¶ added in v0.1.0
type ReceiverInterceptorFactory struct {
// contains filtered or unexported fields
}
ReceiverInterceptorFactory is a interceptor.Factory for a ReceiverInterceptor
func NewReceiverInterceptor ¶
func NewReceiverInterceptor(opts ...ReceiverOption) (*ReceiverInterceptorFactory, error)
NewReceiverInterceptor returns a new ReceiverInterceptorFactory
func (*ReceiverInterceptorFactory) NewInterceptor ¶ added in v0.1.0
func (r *ReceiverInterceptorFactory) NewInterceptor(_ string) (interceptor.Interceptor, error)
NewInterceptor constructs a new ReceiverInterceptor
type ReceiverOption ¶
type ReceiverOption func(r *ReceiverInterceptor) error
ReceiverOption can be used to configure ReceiverInterceptor.
func ReceiverInterval ¶
func ReceiverInterval(interval time.Duration) ReceiverOption
ReceiverInterval sets send interval for the interceptor.
func ReceiverLog ¶
func ReceiverLog(log logging.LeveledLogger) ReceiverOption
ReceiverLog sets a logger for the interceptor.
func ReceiverNow ¶
func ReceiverNow(f func() time.Time) ReceiverOption
ReceiverNow sets an alternative for the time.Now function.
type SenderInterceptor ¶
type SenderInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
SenderInterceptor interceptor generates sender reports.
func (*SenderInterceptor) BindLocalStream ¶
func (s *SenderInterceptor) BindLocalStream(info *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter
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.
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) Close ¶
func (s *SenderInterceptor) Close() error
Close closes the interceptor.
func (*SenderInterceptor) UnbindLocalStream ¶ added in v0.1.26
func (s *SenderInterceptor) 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 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 ...SenderOption) (*SenderInterceptorFactory, error)
NewSenderInterceptor returns a new SenderInterceptorFactory
func (*SenderInterceptorFactory) NewInterceptor ¶ added in v0.1.0
func (s *SenderInterceptorFactory) NewInterceptor(_ string) (interceptor.Interceptor, error)
NewInterceptor constructs a new SenderInterceptor
type SenderOption ¶
type SenderOption func(r *SenderInterceptor) error
SenderOption can be used to configure SenderInterceptor.
func SenderInterval ¶
func SenderInterval(interval time.Duration) SenderOption
SenderInterval sets send interval for the interceptor.
func SenderLog ¶
func SenderLog(log logging.LeveledLogger) SenderOption
SenderLog sets a logger for the interceptor.
func SenderNow ¶
func SenderNow(f func() time.Time) SenderOption
SenderNow sets an alternative for the time.Now function.
func SenderTicker ¶ added in v0.1.18
func SenderTicker(f TickerFactory) SenderOption
SenderTicker sets an alternative for the time.NewTicker function.
func SenderUseLatestPacket ¶ added in v0.1.20
func SenderUseLatestPacket() SenderOption
SenderUseLatestPacket sets the interceptor to always use the latest packet, even if it appears to be out-of-order.
type Ticker ¶ added in v0.1.18
Ticker is an interface for *time.Ticker for use with the SenderTicker option.
type TickerFactory ¶ added in v0.1.18
TickerFactory is a factory to create new tickers