Documentation ¶
Index ¶
- Constants
- Variables
- type AudioLevelHandle
- type Bitrates
- type DownTrack
- func (d *DownTrack) AddReceiverReportListener(listener ReceiverReportListener)
- func (d *DownTrack) AllocateNextHigher(availableChannelCapacity int64, allowOvershoot bool) (VideoAllocation, bool)
- func (d *DownTrack) AllocateOptimal(allowOvershoot bool) VideoAllocation
- func (d *DownTrack) BandwidthRequested() int64
- func (d *DownTrack) Bind(t webrtc.TrackLocalContext) (webrtc.RTPCodecParameters, error)
- func (d *DownTrack) ClearStreamAllocatorReportInterval()
- func (d *DownTrack) Close()
- func (d *DownTrack) CloseWithFlush(flush bool)
- func (d *DownTrack) Codec() webrtc.RTPCodecCapability
- func (d *DownTrack) CreateSenderReport() *rtcp.SenderReport
- func (d *DownTrack) CreateSourceDescriptionChunks() []rtcp.SourceDescriptionChunk
- func (d *DownTrack) DebugInfo() map[string]interface{}
- func (d *DownTrack) DistanceToDesired() float64
- func (d *DownTrack) GetConnectionScoreAndQuality() (float32, livekit.ConnectionQuality)
- func (d *DownTrack) GetDeltaStatsSender() map[uint32]*buffer.StreamStatsWithLayers
- func (d *DownTrack) GetLastReceiverReportTime() time.Time
- func (d *DownTrack) GetNackStats() (totalPackets uint32, totalRepeatedNACKs uint32)
- func (d *DownTrack) GetNextHigherTransition(allowOvershoot bool) (VideoTransition, bool)
- func (d *DownTrack) GetState() DownTrackState
- func (d *DownTrack) GetTotalPacketsSent() uint64
- func (d *DownTrack) GetTrackStats() *livekit.RTPStats
- func (d *DownTrack) GetTransceiver() *webrtc.RTPTransceiver
- func (d *DownTrack) HandleRTCPSenderReportData(_payloadType webrtc.PayloadType, isSVC bool, layer int32, ...) error
- func (d *DownTrack) ID() string
- func (d *DownTrack) IsClosed() bool
- func (d *DownTrack) IsDeficient() bool
- func (d *DownTrack) Kind() webrtc.RTPCodecType
- func (d *DownTrack) MaxLayer() buffer.VideoLayer
- func (d *DownTrack) Mute(muted bool)
- func (d *DownTrack) OnBinding(fn func(error))
- func (d *DownTrack) OnCloseHandler(fn func(isExpectedToResume bool))
- func (d *DownTrack) OnCodecNegotiated(f func(webrtc.RTPCodecCapability))
- func (d *DownTrack) OnMaxLayerChanged(fn func(dt *DownTrack, layer int32))
- func (d *DownTrack) OnRttUpdate(fn func(dt *DownTrack, rtt uint32))
- func (d *DownTrack) OnStatsUpdate(fn func(dt *DownTrack, stat *livekit.AnalyticsStat))
- func (d *DownTrack) Pause() VideoAllocation
- func (d *DownTrack) ProvisionalAllocate(availableChannelCapacity int64, layers buffer.VideoLayer, allowPause bool, ...) (bool, int64)
- func (d *DownTrack) ProvisionalAllocateCommit() VideoAllocation
- func (d *DownTrack) ProvisionalAllocateGetBestWeightedTransition() VideoTransition
- func (d *DownTrack) ProvisionalAllocateGetCooperativeTransition(allowOvershoot bool) VideoTransition
- func (d *DownTrack) ProvisionalAllocatePrepare()
- func (d *DownTrack) ProvisionalAllocateReset()
- func (d *DownTrack) PubMute(pubMuted bool)
- func (d *DownTrack) RID() string
- func (d *DownTrack) Resync()
- func (d *DownTrack) SSRC() uint32
- func (d *DownTrack) SeedState(state DownTrackState)
- func (d *DownTrack) SetActivePaddingOnMuteUpTrack()
- func (d *DownTrack) SetConnected()
- func (d *DownTrack) SetMaxSpatialLayer(spatialLayer int32)
- func (d *DownTrack) SetMaxTemporalLayer(temporalLayer int32)
- func (d *DownTrack) SetRTPHeaderExtensions(rtpHeaderExtensions []webrtc.RTPHeaderExtensionParameter)
- func (d *DownTrack) SetStreamAllocatorListener(listener DownTrackStreamAllocatorListener)
- func (d *DownTrack) SetStreamAllocatorReportInterval(interval time.Duration)
- func (d *DownTrack) SetTransceiver(transceiver *webrtc.RTPTransceiver)
- func (d *DownTrack) Stop() error
- func (d *DownTrack) StopWriteAndGetState() DownTrackState
- func (d *DownTrack) StreamID() string
- func (d *DownTrack) SubscriberID() livekit.ParticipantID
- func (d *DownTrack) Unbind(_ webrtc.TrackLocalContext) error
- func (d *DownTrack) UpTrackBitrateAvailabilityChange()
- func (d *DownTrack) UpTrackBitrateReport(availableLayers []int32, bitrates Bitrates)
- func (d *DownTrack) UpTrackLayersChange()
- func (d *DownTrack) UpTrackMaxPublishedLayerChange(maxPublishedLayer int32)
- func (d *DownTrack) UpTrackMaxTemporalLayerSeenChange(maxTemporalLayerSeen int32)
- func (d *DownTrack) WritePaddingRTP(bytesToSend int, paddingOnMute bool, forceMarker bool) int
- func (d *DownTrack) WriteRTP(extPkt *buffer.ExtPacket, layer int32) error
- type DownTrackSpreader
- func (d *DownTrackSpreader) Broadcast(writer func(TrackSender)) int
- func (d *DownTrackSpreader) DownTrackCount() int
- func (d *DownTrackSpreader) Free(subscriberID livekit.ParticipantID)
- func (d *DownTrackSpreader) GetDownTracks() []TrackSender
- func (d *DownTrackSpreader) HasDownTrack(subscriberID livekit.ParticipantID) bool
- func (d *DownTrackSpreader) ResetAndGetDownTracks() []TrackSender
- func (d *DownTrackSpreader) Store(ts TrackSender)
- type DownTrackSpreaderParams
- type DownTrackState
- type DownTrackStreamAllocatorListener
- type DowntrackParams
- type ForwardStats
- type Forwarder
- func (f *Forwarder) AllocateNextHigher(availableChannelCapacity int64, availableLayers []int32, brs Bitrates, ...) (VideoAllocation, bool)
- func (f *Forwarder) AllocateOptimal(availableLayers []int32, brs Bitrates, allowOvershoot bool) VideoAllocation
- func (f *Forwarder) BandwidthRequested(brs Bitrates) int64
- func (f *Forwarder) CheckSync() (bool, int32)
- func (f *Forwarder) CurrentLayer() buffer.VideoLayer
- func (f *Forwarder) DetermineCodec(codec webrtc.RTPCodecCapability, ...)
- func (f *Forwarder) DistanceToDesired(availableLayers []int32, brs Bitrates) float64
- func (f *Forwarder) FilterRTX(nacks []uint16) (filtered []uint16, disallowedLayers [buffer.DefaultMaxLayerSpatial + 1]bool)
- func (f *Forwarder) GetMaxSubscribedSpatial() int32
- func (f *Forwarder) GetNextHigherTransition(brs Bitrates, allowOvershoot bool) (VideoTransition, bool)
- func (f *Forwarder) GetOptimalBandwidthNeeded(brs Bitrates) int64
- func (f *Forwarder) GetPadding(frameEndNeeded bool) ([]byte, error)
- func (f *Forwarder) GetSenderReportParams() (int32, uint64, *livekit.RTCPSenderReportState)
- func (f *Forwarder) GetSnTsForBlankFrames(frameRate uint32, numPackets int) ([]SnTs, bool, error)
- func (f *Forwarder) GetSnTsForPadding(num int, forceMarker bool) ([]SnTs, error)
- func (f *Forwarder) GetState() *livekit.RTPForwarderState
- func (f *Forwarder) GetTranslationParams(extPkt *buffer.ExtPacket, layer int32) (TranslationParams, error)
- func (f *Forwarder) IsAnyMuted() bool
- func (f *Forwarder) IsDeficient() bool
- func (f *Forwarder) IsMuted() bool
- func (f *Forwarder) IsPubMuted() bool
- func (f *Forwarder) MaxLayer() buffer.VideoLayer
- func (f *Forwarder) Mute(muted bool, isSubscribeMutable bool) bool
- func (f *Forwarder) Pause(availableLayers []int32, brs Bitrates) VideoAllocation
- func (f *Forwarder) PauseReason() VideoPauseReason
- func (f *Forwarder) ProvisionalAllocate(availableChannelCapacity int64, layer buffer.VideoLayer, allowPause bool, ...) (bool, int64)
- func (f *Forwarder) ProvisionalAllocateCommit() VideoAllocation
- func (f *Forwarder) ProvisionalAllocateGetBestWeightedTransition() (VideoTransition, []int32, Bitrates)
- func (f *Forwarder) ProvisionalAllocateGetCooperativeTransition(allowOvershoot bool) (VideoTransition, []int32, Bitrates)
- func (f *Forwarder) ProvisionalAllocatePrepare(availableLayers []int32, bitrates Bitrates)
- func (f *Forwarder) ProvisionalAllocateReset()
- func (f *Forwarder) PubMute(pubMuted bool) bool
- func (f *Forwarder) RTPMungerDebugInfo() map[string]interface{}
- func (f *Forwarder) Resync()
- func (f *Forwarder) SeedState(state *livekit.RTPForwarderState)
- func (f *Forwarder) SetMaxPublishedLayer(maxPublishedLayer int32) bool
- func (f *Forwarder) SetMaxSpatialLayer(spatialLayer int32) (bool, buffer.VideoLayer)
- func (f *Forwarder) SetMaxTemporalLayer(temporalLayer int32) (bool, buffer.VideoLayer)
- func (f *Forwarder) SetMaxTemporalLayerSeen(maxTemporalLayerSeen int32) bool
- func (f *Forwarder) SetRefSenderReport(isSVC bool, layer int32, srData *livekit.RTCPSenderReportState)
- func (f *Forwarder) TargetLayer() buffer.VideoLayer
- type PlayoutDelayController
- type PlayoutDelayState
- type RTPMunger
- func (r *RTPMunger) DebugInfo() map[string]interface{}
- func (r *RTPMunger) FilterRTX(nacks []uint16) []uint16
- func (r *RTPMunger) GetState() *livekit.RTPMungerState
- func (r *RTPMunger) GetTSOffset() uint64
- func (r *RTPMunger) IsOnFrameBoundary() bool
- func (r *RTPMunger) PacketDropped(extPkt *buffer.ExtPacket)
- func (r *RTPMunger) SeedState(state *livekit.RTPMungerState)
- func (r *RTPMunger) SetLastSnTs(extPkt *buffer.ExtPacket)
- func (r *RTPMunger) UpdateAndGetPaddingSnTs(num int, clockRate uint32, frameRate uint32, forceMarker bool, ...) ([]SnTs, error)
- func (r *RTPMunger) UpdateAndGetSnTs(extPkt *buffer.ExtPacket, marker bool) (TranslationParamsRTP, error)
- func (r *RTPMunger) UpdateSnTsOffsets(extPkt *buffer.ExtPacket, snAdjust uint64, tsAdjust uint64)
- type ReceiverOpts
- func WithAudioConfig(audioConfig config.AudioConfig) ReceiverOpts
- func WithForwardStats(forwardStats *ForwardStats) ReceiverOpts
- func WithLoadBalanceThreshold(downTracks int) ReceiverOpts
- func WithPliThrottleConfig(pliThrottleConfig config.PLIThrottleConfig) ReceiverOpts
- func WithStreamTrackers() ReceiverOpts
- type ReceiverReportListener
- type RedPrimaryReceiver
- func (r *RedPrimaryReceiver) AddDownTrack(track TrackSender) error
- func (r *RedPrimaryReceiver) CanClose() bool
- func (r *RedPrimaryReceiver) Close()
- func (r *RedPrimaryReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
- func (r *RedPrimaryReceiver) ForwardRTP(pkt *buffer.ExtPacket, spatialLayer int32) int
- func (r *RedPrimaryReceiver) IsClosed() bool
- func (r *RedPrimaryReceiver) ReadRTP(buf []byte, layer uint8, esn uint64) (int, error)
- type RedReceiver
- func (r *RedReceiver) AddDownTrack(track TrackSender) error
- func (r *RedReceiver) CanClose() bool
- func (r *RedReceiver) Close()
- func (r *RedReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
- func (r *RedReceiver) ForwardRTP(pkt *buffer.ExtPacket, spatialLayer int32) int
- func (r *RedReceiver) IsClosed() bool
- func (r *RedReceiver) ReadRTP(buf []byte, layer uint8, esn uint64) (int, error)
- type SequenceNumberOrdering
- type SnTs
- type StreamTrackerManager
- func (s *StreamTrackerManager) AddDependencyDescriptorTrackers()
- func (s *StreamTrackerManager) AddTracker(layer int32) streamtracker.StreamTrackerWorker
- func (s *StreamTrackerManager) Close()
- func (s *StreamTrackerManager) DistanceToDesired() float64
- func (s *StreamTrackerManager) GetLayeredBitrate() ([]int32, Bitrates)
- func (s *StreamTrackerManager) GetMaxPublishedLayer() int32
- func (s *StreamTrackerManager) GetMaxTemporalLayerSeen() int32
- func (s *StreamTrackerManager) GetTracker(layer int32) streamtracker.StreamTrackerWorker
- func (s *StreamTrackerManager) IsPaused() bool
- func (s *StreamTrackerManager) RemoveAllTrackers()
- func (s *StreamTrackerManager) RemoveTracker(layer int32)
- func (s *StreamTrackerManager) SetListener(listener StreamTrackerManagerListener)
- func (s *StreamTrackerManager) SetMaxExpectedSpatialLayer(layer int32) int32
- func (s *StreamTrackerManager) SetPaused(paused bool)
- func (s *StreamTrackerManager) UpdateTrackInfo(ti *livekit.TrackInfo)
- type StreamTrackerManagerListener
- type TrackReceiver
- type TrackSender
- type TranslationParams
- type TranslationParamsRTP
- type VideoAllocation
- type VideoAllocationProvisional
- type VideoPauseReason
- type VideoTransition
- type WebRTCReceiver
- func (w *WebRTCReceiver) AddDownTrack(track TrackSender) error
- func (w *WebRTCReceiver) AddOnReady(fn func())
- func (w *WebRTCReceiver) AddUpTrack(track *webrtc.TrackRemote, buff *buffer.Buffer) error
- func (w *WebRTCReceiver) Codec() webrtc.RTPCodecParameters
- func (w *WebRTCReceiver) DebugInfo() map[string]interface{}
- func (w *WebRTCReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
- func (w *WebRTCReceiver) GetAudioLevel() (float64, bool)
- func (w *WebRTCReceiver) GetConnectionScoreAndQuality() (float32, livekit.ConnectionQuality)
- func (w *WebRTCReceiver) GetDeltaStats() map[uint32]*buffer.StreamStatsWithLayers
- func (w *WebRTCReceiver) GetLastSenderReportTime() time.Time
- func (w *WebRTCReceiver) GetLayeredBitrate() ([]int32, Bitrates)
- func (w *WebRTCReceiver) GetPrimaryReceiverForRed() TrackReceiver
- func (w *WebRTCReceiver) GetRedReceiver() TrackReceiver
- func (w *WebRTCReceiver) GetTemporalLayerFpsForSpatial(layer int32) []float32
- func (w *WebRTCReceiver) GetTrackStats() *livekit.RTPStats
- func (w *WebRTCReceiver) HeaderExtensions() []webrtc.RTPHeaderExtensionParameter
- func (w *WebRTCReceiver) IsClosed() bool
- func (w *WebRTCReceiver) Kind() webrtc.RTPCodecType
- func (w *WebRTCReceiver) OnAvailableLayersChanged()
- func (w *WebRTCReceiver) OnBitrateAvailabilityChanged()
- func (w *WebRTCReceiver) OnBitrateReport(availableLayers []int32, bitrates Bitrates)
- func (w *WebRTCReceiver) OnCloseHandler(fn func())
- func (w *WebRTCReceiver) OnMaxAvailableLayerChanged(maxAvailableLayer int32)
- func (w *WebRTCReceiver) OnMaxLayerChange(fn func(maxLayer int32))
- func (w *WebRTCReceiver) OnMaxPublishedLayerChanged(maxPublishedLayer int32)
- func (w *WebRTCReceiver) OnMaxTemporalLayerSeenChanged(maxTemporalLayerSeen int32)
- func (w *WebRTCReceiver) OnStatsUpdate(fn func(w *WebRTCReceiver, stat *livekit.AnalyticsStat))
- func (w *WebRTCReceiver) ReadRTP(buf []byte, layer uint8, esn uint64) (int, error)
- func (w *WebRTCReceiver) SendPLI(layer int32, force bool)
- func (w *WebRTCReceiver) SetMaxExpectedSpatialLayer(layer int32)
- func (w *WebRTCReceiver) SetRTT(rtt uint32)
- func (w *WebRTCReceiver) SetUpTrackPaused(paused bool)
- func (w *WebRTCReceiver) StreamID() string
- func (w *WebRTCReceiver) TrackID() livekit.TrackID
- func (w *WebRTCReceiver) TrackInfo() *livekit.TrackInfo
- func (w *WebRTCReceiver) UpdateTrackInfo(ti *livekit.TrackInfo)
Constants ¶
const ( RTPPaddingMaxPayloadSize = 255 RTPPaddingEstimatedHeaderSize = 20 RTPBlankFramesMuteSeconds = float32(1.0) RTPBlankFramesCloseSeconds = float32(0.2) FlagStopRTXOnPLI = true )
const ( FlagPauseOnDowngrade = true FlagFilterRTX = false FlagFilterRTXLayers = true TransitionCostSpatial = 10 ResumeBehindThresholdSeconds = float64(0.2) // 200ms ResumeBehindHighThresholdSeconds = float64(2.0) // 2 seconds LayerSwitchBehindThresholdSeconds = float64(0.05) // 50ms SwitchAheadThresholdSeconds = float64(0.025) // 25ms )
Forwarder
const (
MimeTypeAudioRed = "audio/red"
)
const (
RtxGateWindow = 2000
)
Variables ¶
var ( ErrUnknownKind = errors.New("unknown kind of codec") ErrOutOfOrderSequenceNumberCacheMiss = errors.New("out-of-order sequence number not found in cache") ErrPaddingOnlyPacket = errors.New("padding only packet that need not be forwarded") ErrDuplicatePacket = errors.New("duplicate packet") ErrPaddingNotOnFrameBoundary = errors.New("padding cannot send on non-frame boundary") ErrDownTrackAlreadyBound = errors.New("already bound") ErrPayloadOverflow = errors.New("payload overflow") )
var ( VP8KeyFrame8x8 = []byte{ 0x10, 0x02, 0x00, 0x9d, 0x01, 0x2a, 0x08, 0x00, 0x08, 0x00, 0x00, 0x47, 0x08, 0x85, 0x85, 0x88, 0x85, 0x84, 0x88, 0x02, 0x02, 0x00, 0x0c, 0x0d, 0x60, 0x00, 0xfe, 0xff, 0xab, 0x50, 0x80, } H264KeyFrame2x2SPS = []byte{ 0x67, 0x42, 0xc0, 0x1f, 0x0f, 0xd9, 0x1f, 0x88, 0x88, 0x84, 0x00, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0xc8, 0x3c, 0x60, 0xc9, 0x20, } H264KeyFrame2x2PPS = []byte{ 0x68, 0x87, 0xcb, 0x83, 0xcb, 0x20, } H264KeyFrame2x2IDR = []byte{ 0x65, 0x88, 0x84, 0x0a, 0xf2, 0x62, 0x80, 0x00, 0xa7, 0xbe, } H264KeyFrame2x2 = [][]byte{H264KeyFrame2x2SPS, H264KeyFrame2x2PPS, H264KeyFrame2x2IDR} OpusSilenceFrame = []byte{ 0xf8, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, } )
var ( ErrReceiverClosed = errors.New("receiver closed") ErrDownTrackAlreadyExist = errors.New("DownTrack already exist") ErrBufferNotFound = errors.New("buffer not found") ErrDuplicateLayer = errors.New("duplicate layer") )
var ( ErrIncompleteRedHeader = errors.New("incomplete red block header") ErrIncompleteRedBlock = errors.New("incomplete red block payload") )
var (
PacketFactory *sync.Pool
)
var ( VideoAllocationDefault = VideoAllocation{ PauseReason: VideoPauseReasonFeedDry, TargetLayer: buffer.InvalidLayer, RequestLayerSpatial: buffer.InvalidLayerSpatial, MaxLayer: buffer.InvalidLayer, } )
Functions ¶
This section is empty.
Types ¶
type AudioLevelHandle ¶
type Bitrates ¶
type Bitrates [buffer.DefaultMaxLayerSpatial + 1][buffer.DefaultMaxLayerTemporal + 1]int64
type DownTrack ¶
type DownTrack struct {
// contains filtered or unexported fields
}
DownTrack implements TrackLocal, is the track used to write packets to SFU Subscriber, the track handle the packets for simple, simulcast and SVC Publisher. A DownTrack has the following lifecycle - new - bound / unbound - closed once closed, a DownTrack cannot be re-used.
func NewDownTrack ¶
func NewDownTrack(params DowntrackParams) (*DownTrack, error)
NewDownTrack returns a DownTrack.
func (*DownTrack) AddReceiverReportListener ¶
func (d *DownTrack) AddReceiverReportListener(listener ReceiverReportListener)
func (*DownTrack) AllocateNextHigher ¶
func (d *DownTrack) AllocateNextHigher(availableChannelCapacity int64, allowOvershoot bool) (VideoAllocation, bool)
func (*DownTrack) AllocateOptimal ¶
func (d *DownTrack) AllocateOptimal(allowOvershoot bool) VideoAllocation
func (*DownTrack) BandwidthRequested ¶
func (*DownTrack) Bind ¶
Bind is called by the PeerConnection after negotiation is complete This asserts that the code requested is supported by the remote peer. If so it sets up all the state (SSRC and PayloadType) to have a call
func (*DownTrack) ClearStreamAllocatorReportInterval ¶
func (d *DownTrack) ClearStreamAllocatorReportInterval()
func (*DownTrack) CloseWithFlush ¶
CloseWithFlush - flush used to indicate whether send blank frame to flush decoder of client.
- When transceiver is reused by other participant's video track, set flush=true to avoid previous video shows before new stream is displayed.
- in case of session migration, participant migrate from other node, video track should be resumed with same participant, set flush=false since we don't need to flush decoder.
func (*DownTrack) Codec ¶
func (d *DownTrack) Codec() webrtc.RTPCodecCapability
Codec returns current track codec capability
func (*DownTrack) CreateSenderReport ¶
func (d *DownTrack) CreateSenderReport() *rtcp.SenderReport
func (*DownTrack) CreateSourceDescriptionChunks ¶
func (d *DownTrack) CreateSourceDescriptionChunks() []rtcp.SourceDescriptionChunk
func (*DownTrack) DistanceToDesired ¶
func (*DownTrack) GetConnectionScoreAndQuality ¶
func (d *DownTrack) GetConnectionScoreAndQuality() (float32, livekit.ConnectionQuality)
func (*DownTrack) GetDeltaStatsSender ¶
func (d *DownTrack) GetDeltaStatsSender() map[uint32]*buffer.StreamStatsWithLayers
func (*DownTrack) GetLastReceiverReportTime ¶
func (*DownTrack) GetNackStats ¶
func (*DownTrack) GetNextHigherTransition ¶
func (d *DownTrack) GetNextHigherTransition(allowOvershoot bool) (VideoTransition, bool)
func (*DownTrack) GetState ¶
func (d *DownTrack) GetState() DownTrackState
func (*DownTrack) GetTotalPacketsSent ¶
func (*DownTrack) GetTrackStats ¶
func (*DownTrack) GetTransceiver ¶
func (d *DownTrack) GetTransceiver() *webrtc.RTPTransceiver
func (*DownTrack) HandleRTCPSenderReportData ¶
func (*DownTrack) ID ¶
ID is the unique identifier for this Track. This should be unique for the stream, but doesn't have to globally unique. A common example would be 'audio' or 'video' and StreamID would be 'desktop' or 'webcam'
func (*DownTrack) IsDeficient ¶
func (*DownTrack) Kind ¶
func (d *DownTrack) Kind() webrtc.RTPCodecType
Kind controls if this TrackLocal is audio or video
func (*DownTrack) MaxLayer ¶
func (d *DownTrack) MaxLayer() buffer.VideoLayer
func (*DownTrack) OnCloseHandler ¶
OnCloseHandler method to be called on remote tracked removed
func (*DownTrack) OnCodecNegotiated ¶
func (d *DownTrack) OnCodecNegotiated(f func(webrtc.RTPCodecCapability))
func (*DownTrack) OnMaxLayerChanged ¶
func (*DownTrack) OnRttUpdate ¶
func (*DownTrack) OnStatsUpdate ¶
func (d *DownTrack) OnStatsUpdate(fn func(dt *DownTrack, stat *livekit.AnalyticsStat))
func (*DownTrack) Pause ¶
func (d *DownTrack) Pause() VideoAllocation
func (*DownTrack) ProvisionalAllocate ¶
func (*DownTrack) ProvisionalAllocateCommit ¶
func (d *DownTrack) ProvisionalAllocateCommit() VideoAllocation
func (*DownTrack) ProvisionalAllocateGetBestWeightedTransition ¶
func (d *DownTrack) ProvisionalAllocateGetBestWeightedTransition() VideoTransition
func (*DownTrack) ProvisionalAllocateGetCooperativeTransition ¶
func (d *DownTrack) ProvisionalAllocateGetCooperativeTransition(allowOvershoot bool) VideoTransition
func (*DownTrack) ProvisionalAllocatePrepare ¶
func (d *DownTrack) ProvisionalAllocatePrepare()
func (*DownTrack) ProvisionalAllocateReset ¶
func (d *DownTrack) ProvisionalAllocateReset()
func (*DownTrack) SeedState ¶
func (d *DownTrack) SeedState(state DownTrackState)
func (*DownTrack) SetActivePaddingOnMuteUpTrack ¶
func (d *DownTrack) SetActivePaddingOnMuteUpTrack()
SetActivePaddingOnMuteUpTrack will enable padding on the track when its uptrack is muted. Pion will not fire OnTrack event until it receives packet for the track, so we send padding packets to help pion client (go-sdk) to fire the event.
func (*DownTrack) SetConnected ¶
func (d *DownTrack) SetConnected()
func (*DownTrack) SetMaxSpatialLayer ¶
func (*DownTrack) SetMaxTemporalLayer ¶
func (*DownTrack) SetRTPHeaderExtensions ¶
func (d *DownTrack) SetRTPHeaderExtensions(rtpHeaderExtensions []webrtc.RTPHeaderExtensionParameter)
Sets RTP header extensions for this track
func (*DownTrack) SetStreamAllocatorListener ¶
func (d *DownTrack) SetStreamAllocatorListener(listener DownTrackStreamAllocatorListener)
func (*DownTrack) SetStreamAllocatorReportInterval ¶
func (*DownTrack) SetTransceiver ¶
func (d *DownTrack) SetTransceiver(transceiver *webrtc.RTPTransceiver)
func (*DownTrack) StopWriteAndGetState ¶
func (d *DownTrack) StopWriteAndGetState() DownTrackState
func (*DownTrack) SubscriberID ¶
func (d *DownTrack) SubscriberID() livekit.ParticipantID
func (*DownTrack) Unbind ¶
Unbind implements the teardown logic when the track is no longer needed. This happens because a track has been stopped.
func (*DownTrack) UpTrackBitrateAvailabilityChange ¶
func (d *DownTrack) UpTrackBitrateAvailabilityChange()
func (*DownTrack) UpTrackBitrateReport ¶
func (*DownTrack) UpTrackLayersChange ¶
func (d *DownTrack) UpTrackLayersChange()
func (*DownTrack) UpTrackMaxPublishedLayerChange ¶
func (*DownTrack) UpTrackMaxTemporalLayerSeenChange ¶
func (*DownTrack) WritePaddingRTP ¶
WritePaddingRTP tries to write as many padding only RTP packets as necessary to satisfy given size to the DownTrack
type DownTrackSpreader ¶
type DownTrackSpreader struct {
// contains filtered or unexported fields
}
func NewDownTrackSpreader ¶
func NewDownTrackSpreader(params DownTrackSpreaderParams) *DownTrackSpreader
func (*DownTrackSpreader) Broadcast ¶
func (d *DownTrackSpreader) Broadcast(writer func(TrackSender)) int
func (*DownTrackSpreader) DownTrackCount ¶
func (d *DownTrackSpreader) DownTrackCount() int
func (*DownTrackSpreader) Free ¶
func (d *DownTrackSpreader) Free(subscriberID livekit.ParticipantID)
func (*DownTrackSpreader) GetDownTracks ¶
func (d *DownTrackSpreader) GetDownTracks() []TrackSender
func (*DownTrackSpreader) HasDownTrack ¶
func (d *DownTrackSpreader) HasDownTrack(subscriberID livekit.ParticipantID) bool
func (*DownTrackSpreader) ResetAndGetDownTracks ¶
func (d *DownTrackSpreader) ResetAndGetDownTracks() []TrackSender
func (*DownTrackSpreader) Store ¶
func (d *DownTrackSpreader) Store(ts TrackSender)
type DownTrackSpreaderParams ¶
type DownTrackState ¶
type DownTrackState struct { RTPStats *rtpstats.RTPStatsSender DeltaStatsSenderSnapshotId uint32 ForwarderState *livekit.RTPForwarderState }
func (DownTrackState) MarshalLogObject ¶
func (d DownTrackState) MarshalLogObject(e zapcore.ObjectEncoder) error
type DownTrackStreamAllocatorListener ¶
type DownTrackStreamAllocatorListener interface { // RTCP received OnREMB(dt *DownTrack, remb *rtcp.ReceiverEstimatedMaximumBitrate) OnTransportCCFeedback(dt *DownTrack, cc *rtcp.TransportLayerCC) // video layer availability changed OnAvailableLayersChanged(dt *DownTrack) // video layer bitrate availability changed OnBitrateAvailabilityChanged(dt *DownTrack) // max published spatial layer changed OnMaxPublishedSpatialChanged(dt *DownTrack) // max published temporal layer changed OnMaxPublishedTemporalChanged(dt *DownTrack) // subscription changed - mute/unmute OnSubscriptionChanged(dt *DownTrack) // subscribed max video layer changed OnSubscribedLayerChanged(dt *DownTrack, layers buffer.VideoLayer) // stream resumed OnResume(dt *DownTrack) // packet(s) sent OnPacketsSent(dt *DownTrack, size int) // check if track should participate in BWE IsBWEEnabled(dt *DownTrack) bool // check if subscription mute can be applied IsSubscribeMutable(dt *DownTrack) bool }
type DowntrackParams ¶
type DowntrackParams struct { Codecs []webrtc.RTPCodecParameters Source livekit.TrackSource Receiver TrackReceiver BufferFactory *buffer.Factory SubID livekit.ParticipantID StreamID string MaxTrack int PlayoutDelayLimit *livekit.PlayoutDelay Pacer pacer.Pacer Logger logger.Logger Trailer []byte RTCPWriter func([]rtcp.Packet) error DisableSenderReportPassThrough bool }
type ForwardStats ¶
type ForwardStats struct {
// contains filtered or unexported fields
}
func NewForwardStats ¶
func NewForwardStats(latencyUpdateInterval, reportInterval, latencyWindowLength time.Duration) *ForwardStats
func (*ForwardStats) GetLastStats ¶
func (s *ForwardStats) GetLastStats(duration time.Duration) (latency, jitter time.Duration)
func (*ForwardStats) GetStats ¶
func (s *ForwardStats) GetStats() (latency, jitter time.Duration)
func (*ForwardStats) Stop ¶
func (s *ForwardStats) Stop()
func (*ForwardStats) Update ¶
func (s *ForwardStats) Update(arrival, left int64)
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
func NewForwarder ¶
func (*Forwarder) AllocateNextHigher ¶
func (*Forwarder) AllocateOptimal ¶
func (f *Forwarder) AllocateOptimal(availableLayers []int32, brs Bitrates, allowOvershoot bool) VideoAllocation
func (*Forwarder) BandwidthRequested ¶
func (*Forwarder) CurrentLayer ¶
func (f *Forwarder) CurrentLayer() buffer.VideoLayer
func (*Forwarder) DetermineCodec ¶
func (f *Forwarder) DetermineCodec(codec webrtc.RTPCodecCapability, extensions []webrtc.RTPHeaderExtensionParameter)
func (*Forwarder) DistanceToDesired ¶
func (*Forwarder) GetMaxSubscribedSpatial ¶
func (*Forwarder) GetNextHigherTransition ¶
func (f *Forwarder) GetNextHigherTransition(brs Bitrates, allowOvershoot bool) (VideoTransition, bool)
func (*Forwarder) GetOptimalBandwidthNeeded ¶
func (*Forwarder) GetSenderReportParams ¶
func (f *Forwarder) GetSenderReportParams() (int32, uint64, *livekit.RTCPSenderReportState)
func (*Forwarder) GetSnTsForBlankFrames ¶
func (*Forwarder) GetSnTsForPadding ¶
func (*Forwarder) GetState ¶
func (f *Forwarder) GetState() *livekit.RTPForwarderState
func (*Forwarder) GetTranslationParams ¶
func (*Forwarder) IsAnyMuted ¶
func (*Forwarder) IsDeficient ¶
func (*Forwarder) IsPubMuted ¶
func (*Forwarder) MaxLayer ¶
func (f *Forwarder) MaxLayer() buffer.VideoLayer
func (*Forwarder) Pause ¶
func (f *Forwarder) Pause(availableLayers []int32, brs Bitrates) VideoAllocation
func (*Forwarder) PauseReason ¶
func (f *Forwarder) PauseReason() VideoPauseReason
func (*Forwarder) ProvisionalAllocate ¶
func (*Forwarder) ProvisionalAllocateCommit ¶
func (f *Forwarder) ProvisionalAllocateCommit() VideoAllocation
func (*Forwarder) ProvisionalAllocateGetBestWeightedTransition ¶
func (f *Forwarder) ProvisionalAllocateGetBestWeightedTransition() (VideoTransition, []int32, Bitrates)
func (*Forwarder) ProvisionalAllocateGetCooperativeTransition ¶
func (f *Forwarder) ProvisionalAllocateGetCooperativeTransition(allowOvershoot bool) (VideoTransition, []int32, Bitrates)
func (*Forwarder) ProvisionalAllocatePrepare ¶
func (*Forwarder) ProvisionalAllocateReset ¶
func (f *Forwarder) ProvisionalAllocateReset()
func (*Forwarder) RTPMungerDebugInfo ¶
func (*Forwarder) SeedState ¶
func (f *Forwarder) SeedState(state *livekit.RTPForwarderState)
func (*Forwarder) SetMaxPublishedLayer ¶
func (*Forwarder) SetMaxSpatialLayer ¶
func (f *Forwarder) SetMaxSpatialLayer(spatialLayer int32) (bool, buffer.VideoLayer)
func (*Forwarder) SetMaxTemporalLayer ¶
func (f *Forwarder) SetMaxTemporalLayer(temporalLayer int32) (bool, buffer.VideoLayer)
func (*Forwarder) SetMaxTemporalLayerSeen ¶
func (*Forwarder) SetRefSenderReport ¶
func (f *Forwarder) SetRefSenderReport(isSVC bool, layer int32, srData *livekit.RTCPSenderReportState)
func (*Forwarder) TargetLayer ¶
func (f *Forwarder) TargetLayer() buffer.VideoLayer
type PlayoutDelayController ¶
type PlayoutDelayController struct {
// contains filtered or unexported fields
}
func NewPlayoutDelayController ¶
func NewPlayoutDelayController(minDelay, maxDelay uint32, logger logger.Logger, rtpStats *rtpstats.RTPStatsSender) (*PlayoutDelayController, error)
func (*PlayoutDelayController) GetDelayExtension ¶
func (c *PlayoutDelayController) GetDelayExtension(seq uint16) []byte
func (*PlayoutDelayController) OnSeqAcked ¶
func (c *PlayoutDelayController) OnSeqAcked(seq uint16)
func (*PlayoutDelayController) SetJitter ¶
func (c *PlayoutDelayController) SetJitter(jitter uint32)
type PlayoutDelayState ¶
type PlayoutDelayState int32
const ( PlayoutDelayStateChanged PlayoutDelayState = iota PlayoutDelaySending PlayoutDelayAcked )
func (PlayoutDelayState) String ¶
func (s PlayoutDelayState) String() string
type RTPMunger ¶
type RTPMunger struct {
// contains filtered or unexported fields
}
func NewRTPMunger ¶
func (*RTPMunger) GetState ¶
func (r *RTPMunger) GetState() *livekit.RTPMungerState
func (*RTPMunger) GetTSOffset ¶
func (*RTPMunger) IsOnFrameBoundary ¶
func (*RTPMunger) PacketDropped ¶
func (*RTPMunger) SeedState ¶
func (r *RTPMunger) SeedState(state *livekit.RTPMungerState)
func (*RTPMunger) SetLastSnTs ¶
func (*RTPMunger) UpdateAndGetPaddingSnTs ¶
func (*RTPMunger) UpdateAndGetSnTs ¶
type ReceiverOpts ¶
type ReceiverOpts func(w *WebRTCReceiver) *WebRTCReceiver
func WithAudioConfig ¶
func WithAudioConfig(audioConfig config.AudioConfig) ReceiverOpts
WithAudioConfig sets up parameters for active speaker detection
func WithForwardStats ¶
func WithForwardStats(forwardStats *ForwardStats) ReceiverOpts
func WithLoadBalanceThreshold ¶
func WithLoadBalanceThreshold(downTracks int) ReceiverOpts
WithLoadBalanceThreshold enables parallelization of packet writes when downTracks exceeds threshold Value should be between 3 and 150. For a server handling a few large rooms, use a smaller value (required to handle very large (250+ participant) rooms). For a server handling many small rooms, use a larger value or disable. Set to 0 (disabled) by default.
func WithPliThrottleConfig ¶
func WithPliThrottleConfig(pliThrottleConfig config.PLIThrottleConfig) ReceiverOpts
WithPliThrottleConfig indicates minimum time(ms) between sending PLIs
func WithStreamTrackers ¶
func WithStreamTrackers() ReceiverOpts
WithStreamTrackers enables StreamTracker use for simulcast
type ReceiverReportListener ¶
type ReceiverReportListener func(dt *DownTrack, report *rtcp.ReceiverReport)
type RedPrimaryReceiver ¶
type RedPrimaryReceiver struct { TrackReceiver // contains filtered or unexported fields }
func NewRedPrimaryReceiver ¶
func NewRedPrimaryReceiver(receiver TrackReceiver, dsp DownTrackSpreaderParams) *RedPrimaryReceiver
func (*RedPrimaryReceiver) AddDownTrack ¶
func (r *RedPrimaryReceiver) AddDownTrack(track TrackSender) error
func (*RedPrimaryReceiver) CanClose ¶
func (r *RedPrimaryReceiver) CanClose() bool
func (*RedPrimaryReceiver) Close ¶
func (r *RedPrimaryReceiver) Close()
func (*RedPrimaryReceiver) DeleteDownTrack ¶
func (r *RedPrimaryReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
func (*RedPrimaryReceiver) ForwardRTP ¶
func (r *RedPrimaryReceiver) ForwardRTP(pkt *buffer.ExtPacket, spatialLayer int32) int
func (*RedPrimaryReceiver) IsClosed ¶
func (r *RedPrimaryReceiver) IsClosed() bool
type RedReceiver ¶
type RedReceiver struct { TrackReceiver // contains filtered or unexported fields }
func NewRedReceiver ¶
func NewRedReceiver(receiver TrackReceiver, dsp DownTrackSpreaderParams) *RedReceiver
func (*RedReceiver) AddDownTrack ¶
func (r *RedReceiver) AddDownTrack(track TrackSender) error
func (*RedReceiver) CanClose ¶
func (r *RedReceiver) CanClose() bool
func (*RedReceiver) Close ¶
func (r *RedReceiver) Close()
func (*RedReceiver) DeleteDownTrack ¶
func (r *RedReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
func (*RedReceiver) ForwardRTP ¶
func (r *RedReceiver) ForwardRTP(pkt *buffer.ExtPacket, spatialLayer int32) int
func (*RedReceiver) IsClosed ¶
func (r *RedReceiver) IsClosed() bool
type SequenceNumberOrdering ¶
type SequenceNumberOrdering int
RTPMunger
const ( SequenceNumberOrderingContiguous SequenceNumberOrdering = iota SequenceNumberOrderingOutOfOrder SequenceNumberOrderingGap SequenceNumberOrderingDuplicate )
type StreamTrackerManager ¶
type StreamTrackerManager struct {
// contains filtered or unexported fields
}
func NewStreamTrackerManager ¶
func NewStreamTrackerManager( logger logger.Logger, trackInfo *livekit.TrackInfo, isSVC bool, clockRate uint32, trackersConfig config.StreamTrackersConfig, ) *StreamTrackerManager
func (*StreamTrackerManager) AddDependencyDescriptorTrackers ¶
func (s *StreamTrackerManager) AddDependencyDescriptorTrackers()
func (*StreamTrackerManager) AddTracker ¶
func (s *StreamTrackerManager) AddTracker(layer int32) streamtracker.StreamTrackerWorker
func (*StreamTrackerManager) Close ¶
func (s *StreamTrackerManager) Close()
func (*StreamTrackerManager) DistanceToDesired ¶
func (s *StreamTrackerManager) DistanceToDesired() float64
func (*StreamTrackerManager) GetLayeredBitrate ¶
func (s *StreamTrackerManager) GetLayeredBitrate() ([]int32, Bitrates)
func (*StreamTrackerManager) GetMaxPublishedLayer ¶
func (s *StreamTrackerManager) GetMaxPublishedLayer() int32
func (*StreamTrackerManager) GetMaxTemporalLayerSeen ¶
func (s *StreamTrackerManager) GetMaxTemporalLayerSeen() int32
func (*StreamTrackerManager) GetTracker ¶
func (s *StreamTrackerManager) GetTracker(layer int32) streamtracker.StreamTrackerWorker
func (*StreamTrackerManager) IsPaused ¶
func (s *StreamTrackerManager) IsPaused() bool
func (*StreamTrackerManager) RemoveAllTrackers ¶
func (s *StreamTrackerManager) RemoveAllTrackers()
func (*StreamTrackerManager) RemoveTracker ¶
func (s *StreamTrackerManager) RemoveTracker(layer int32)
func (*StreamTrackerManager) SetListener ¶
func (s *StreamTrackerManager) SetListener(listener StreamTrackerManagerListener)
func (*StreamTrackerManager) SetMaxExpectedSpatialLayer ¶
func (s *StreamTrackerManager) SetMaxExpectedSpatialLayer(layer int32) int32
func (*StreamTrackerManager) SetPaused ¶
func (s *StreamTrackerManager) SetPaused(paused bool)
func (*StreamTrackerManager) UpdateTrackInfo ¶
func (s *StreamTrackerManager) UpdateTrackInfo(ti *livekit.TrackInfo)
type StreamTrackerManagerListener ¶
type StreamTrackerManagerListener interface { OnAvailableLayersChanged() OnBitrateAvailabilityChanged() OnMaxPublishedLayerChanged(maxPublishedLayer int32) OnMaxTemporalLayerSeenChanged(maxTemporalLayerSeen int32) OnMaxAvailableLayerChanged(maxAvailableLayer int32) OnBitrateReport(availableLayers []int32, bitrates Bitrates) }
type TrackReceiver ¶
type TrackReceiver interface { TrackID() livekit.TrackID StreamID() string Codec() webrtc.RTPCodecParameters HeaderExtensions() []webrtc.RTPHeaderExtensionParameter IsClosed() bool ReadRTP(buf []byte, layer uint8, esn uint64) (int, error) GetLayeredBitrate() ([]int32, Bitrates) GetAudioLevel() (float64, bool) SendPLI(layer int32, force bool) SetUpTrackPaused(paused bool) SetMaxExpectedSpatialLayer(layer int32) AddDownTrack(track TrackSender) error DeleteDownTrack(participantID livekit.ParticipantID) DebugInfo() map[string]interface{} TrackInfo() *livekit.TrackInfo UpdateTrackInfo(ti *livekit.TrackInfo) // Get primary receiver if this receiver represents a RED codec; otherwise it will return itself GetPrimaryReceiverForRed() TrackReceiver // Get red receiver for primary codec, used by forward red encodings for opus only codec GetRedReceiver() TrackReceiver GetTemporalLayerFpsForSpatial(layer int32) []float32 GetTrackStats() *livekit.RTPStats // AddOnReady adds a function to be called when the receiver is ready, the callback // could be called immediately if the receiver is ready when the callback is added AddOnReady(func()) }
TrackReceiver defines an interface receive media from remote peer
type TrackSender ¶
type TrackSender interface { UpTrackLayersChange() UpTrackBitrateAvailabilityChange() UpTrackMaxPublishedLayerChange(maxPublishedLayer int32) UpTrackMaxTemporalLayerSeenChange(maxTemporalLayerSeen int32) UpTrackBitrateReport(availableLayers []int32, bitrates Bitrates) WriteRTP(p *buffer.ExtPacket, layer int32) error Close() IsClosed() bool // ID is the globally unique identifier for this Track. ID() string SubscriberID() livekit.ParticipantID HandleRTCPSenderReportData( payloadType webrtc.PayloadType, isSVC bool, layer int32, publisherSRData *livekit.RTCPSenderReportState, ) error Resync() }
TrackSender defines an interface send media to remote peer
type TranslationParams ¶
type TranslationParams struct {
// contains filtered or unexported fields
}
type TranslationParamsRTP ¶
type TranslationParamsRTP struct {
// contains filtered or unexported fields
}
type VideoAllocation ¶
type VideoAllocation struct { PauseReason VideoPauseReason IsDeficient bool BandwidthRequested int64 BandwidthDelta int64 BandwidthNeeded int64 Bitrates Bitrates TargetLayer buffer.VideoLayer RequestLayerSpatial int32 MaxLayer buffer.VideoLayer DistanceToDesired float64 }
func (*VideoAllocation) MarshalLogObject ¶
func (v *VideoAllocation) MarshalLogObject(e zapcore.ObjectEncoder) error
func (*VideoAllocation) String ¶
func (v *VideoAllocation) String() string
type VideoAllocationProvisional ¶
type VideoAllocationProvisional struct {
// contains filtered or unexported fields
}
type VideoPauseReason ¶
type VideoPauseReason int
const ( VideoPauseReasonNone VideoPauseReason = iota VideoPauseReasonMuted VideoPauseReasonPubMuted VideoPauseReasonFeedDry VideoPauseReasonBandwidth )
func (VideoPauseReason) String ¶
func (v VideoPauseReason) String() string
type VideoTransition ¶
type VideoTransition struct { From buffer.VideoLayer To buffer.VideoLayer BandwidthDelta int64 }
func (*VideoTransition) MarshalLogObject ¶
func (v *VideoTransition) MarshalLogObject(e zapcore.ObjectEncoder) error
func (*VideoTransition) String ¶
func (v *VideoTransition) String() string
type WebRTCReceiver ¶
type WebRTCReceiver struct {
// contains filtered or unexported fields
}
WebRTCReceiver receives a media track
func NewWebRTCReceiver ¶
func NewWebRTCReceiver( receiver *webrtc.RTPReceiver, track *webrtc.TrackRemote, trackInfo *livekit.TrackInfo, logger logger.Logger, onRTCP func([]rtcp.Packet), trackersConfig config.StreamTrackersConfig, opts ...ReceiverOpts, ) *WebRTCReceiver
NewWebRTCReceiver creates a new webrtc track receiver
func (*WebRTCReceiver) AddDownTrack ¶
func (w *WebRTCReceiver) AddDownTrack(track TrackSender) error
func (*WebRTCReceiver) AddOnReady ¶
func (w *WebRTCReceiver) AddOnReady(fn func())
func (*WebRTCReceiver) AddUpTrack ¶
func (w *WebRTCReceiver) AddUpTrack(track *webrtc.TrackRemote, buff *buffer.Buffer) error
func (*WebRTCReceiver) Codec ¶
func (w *WebRTCReceiver) Codec() webrtc.RTPCodecParameters
func (*WebRTCReceiver) DebugInfo ¶
func (w *WebRTCReceiver) DebugInfo() map[string]interface{}
func (*WebRTCReceiver) DeleteDownTrack ¶
func (w *WebRTCReceiver) DeleteDownTrack(subscriberID livekit.ParticipantID)
DeleteDownTrack removes a DownTrack from a Receiver
func (*WebRTCReceiver) GetAudioLevel ¶
func (w *WebRTCReceiver) GetAudioLevel() (float64, bool)
func (*WebRTCReceiver) GetConnectionScoreAndQuality ¶
func (w *WebRTCReceiver) GetConnectionScoreAndQuality() (float32, livekit.ConnectionQuality)
func (*WebRTCReceiver) GetDeltaStats ¶
func (w *WebRTCReceiver) GetDeltaStats() map[uint32]*buffer.StreamStatsWithLayers
func (*WebRTCReceiver) GetLastSenderReportTime ¶
func (w *WebRTCReceiver) GetLastSenderReportTime() time.Time
func (*WebRTCReceiver) GetLayeredBitrate ¶
func (w *WebRTCReceiver) GetLayeredBitrate() ([]int32, Bitrates)
func (*WebRTCReceiver) GetPrimaryReceiverForRed ¶
func (w *WebRTCReceiver) GetPrimaryReceiverForRed() TrackReceiver
func (*WebRTCReceiver) GetRedReceiver ¶
func (w *WebRTCReceiver) GetRedReceiver() TrackReceiver
func (*WebRTCReceiver) GetTemporalLayerFpsForSpatial ¶
func (w *WebRTCReceiver) GetTemporalLayerFpsForSpatial(layer int32) []float32
func (*WebRTCReceiver) GetTrackStats ¶
func (w *WebRTCReceiver) GetTrackStats() *livekit.RTPStats
func (*WebRTCReceiver) HeaderExtensions ¶
func (w *WebRTCReceiver) HeaderExtensions() []webrtc.RTPHeaderExtensionParameter
func (*WebRTCReceiver) IsClosed ¶
func (w *WebRTCReceiver) IsClosed() bool
func (*WebRTCReceiver) Kind ¶
func (w *WebRTCReceiver) Kind() webrtc.RTPCodecType
func (*WebRTCReceiver) OnAvailableLayersChanged ¶
func (w *WebRTCReceiver) OnAvailableLayersChanged()
StreamTrackerManagerListener.OnAvailableLayersChanged
func (*WebRTCReceiver) OnBitrateAvailabilityChanged ¶
func (w *WebRTCReceiver) OnBitrateAvailabilityChanged()
StreamTrackerManagerListener.OnBitrateAvailabilityChanged
func (*WebRTCReceiver) OnBitrateReport ¶
func (w *WebRTCReceiver) OnBitrateReport(availableLayers []int32, bitrates Bitrates)
StreamTrackerManagerListener.OnBitrateReport
func (*WebRTCReceiver) OnCloseHandler ¶
func (w *WebRTCReceiver) OnCloseHandler(fn func())
OnCloseHandler method to be called on remote tracked removed
func (*WebRTCReceiver) OnMaxAvailableLayerChanged ¶
func (w *WebRTCReceiver) OnMaxAvailableLayerChanged(maxAvailableLayer int32)
StreamTrackerManagerListener.OnMaxAvailableLayerChanged
func (*WebRTCReceiver) OnMaxLayerChange ¶
func (w *WebRTCReceiver) OnMaxLayerChange(fn func(maxLayer int32))
func (*WebRTCReceiver) OnMaxPublishedLayerChanged ¶
func (w *WebRTCReceiver) OnMaxPublishedLayerChanged(maxPublishedLayer int32)
StreamTrackerManagerListener.OnMaxPublishedLayerChanged
func (*WebRTCReceiver) OnMaxTemporalLayerSeenChanged ¶
func (w *WebRTCReceiver) OnMaxTemporalLayerSeenChanged(maxTemporalLayerSeen int32)
StreamTrackerManagerListener.OnMaxTemporalLayerSeenChanged
func (*WebRTCReceiver) OnStatsUpdate ¶
func (w *WebRTCReceiver) OnStatsUpdate(fn func(w *WebRTCReceiver, stat *livekit.AnalyticsStat))
func (*WebRTCReceiver) SendPLI ¶
func (w *WebRTCReceiver) SendPLI(layer int32, force bool)
func (*WebRTCReceiver) SetMaxExpectedSpatialLayer ¶
func (w *WebRTCReceiver) SetMaxExpectedSpatialLayer(layer int32)
func (*WebRTCReceiver) SetRTT ¶
func (w *WebRTCReceiver) SetRTT(rtt uint32)
func (*WebRTCReceiver) SetUpTrackPaused ¶
func (w *WebRTCReceiver) SetUpTrackPaused(paused bool)
SetUpTrackPaused indicates upstream will not be sending any data. this will reflect the "muted" status and will pause streamtracker to ensure we don't turn off the layer
func (*WebRTCReceiver) StreamID ¶
func (w *WebRTCReceiver) StreamID() string
func (*WebRTCReceiver) TrackID ¶
func (w *WebRTCReceiver) TrackID() livekit.TrackID
func (*WebRTCReceiver) TrackInfo ¶
func (w *WebRTCReceiver) TrackInfo() *livekit.TrackInfo
func (*WebRTCReceiver) UpdateTrackInfo ¶
func (w *WebRTCReceiver) UpdateTrackInfo(ti *livekit.TrackInfo)