From d7db7cb3898b944f101786f3efa9ed5645ae180a Mon Sep 17 00:00:00 2001 From: changgesi Date: Thu, 11 Dec 2025 12:04:13 +0800 Subject: [PATCH] chore: fix a large number of spelling issues (#4147) Signed-off-by: changgesi --- pkg/rtc/participant.go | 4 ++-- pkg/rtc/room.go | 2 +- pkg/rtc/subscribedtrack.go | 2 +- pkg/rtc/subscriptionmanager.go | 2 +- pkg/rtc/transport.go | 2 +- pkg/rtc/wrappedreceiver.go | 2 +- pkg/service/ingress.go | 2 +- pkg/service/roomallocator.go | 2 +- pkg/sfu/buffer/helpers.go | 2 +- pkg/sfu/bwe/sendsidebwe/congestion_detector.go | 4 ++-- pkg/sfu/forwarder.go | 2 +- pkg/sfu/rtpstats/rtpstats_receiver.go | 2 +- pkg/sfu/rtpstats/rtpstats_sender.go | 2 +- pkg/sfu/videolayerselector/framenumberwrapper_test.go | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkg/rtc/participant.go b/pkg/rtc/participant.go index cda2ca01a..6d16a5d4d 100644 --- a/pkg/rtc/participant.go +++ b/pkg/rtc/participant.go @@ -2290,7 +2290,7 @@ func (p *ParticipantImpl) onReceivedDataMessage(kind livekit.DataPacket_Kind, da return case MigrationDataCacheStateDone: - // see the continous message, drop the cache + // see the continuous message, drop the cache p.reliableDataInfo.migrateInPubDataCache.Store(nil) } } @@ -3130,7 +3130,7 @@ func (p *ParticipantImpl) mediaTrackReceived(track sfu.TrackRemote, rtpReceiver // if the addTrackRequest is sent before participant active then it means the client tries to publish // before fully connected, in this case we only record the time when the participant is active since - // we want this metric to represent the time cost by pubilshing. + // we want this metric to represent the time cost by publishing. if activeAt := p.lastActiveAt.Load(); activeAt != nil && createdAt.Before(*activeAt) { createdAt = *activeAt } diff --git a/pkg/rtc/room.go b/pkg/rtc/room.go index 85a1477c9..d1bd5b1bd 100644 --- a/pkg/rtc/room.go +++ b/pkg/rtc/room.go @@ -681,7 +681,7 @@ func (r *Room) onSyncState(participant types.LocalParticipant, state *livekit.Sy } // synthesize a track setting for each disabled track, - // can be set before addding subscriptions, + // can be set before adding subscriptions, // in fact it is done before so that setting can be updated immediately upon subscription. for _, trackSid := range state.TrackSidsDisabled { participant.UpdateSubscribedTrackSettings(livekit.TrackID(trackSid), &livekit.UpdateTrackSettings{Disabled: true}) diff --git a/pkg/rtc/subscribedtrack.go b/pkg/rtc/subscribedtrack.go index 5309976e5..6daa69d54 100644 --- a/pkg/rtc/subscribedtrack.go +++ b/pkg/rtc/subscribedtrack.go @@ -352,7 +352,7 @@ func (t *SubscribedTrack) applySettings() { t.settingsLock.Lock() if settingsVersion != t.settingsVersion { - // a newer settings has superceded this one + // a newer settings has superseded this one t.settingsLock.Unlock() return } diff --git a/pkg/rtc/subscriptionmanager.go b/pkg/rtc/subscriptionmanager.go index 02871a5ea..94c05d315 100644 --- a/pkg/rtc/subscriptionmanager.go +++ b/pkg/rtc/subscriptionmanager.go @@ -539,7 +539,7 @@ func (m *SubscriptionManager) reconcileSubscription(s *mediaTrackSubscription) { // and the clean up path to handle removing subscription from the subscription map. // It is possible that the track is re-published before subscribed track is closed. // That could create a new subscription and a duplicate entry in SDP. - // Waiting for susbcribed track close would ensure that the track is removed from + // Waiting for subscribed track close would ensure that the track is removed from // the peer connection before re-published track is re-subscribed and added back to the SDP. return } diff --git a/pkg/rtc/transport.go b/pkg/rtc/transport.go index 6bc2cc566..a8f44638f 100644 --- a/pkg/rtc/transport.go +++ b/pkg/rtc/transport.go @@ -235,7 +235,7 @@ type PCTransport struct { // transceivers (senders) waiting for SetRemoteDescription (offer) to happen before // SetCodecPreferences can be invoked on them. // Pion adapts codecs/payload types from remote description. - // If SetCodecPreferences are done before the remote desctiption is processed, + // If SetCodecPreferences are done before the remote description is processed, // it is possible that the transceiver gets payload types from media engine. // Subssequently if the peer sends an offer with different payload type for the // same codec, there could be two payload types for the same codec and the wrong diff --git a/pkg/rtc/wrappedreceiver.go b/pkg/rtc/wrappedreceiver.go index 3128d7ff8..a26205ca3 100644 --- a/pkg/rtc/wrappedreceiver.go +++ b/pkg/rtc/wrappedreceiver.go @@ -93,7 +93,7 @@ func (r *WrappedReceiver) StreamID() string { // isAvailable: returns true if given codec is a potential codec from publisher or if an existing published codec can be translated // needsPublish: indicates if the codec is needed from publisher, some combinations can be achieved via codec translation internally, // -// example: unecrypted opus -> RED translation and vice-versa can be done without the need for publisher to send the other codec. +// example: unencrypted opus -> RED translation and vice-versa can be done without the need for publisher to send the other codec. func (r *WrappedReceiver) DetermineReceiver(codec webrtc.RTPCodecCapability) (isAvailable bool, needsPublish bool) { r.lock.Lock() diff --git a/pkg/service/ingress.go b/pkg/service/ingress.go index 10bf198d1..62dccc418 100644 --- a/pkg/service/ingress.go +++ b/pkg/service/ingress.go @@ -217,7 +217,7 @@ func (s *IngressService) LaunchPullIngress(ctx context.Context, info *livekit.In } func updateEnableTranscoding(info *livekit.IngressInfo) { - // Set BypassTranscoding as well for backward compatiblity + // Set BypassTranscoding as well for backward compatibility if info.EnableTranscoding != nil { info.BypassTranscoding = !*info.EnableTranscoding return diff --git a/pkg/service/roomallocator.go b/pkg/service/roomallocator.go index bcb2fd124..43d0edc07 100644 --- a/pkg/service/roomallocator.go +++ b/pkg/service/roomallocator.go @@ -208,7 +208,7 @@ func (r *StandardRoomAllocator) applyNamedRoomConfiguration(req *livekit.CreateR conf, ok := r.config.Room.RoomConfigurations[req.RoomPreset] if !ok { - return req, psrpc.NewErrorf(psrpc.InvalidArgument, "unknown room confguration in create room request") + return req, psrpc.NewErrorf(psrpc.InvalidArgument, "unknown room configuration in create room request") } clone := utils.CloneProto(req) diff --git a/pkg/sfu/buffer/helpers.go b/pkg/sfu/buffer/helpers.go index ccd0c076c..e2ec36a19 100644 --- a/pkg/sfu/buffer/helpers.go +++ b/pkg/sfu/buffer/helpers.go @@ -430,7 +430,7 @@ func IsH265KeyFrame(payload []byte) (kf bool) { case naluType == 48: // AP idx := 2 for idx < len(payload)-2 { - // TODO: check the DONL field (controled by sprop-max-don-diff) + // TODO: check the DONL field (controlled by sprop-max-don-diff) size := binary.BigEndian.Uint16(payload[idx:]) idx += 2 if idx >= len(payload) { diff --git a/pkg/sfu/bwe/sendsidebwe/congestion_detector.go b/pkg/sfu/bwe/sendsidebwe/congestion_detector.go index 4fe77fd62..f8a3e5374 100644 --- a/pkg/sfu/bwe/sendsidebwe/congestion_detector.go +++ b/pkg/sfu/bwe/sendsidebwe/congestion_detector.go @@ -674,7 +674,7 @@ func (c *congestionDetector) HandleTWCCFeedback(report *rtcp.TransportLayerCC) { } } - // 1. go through the TWCC feedback report and record recive time as reported by remote + // 1. go through the TWCC feedback report and record receive time as reported by remote // 2. process acknowledged packet and group them // // losses are not recorded if a feedback report is completely lost. @@ -1149,7 +1149,7 @@ func (c *congestionDetector) updateCongestionState(state bwe.CongestionState) (b // when in congested state, monitor changes in captured traffic ratio (CTR) // to ensure allocations are in line with latest estimates, it is possible that // the estimate is incorrect when congestion starts and the allocation may be - // sub-optimal and not enough to reduce/relieve congestion, by monitoing CTR + // sub-optimal and not enough to reduce/relieve congestion, by monitoring CTR // on a continuous basis allocations can be adjusted in the direction of // reducing/relieving congestion if state == bwe.CongestionStateCongested && fromState != bwe.CongestionStateCongested { diff --git a/pkg/sfu/forwarder.go b/pkg/sfu/forwarder.go index ce2771f23..9a9c6d8ff 100644 --- a/pkg/sfu/forwarder.go +++ b/pkg/sfu/forwarder.go @@ -701,7 +701,7 @@ func (f *Forwarder) SetRefSenderReport(layer int32, srData *livekit.RTCPSenderRe // // It could happen like this // 1. Normal operation: publisher sending sender reports and - // suscribers use reports from publisher to calculate and send + // subscribers use reports from publisher to calculate and send // RTCP sender report. // 2. Publisher pauses: there are no more reports. // 3. When paused, subscriber can still use the publisher side sender diff --git a/pkg/sfu/rtpstats/rtpstats_receiver.go b/pkg/sfu/rtpstats/rtpstats_receiver.go index a2138ed7d..778e5cd93 100644 --- a/pkg/sfu/rtpstats/rtpstats_receiver.go +++ b/pkg/sfu/rtpstats/rtpstats_receiver.go @@ -224,7 +224,7 @@ func (r *RTPStatsReceiver) Update( // Very old time stamp, happens under the following conditions // - resume after long mute, big time stamp jump // - an out of order packet from before the mute arrives (unsure what causes this - // very old packet to be trasmitted from remote), causing time stamp to jump back + // very old packet to be transmitted from remote), causing time stamp to jump back // to before mute, but it appears like it has rolled over. // Use a threshold against expected to ignore these. if gapSN < 0 && gapTS > 0 { diff --git a/pkg/sfu/rtpstats/rtpstats_sender.go b/pkg/sfu/rtpstats/rtpstats_sender.go index 7447dccac..19d5b5c4a 100644 --- a/pkg/sfu/rtpstats/rtpstats_sender.go +++ b/pkg/sfu/rtpstats/rtpstats_sender.go @@ -645,7 +645,7 @@ func (r *RTPStatsSender) UpdateFromReceiverReport(rr rtcp.ReceptionReport) (rtt // should not roll over for long time, for e. g. it will approximately take 100 days at 500 pps). // So, there seems to be a remote reporter issue where the sequence number rollover is missed. // - // catch up till diffrence between highest sent and highest received via receiver report is + // catch up till difference between highest sent and highest received via receiver report is // less than full 16-bit range. // // in a different flavor, there are clients that do not report properly, diff --git a/pkg/sfu/videolayerselector/framenumberwrapper_test.go b/pkg/sfu/videolayerselector/framenumberwrapper_test.go index c00aa89a2..4d0f6f21d 100644 --- a/pkg/sfu/videolayerselector/framenumberwrapper_test.go +++ b/pkg/sfu/videolayerselector/framenumberwrapper_test.go @@ -65,7 +65,7 @@ func TestFrameNumberWrapper(t *testing.T) { // frame out of order firstF = secondF secondF = getFrame(firstF, false) - // it is possile that an out of order non-keyframe has been converted to in order frame number if the diff is 32768 + // it is possible that an out of order non-keyframe has been converted to in order frame number if the diff is 32768 // that is ok because the client can't decode in such case and always need to wait for the key frame. // so it is just a failure of test case and increase the frame number here. if secondF-firstF == 0x8000 {