Documentation ¶
Overview ¶
Package nack provides interceptors to implement sending and receiving negative acknowledgements
Index ¶
- Variables
- type GeneratorInterceptor
- func (n *GeneratorInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter
- func (n *GeneratorInterceptor) BindRemoteStream(info *interceptor.StreamInfo, reader interceptor.RTPReader) interceptor.RTPReader
- func (n *GeneratorInterceptor) Close() error
- func (n *GeneratorInterceptor) UnbindLocalStream(info *interceptor.StreamInfo)
- type GeneratorOption
- type ResponderInterceptor
- func (n *ResponderInterceptor) BindLocalStream(info *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter
- func (n *ResponderInterceptor) BindRTCPReader(reader interceptor.RTCPReader) interceptor.RTCPReader
- func (n *ResponderInterceptor) UnbindLocalStream(info *interceptor.StreamInfo)
- type ResponderOption
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidSize = errors.New("invalid buffer size")
ErrInvalidSize is returned by newReceiveLog/newSendBuffer, when an incorrect buffer size is supplied.
Functions ¶
This section is empty.
Types ¶
type GeneratorInterceptor ¶
type GeneratorInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
GeneratorInterceptor interceptor generates nack feedback messages.
func NewGeneratorInterceptor ¶
func NewGeneratorInterceptor(opts ...GeneratorOption) (*GeneratorInterceptor, error)
NewGeneratorInterceptor returns a new GeneratorInterceptor interceptor
func (*GeneratorInterceptor) BindRTCPWriter ¶
func (n *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 (n *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 (n *GeneratorInterceptor) Close() error
Close closes the interceptor
func (*GeneratorInterceptor) UnbindLocalStream ¶
func (n *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 the nack send interval for the interceptor
func GeneratorLog ¶
func GeneratorLog(log logging.LeveledLogger) GeneratorOption
GeneratorLog sets a logger for the interceptor
func GeneratorSize ¶
func GeneratorSize(size uint16) GeneratorOption
GeneratorSize sets the size of the interceptor. Size must be one of: 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768
func GeneratorSkipLastN ¶
func GeneratorSkipLastN(skipLastN uint16) GeneratorOption
GeneratorSkipLastN sets the number of packets (n-1 packets before the last received packets) to ignore when generating nack requests.
type ResponderInterceptor ¶
type ResponderInterceptor struct { interceptor.NoOp // contains filtered or unexported fields }
ResponderInterceptor responds to nack feedback messages
func NewResponderInterceptor ¶
func NewResponderInterceptor(opts ...ResponderOption) (*ResponderInterceptor, error)
NewResponderInterceptor returns a new GeneratorInterceptor interceptor
func (*ResponderInterceptor) BindLocalStream ¶
func (n *ResponderInterceptor) 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 (*ResponderInterceptor) BindRTCPReader ¶
func (n *ResponderInterceptor) 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 (*ResponderInterceptor) UnbindLocalStream ¶
func (n *ResponderInterceptor) 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 ResponderOption ¶
type ResponderOption func(s *ResponderInterceptor) error
ResponderOption can be used to configure ResponderInterceptor
func ResponderLog ¶
func ResponderLog(log logging.LeveledLogger) ResponderOption
ResponderLog sets a logger for the interceptor
func ResponderSize ¶
func ResponderSize(size uint16) ResponderOption
ResponderSize sets the size of the interceptor. Size must be one of: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768