Versions in this module Expand all Collapse all v1 v1.3.0 Nov 30, 2022 Changes in this version + const ChannelCapacityInfinity + const DefaultMaxLayerSpatial + const DefaultMaxLayerTemporal + const FlagAllowOvershootExemptTrackWhileDeficient + const FlagAllowOvershootInCatchup + const FlagAllowOvershootInProbe + const FlagAllowOvershootWhileDeficient + const FlagAllowOvershootWhileOptimal + const FlagFilterRTX + const FlagPauseOnDowngrade + const FlagStopRTXOnPLI + const InvalidLayerSpatial + const InvalidLayerTemporal + const MimeTypeAudioRed + const NackRatioAttenuator + const PriorityDefaultScreenshare + const PriorityDefaultVideo + const PriorityMax + const PriorityMin + const ProbeBackoffFactor + const ProbeMaxDuration + const ProbeMinBps + const ProbeMinDuration + const ProbePct + const ProbeSettleWait + const ProbeTrendWait + const ProbeWaitBase + const ProbeWaitMax + const RTPBlankFramesCloseSeconds + const RTPBlankFramesMuteSeconds + const RTPPaddingEstimatedHeaderSize + const RTPPaddingMaxPayloadSize + const RtxGateWindow + const SnOffsetCacheMask + const SnOffsetCacheSize + const TransitionCostSpatial + var ChannelObserverParamsNonProbe = ChannelObserverParams + var ChannelObserverParamsProbe = ChannelObserverParams + var ConfigScreenshare = []StreamTrackerParams + var ConfigVideo = []StreamTrackerParams + var ErrDownTrackAlreadyBound = errors.New("already bound") + var ErrDownTrackAlreadyExist = errors.New("DownTrack already exist") + var ErrDownTrackClosed = errors.New("downtrack closed") + var ErrDuplicatePacket = errors.New("duplicate packet") + var ErrFilteredVP8TemporalLayer = errors.New("filtered VP8 temporal layer") + var ErrIncompleteRedBlock = errors.New("incomplete red block payload") + var ErrIncompleteRedHeader = errors.New("incomplete red block header") + var ErrNotVP8 = errors.New("not VP8") + var ErrOutOfOrderSequenceNumberCacheMiss = errors.New("out-of-order sequence number not found in cache") + var ErrOutOfOrderVP8PictureIdCacheMiss = errors.New("out-of-order VP8 picture id not found in cache") + var ErrPaddingNotOnFrameBoundary = errors.New("padding cannot send on non-frame boundary") + var ErrPaddingOnlyPacket = errors.New("padding only packet that need not be forwarded") + var ErrReceiverClosed = errors.New("receiver closed") + var ErrUnknownKind = errors.New("unknown kind of codec") + var ExemptedLayersScreenshare = []int32 + var ExemptedLayersVideo = []int32 + var H264KeyFrame2x2 = [][]byte + var H264KeyFrame2x2IDR = []byte + var H264KeyFrame2x2PPS = []byte + var H264KeyFrame2x2SPS = []byte + var InvalidLayers = buffer.InvalidLayers + var OpusSilenceFrame = []byte + var PacketFactory *sync.Pool + var VP8KeyFrame8x8 = []byte + var VideoAllocationDefault = VideoAllocation + func IsRedCodec(mime string) bool + func IsSvcCodec(mime string) bool + type AddTrackParams struct + IsSimulcast bool + Priority uint8 + PublisherID livekit.ParticipantID + Source livekit.TrackSource + type AudioLevelHandle func(level uint8, duration uint32) + type Bitrates [DefaultMaxLayerSpatial + 1][DefaultMaxLayerTemporal + 1]int64 + type ChannelCongestionReason int + const ChannelCongestionReasonEstimate + const ChannelCongestionReasonLoss + const ChannelCongestionReasonNone + func (c ChannelCongestionReason) String() string + type ChannelObserver struct + func NewChannelObserver(params ChannelObserverParams, logger logger.Logger) *ChannelObserver + func (c *ChannelObserver) AddEstimate(estimate int64) + func (c *ChannelObserver) AddNack(packets uint32, repeatedNacks uint32) + func (c *ChannelObserver) GetHighestEstimate() int64 + func (c *ChannelObserver) GetLowestEstimate() int64 + func (c *ChannelObserver) GetNackRatio() (uint32, uint32, float64) + func (c *ChannelObserver) GetTrend() (ChannelTrend, ChannelCongestionReason) + func (c *ChannelObserver) SeedEstimate(estimate int64) + func (c *ChannelObserver) SeedNack(packets uint32, repeatedNacks uint32) + type ChannelObserverParams struct + EstimateCollapseValues bool + EstimateDownwardTrendThreshold float64 + EstimateRequiredSamples int + NackRatioThreshold float64 + NackWindowMaxDuration time.Duration + NackWindowMinDuration time.Duration + Name string + type ChannelTrend int + const ChannelTrendClearing + const ChannelTrendCongesting + const ChannelTrendNeutral + func (c ChannelTrend) String() string + type Cluster struct + func NewCluster(id ProbeClusterId, desiredRateBps int, expectedRateBps int, ...) *Cluster + func (c *Cluster) GetInfo() ProbeClusterInfo + func (c *Cluster) GetSleepDuration() time.Duration + func (c *Cluster) IsFinished() bool + func (c *Cluster) PacketSent(size int) + func (c *Cluster) ProbeSent(size int) + func (c *Cluster) Process(onSendProbe func(bytesToSend int)) + func (c *Cluster) Start() + func (c *Cluster) String() string + type DDVideoLayerSelector struct + func NewDDVideoLayerSelector(logger logger.Logger) *DDVideoLayerSelector + func (s *DDVideoLayerSelector) Select(expPkt *buffer.ExtPacket, tp *TranslationParams) (selected bool) + func (s *DDVideoLayerSelector) SelectLayer(layer VideoLayers) + type DownTrack struct + func NewDownTrack(codecs []webrtc.RTPCodecParameters, r TrackReceiver, bf *buffer.Factory, ...) (*DownTrack, error) + 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) 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() int32 + func (d *DownTrack) GetConnectionScore() float32 + func (d *DownTrack) GetForwardingStatus() ForwardingStatus + func (d *DownTrack) GetNackStats() (totalPackets uint32, totalRepeatedNACKs uint32) + func (d *DownTrack) GetNextHigherTransition(allowOvershoot bool) (VideoTransition, bool) + func (d *DownTrack) GetState() DownTrackState + func (d *DownTrack) GetTrackStats() *livekit.RTPStats + func (d *DownTrack) GetTransceiver() *webrtc.RTPTransceiver + func (d *DownTrack) ID() string + func (d *DownTrack) IsClosed() bool + func (d *DownTrack) IsDeficient() bool + func (d *DownTrack) Kind() webrtc.RTPCodecType + func (d *DownTrack) MaxLayers() VideoLayers + func (d *DownTrack) Mute(muted bool) + func (d *DownTrack) OnAvailableLayersChanged(fn func(dt *DownTrack)) + func (d *DownTrack) OnBind(fn func()) + func (d *DownTrack) OnBitrateAvailabilityChanged(fn func(dt *DownTrack)) + func (d *DownTrack) OnCloseHandler(fn func(willBeResumed bool)) + func (d *DownTrack) OnMaxLayerChanged(fn func(dt *DownTrack, layer int32)) + func (d *DownTrack) OnPacketSent(fn func(dt *DownTrack, size int)) + func (d *DownTrack) OnPaddingSent(fn func(dt *DownTrack, size int)) + func (d *DownTrack) OnREMB(fn func(dt *DownTrack, remb *rtcp.ReceiverEstimatedMaximumBitrate)) + func (d *DownTrack) OnRttUpdate(fn func(dt *DownTrack, rtt uint32)) + func (d *DownTrack) OnStatsUpdate(fn func(dt *DownTrack, stat *livekit.AnalyticsStat)) + func (d *DownTrack) OnSubscribedLayersChanged(fn func(dt *DownTrack, layers VideoLayers)) + func (d *DownTrack) OnSubscriptionChanged(fn func(dt *DownTrack)) + func (d *DownTrack) OnTransportCCFeedback(fn func(dt *DownTrack, cc *rtcp.TransportLayerCC)) + func (d *DownTrack) Pause() VideoAllocation + func (d *DownTrack) ProvisionalAllocate(availableChannelCapacity int64, layers VideoLayers, allowPause 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) RID() string + func (d *DownTrack) Resync() + func (d *DownTrack) SSRC() uint32 + func (d *DownTrack) SeedState(state DownTrackState) + 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) SetTransceiver(transceiver *webrtc.RTPTransceiver) + func (d *DownTrack) Stop() error + func (d *DownTrack) StreamID() string + func (d *DownTrack) SubscriberID() livekit.ParticipantID + func (d *DownTrack) TrackInfoAvailable() + func (d *DownTrack) Unbind(_ webrtc.TrackLocalContext) error + func (d *DownTrack) UpTrackBitrateAvailabilityChange() + func (d *DownTrack) UpTrackLayersChange(availableLayers []int32, exemptedLayers []int32) + func (d *DownTrack) WritePaddingRTP(bytesToSend int) int + func (d *DownTrack) WriteRTP(extPkt *buffer.ExtPacket, layer int32) error + type DownTrackSpreader struct + func NewDownTrackSpreader(params DownTrackSpreaderParams) *DownTrackSpreader + func (d *DownTrackSpreader) Broadcast(writer func(TrackSender)) + 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 struct + Logger logger.Logger + Threshold int + type DownTrackState struct + DeltaStatsSnapshotId uint32 + ForwarderState ForwarderState + RTPStats *buffer.RTPStats + func (d DownTrackState) String() string + type Event struct + Data interface{} + Signal streamAllocatorSignal + TrackID livekit.TrackID + func (e Event) String() string + type Forwarder struct + func NewForwarder(kind webrtc.RTPCodecType, logger logger.Logger) *Forwarder + func (f *Forwarder) AllocateNextHigher(availableChannelCapacity int64, brs Bitrates, allowOvershoot bool) (VideoAllocation, bool) + func (f *Forwarder) AllocateOptimal(brs Bitrates, allowOvershoot bool) VideoAllocation + func (f *Forwarder) BandwidthRequested(brs Bitrates) int64 + func (f *Forwarder) CheckSync() (locked bool, layer int32) + func (f *Forwarder) CurrentLayers() VideoLayers + func (f *Forwarder) DetermineCodec(codec webrtc.RTPCodecCapability) + func (f *Forwarder) DistanceToDesired() int32 + func (f *Forwarder) FilterRTX(nacks []uint16) (filtered []uint16, disallowedLayers [DefaultMaxLayerSpatial + 1]bool) + func (f *Forwarder) GetForwardingStatus() ForwardingStatus + func (f *Forwarder) GetNextHigherTransition(brs Bitrates, allowOvershoot bool) (VideoTransition, bool) + func (f *Forwarder) GetPaddingVP8(frameEndNeeded bool) *buffer.VP8 + func (f *Forwarder) GetRTPMungerParams() RTPMungerParams + func (f *Forwarder) GetSnTsForBlankFrames(frameRate uint32, numPackets int) ([]SnTs, bool, error) + func (f *Forwarder) GetSnTsForPadding(num int) ([]SnTs, error) + func (f *Forwarder) GetState() ForwarderState + func (f *Forwarder) GetTranslationParams(extPkt *buffer.ExtPacket, layer int32) (*TranslationParams, error) + func (f *Forwarder) IsDeficient() bool + func (f *Forwarder) IsMuted() bool + func (f *Forwarder) IsReducedQuality() (int32, bool) + func (f *Forwarder) MaxLayers() VideoLayers + func (f *Forwarder) Mute(muted bool) (bool, VideoLayers) + func (f *Forwarder) Pause(brs Bitrates) VideoAllocation + func (f *Forwarder) ProvisionalAllocate(availableChannelCapacity int64, layers VideoLayers, allowPause bool, ...) int64 + func (f *Forwarder) ProvisionalAllocateCommit() VideoAllocation + func (f *Forwarder) ProvisionalAllocateGetBestWeightedTransition() VideoTransition + func (f *Forwarder) ProvisionalAllocateGetCooperativeTransition(allowOvershoot bool) VideoTransition + func (f *Forwarder) ProvisionalAllocatePrepare(bitrates Bitrates) + func (f *Forwarder) Resync() + func (f *Forwarder) SeedState(state ForwarderState) + func (f *Forwarder) SetMaxSpatialLayer(spatialLayer int32) (bool, VideoLayers, VideoLayers) + func (f *Forwarder) SetMaxTemporalLayer(temporalLayer int32) (bool, VideoLayers, VideoLayers) + func (f *Forwarder) TargetLayers() VideoLayers + func (f *Forwarder) UpTrackLayersChange(availableLayers []int32, exemptedLayers []int32) + type ForwarderState struct + LastTSCalc int64 + RTP RTPMungerState + VP8 VP8MungerState + func (f ForwarderState) String() string + type ForwardingStatus int + const ForwardingStatusOff + const ForwardingStatusOptimal + const ForwardingStatusPartial + type MaxDistanceSorter []*Track + func (m MaxDistanceSorter) Len() int + func (m MaxDistanceSorter) Less(i, j int) bool + func (m MaxDistanceSorter) Swap(i, j int) + type MinDistanceSorter []*Track + func (m MinDistanceSorter) Len() int + func (m MinDistanceSorter) Less(i, j int) bool + func (m MinDistanceSorter) Swap(i, j int) + type ProbeClusterId uint32 + const ProbeClusterIdInvalid + type ProbeClusterInfo struct + BytesSent int + Duration time.Duration + Id ProbeClusterId + type Prober struct + func NewProber(params ProberParams) *Prober + func (p *Prober) AddCluster(desiredRateBps int, expectedRateBps int, minDuration time.Duration, ...) ProbeClusterId + func (p *Prober) IsRunning() bool + func (p *Prober) OnProbeClusterDone(f func(info ProbeClusterInfo)) + func (p *Prober) OnSendProbe(f func(bytesToSend int)) + func (p *Prober) PacketSent(size int) + func (p *Prober) ProbeSent(size int) + func (p *Prober) Reset() + type ProberParams struct + Logger logger.Logger + type RTPMunger struct + func NewRTPMunger(logger logger.Logger) *RTPMunger + func (r *RTPMunger) FilterRTX(nacks []uint16) []uint16 + func (r *RTPMunger) GetLast() RTPMungerState + func (r *RTPMunger) GetParams() RTPMungerParams + func (r *RTPMunger) IsOnFrameBoundary() bool + func (r *RTPMunger) PacketDropped(extPkt *buffer.ExtPacket) + func (r *RTPMunger) SeedLast(state 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) (*TranslationParamsRTP, error) + func (r *RTPMunger) UpdateSnTsOffsets(extPkt *buffer.ExtPacket, snAdjust uint16, tsAdjust uint32) + type RTPMungerParams struct + type RTPMungerState struct + LastSN uint16 + LastTS uint32 + func (r RTPMungerState) String() string + type ReceiverOpts func(w *WebRTCReceiver) *WebRTCReceiver + func WithAudioConfig(audioConfig config.AudioConfig) ReceiverOpts + func WithLoadBalanceThreshold(downTracks int) ReceiverOpts + func WithPliThrottleConfig(pliThrottleConfig config.PLIThrottleConfig) ReceiverOpts + func WithStreamTrackers() ReceiverOpts + type ReceiverReportListener func(dt *DownTrack, report *rtcp.ReceiverReport) + type RedPrimaryReceiver struct + func NewRedPrimaryReceiver(receiver TrackReceiver, dsp DownTrackSpreaderParams) *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) + func (r *RedPrimaryReceiver) ReadRTP(buf []byte, layer uint8, sn uint16) (int, error) + type RedReceiver struct + func NewRedReceiver(receiver TrackReceiver, dsp DownTrackSpreaderParams) *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) + func (r *RedReceiver) ReadRTP(buf []byte, layer uint8, sn uint16) (int, error) + type SequenceNumberOrdering int + const SequenceNumberOrderingContiguous + const SequenceNumberOrderingDuplicate + const SequenceNumberOrderingGap + const SequenceNumberOrderingOutOfOrder + type SnTs struct + type StreamAllocator struct + func NewStreamAllocator(params StreamAllocatorParams) *StreamAllocator + func (s *StreamAllocator) AddTrack(downTrack *DownTrack, params AddTrackParams) + func (s *StreamAllocator) OnStreamStateChange(f func(update *StreamStateUpdate) error) + func (s *StreamAllocator) RemoveTrack(downTrack *DownTrack) + func (s *StreamAllocator) SetBandwidthEstimator(bwe cc.BandwidthEstimator) + func (s *StreamAllocator) SetTrackPriority(downTrack *DownTrack, priority uint8) + func (s *StreamAllocator) Start() + func (s *StreamAllocator) Stop() + type StreamAllocatorParams struct + Config config.CongestionControlConfig + Logger logger.Logger + type StreamState int + const StreamStateActive + const StreamStatePaused + func (s StreamState) String() string + type StreamStateInfo struct + ParticipantID livekit.ParticipantID + State StreamState + TrackID livekit.TrackID + type StreamStateUpdate struct + StreamStates []*StreamStateInfo + func NewStreamStateUpdate() *StreamStateUpdate + func (s *StreamStateUpdate) Empty() bool + func (s *StreamStateUpdate) HandleStreamingChange(change VideoStreamingChange, track *Track) + type StreamStatus int32 + const StreamStatusActive + const StreamStatusStopped + func (s StreamStatus) String() string + type StreamTracker struct + func NewStreamTracker(params StreamTrackerParams) *StreamTracker + func (s *StreamTracker) BitrateTemporalCumulative() []int64 + func (s *StreamTracker) Observe(temporalLayer int32, pktSize int, payloadSize int) + func (s *StreamTracker) OnBitrateAvailable(f func()) + func (s *StreamTracker) OnStatusChanged(f func(status StreamStatus)) + func (s *StreamTracker) Reset() + func (s *StreamTracker) SetPaused(paused bool) + func (s *StreamTracker) Start() + func (s *StreamTracker) Status() StreamStatus + func (s *StreamTracker) Stop() + type StreamTrackerManager struct + func NewStreamTrackerManager(logger logger.Logger, trackInfo *livekit.TrackInfo, isSVC bool) *StreamTrackerManager + func (s *StreamTrackerManager) AddTracker(layer int32) *StreamTracker + func (s *StreamTrackerManager) DistanceToDesired() int32 + func (s *StreamTrackerManager) GetAvailableLayers() ([]int32, []int32) + func (s *StreamTrackerManager) GetLayerDimension(layer int32) (uint32, uint32) + func (s *StreamTrackerManager) GetLayeredBitrate() Bitrates + func (s *StreamTrackerManager) GetMaxExpectedLayer() int32 + func (s *StreamTrackerManager) GetTracker(layer int32) *StreamTracker + func (s *StreamTrackerManager) HasSpatialLayer(layer int32) bool + func (s *StreamTrackerManager) OnAvailableLayersChanged(f func(availableLayers []int32, exemptedLayers []int32)) + func (s *StreamTrackerManager) OnBitrateAvailabilityChanged(f func()) + func (s *StreamTrackerManager) OnMaxLayerChanged(f func(maxLayer int32)) + func (s *StreamTrackerManager) RemoveAllTrackers() + func (s *StreamTrackerManager) RemoveTracker(layer int32) + func (s *StreamTrackerManager) SetMaxExpectedSpatialLayer(layer int32) int32 + func (s *StreamTrackerManager) SetPaused(paused bool) + type StreamTrackerParams struct + BitrateReportInterval time.Duration + CycleDuration time.Duration + CyclesRequired uint32 + Logger logger.Logger + SamplesRequired uint32 + type Track struct + func (t *Track) AllocateNextHigher(availableChannelCapacity int64, allowOvershoot bool) (VideoAllocation, bool) + func (t *Track) AllocateOptimal(allowOvershoot bool) VideoAllocation + func (t *Track) BandwidthRequested() int64 + func (t *Track) DistanceToDesired() int32 + func (t *Track) DownTrack() *DownTrack + func (t *Track) GetNackDelta() (uint32, uint32) + func (t *Track) GetNextHigherTransition(allowOvershoot bool) (VideoTransition, bool) + func (t *Track) ID() livekit.TrackID + func (t *Track) IsDeficient() bool + func (t *Track) IsManaged() bool + func (t *Track) Pause() VideoAllocation + func (t *Track) Priority() uint8 + func (t *Track) ProvisionalAllocate(availableChannelCapacity int64, layers VideoLayers, allowPause bool, ...) int64 + func (t *Track) ProvisionalAllocateCommit() VideoAllocation + func (t *Track) ProvisionalAllocateGetBestWeightedTransition() VideoTransition + func (t *Track) ProvisionalAllocateGetCooperativeTransition(allowOvershoot bool) VideoTransition + func (t *Track) ProvisionalAllocatePrepare() + func (t *Track) PublisherID() livekit.ParticipantID + func (t *Track) SetDirty(isDirty bool) bool + func (t *Track) SetMaxLayers(layers VideoLayers) bool + func (t *Track) SetPriority(priority uint8) bool + func (t *Track) WritePaddingRTP(bytesToSend int) int + type TrackReceiver interface + AddDownTrack func(track TrackSender) error + Codec func() webrtc.RTPCodecParameters + DebugInfo func() map[string]interface{} + DeleteDownTrack func(participantID livekit.ParticipantID) + GetAudioLevel func() (float64, bool) + GetLayerDimension func(layer int32) (uint32, uint32) + GetLayeredBitrate func() Bitrates + GetPrimaryReceiverForRed func() TrackReceiver + GetRedReceiver func() TrackReceiver + GetTemporalLayerFpsForSpatial func(layer int32) []float32 + HeaderExtensions func() []webrtc.RTPHeaderExtensionParameter + ReadRTP func(buf []byte, layer uint8, sn uint16) (int, error) + SendPLI func(layer int32, force bool) + SetMaxExpectedSpatialLayer func(layer int32) + SetUpTrackPaused func(paused bool) + StreamID func() string + TrackID func() livekit.TrackID + TrackInfo func() *livekit.TrackInfo + type TrackSender interface + Close func() + ID func() string + IsClosed func() bool + SubscriberID func() livekit.ParticipantID + TrackInfoAvailable func() + UpTrackBitrateAvailabilityChange func() + UpTrackLayersChange func(availableLayers []int32, exemptedLayers []int32) + WriteRTP func(p *buffer.ExtPacket, layer int32) error + type TrackSorter []*Track + func (t TrackSorter) Len() int + func (t TrackSorter) Less(i, j int) bool + func (t TrackSorter) Swap(i, j int) + type TranslationParams struct + type TranslationParamsRTP struct + type TranslationParamsVP8 struct + Header *buffer.VP8 + type TrendDetector struct + func NewTrendDetector(params TrendDetectorParams) *TrendDetector + func (t *TrendDetector) AddValue(value int64) + func (t *TrendDetector) GetDirection() TrendDirection + func (t *TrendDetector) GetHighest() int64 + func (t *TrendDetector) GetLowest() int64 + func (t *TrendDetector) GetValues() []int64 + func (t *TrendDetector) Seed(value int64) + func (t *TrendDetector) ToString() string + type TrendDetectorParams struct + CollapseValues bool + DownwardTrendThreshold float64 + Logger logger.Logger + Name string + RequiredSamples int + type TrendDirection int + const TrendDirectionDownward + const TrendDirectionNeutral + const TrendDirectionUpward + func (t TrendDirection) String() string + type Uint16Wrapper struct + func (w *Uint16Wrapper) Unwrap(value uint16) int32 + type VP8Munger struct + func NewVP8Munger(logger logger.Logger) *VP8Munger + func (v *VP8Munger) GetLast() VP8MungerState + func (v *VP8Munger) PictureIdOffset(extPictureId int32) (int32, bool) + func (v *VP8Munger) SeedLast(state VP8MungerState) + func (v *VP8Munger) SetLast(extPkt *buffer.ExtPacket) + func (v *VP8Munger) UpdateAndGet(extPkt *buffer.ExtPacket, ordering SequenceNumberOrdering, ...) (*TranslationParamsVP8, error) + func (v *VP8Munger) UpdateAndGetPadding(newPicture bool) *buffer.VP8 + func (v *VP8Munger) UpdateOffsets(extPkt *buffer.ExtPacket) + type VP8MungerParams struct + type VP8MungerState struct + ExtLastPictureId int32 + KeyIdxUsed int + LastKeyIdx uint8 + LastTl0PicIdx uint8 + PictureIdUsed int + TidUsed int + Tl0PicIdxUsed int + func (v VP8MungerState) String() string + type VP8PictureIdWrapHandler struct + func (v *VP8PictureIdWrapHandler) Init(extPictureId int32, mBit bool) + func (v *VP8PictureIdWrapHandler) MaxPictureId() int32 + func (v *VP8PictureIdWrapHandler) Unwrap(pictureId uint16, mBit bool) int32 + func (v *VP8PictureIdWrapHandler) UpdateMaxPictureId(extPictureId int32, mBit bool) + type VideoAllocation struct + func (v VideoAllocation) String() string + type VideoAllocationProvisional struct + type VideoAllocationState int + const VideoAllocationStateAwaitingMeasurement + const VideoAllocationStateDeficient + const VideoAllocationStateFeedDry + const VideoAllocationStateMuted + const VideoAllocationStateNone + const VideoAllocationStateOptimal + func (v VideoAllocationState) String() string + type VideoLayers = buffer.VideoLayer + type VideoStreamingChange int + const VideoStreamingChangeNone + const VideoStreamingChangePausing + const VideoStreamingChangeResuming + func (v VideoStreamingChange) String() string + type VideoTransition struct + func (v VideoTransition) String() string + type WebRTCReceiver struct + func NewWebRTCReceiver(receiver *webrtc.RTPReceiver, track *webrtc.TrackRemote, ...) *WebRTCReceiver + func (w *WebRTCReceiver) AddDownTrack(track TrackSender) error + func (w *WebRTCReceiver) AddUpTrack(track *webrtc.TrackRemote, buff *buffer.Buffer) + 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) GetConnectionScore() float32 + func (w *WebRTCReceiver) GetLayerDimension(layer int32) (uint32, uint32) + func (w *WebRTCReceiver) GetLayeredBitrate() 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) Kind() webrtc.RTPCodecType + func (w *WebRTCReceiver) OnCloseHandler(fn func()) + func (w *WebRTCReceiver) OnMaxLayerChange(fn func(maxLayer int32)) + func (w *WebRTCReceiver) OnStatsUpdate(fn func(w *WebRTCReceiver, stat *livekit.AnalyticsStat)) + func (w *WebRTCReceiver) ReadRTP(buf []byte, layer uint8, sn uint16) (int, error) + func (w *WebRTCReceiver) SSRC(layer int) uint32 + func (w *WebRTCReceiver) SendPLI(layer int32, force bool) + func (w *WebRTCReceiver) SetMaxExpectedSpatialLayer(layer int32) + func (w *WebRTCReceiver) SetRTCPCh(ch chan []rtcp.Packet) + 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