Skip to content

wFix critical agent recording issues: layer init, downtrack race, debu… - #4003

Merged
boks1971 merged 1 commit into
livekit:masterfrom
am-sokolov:agent-recording-fixes
Oct 21, 2025
Merged

boks1971 merged 1 commit into
livekit:masterfrom
am-sokolov:agent-recording-fixes

Conversation

@am-sokolov

Copy link
Copy Markdown
Contributor

…g logging

Fix critical agent recording issues: layer init, downtrack race, debug logging

This commit applies three critical fixes for reliable agent recording from publisher tracks using manual subscription and explicit video quality requests.

Issue 1: Fix spatial layer initialization in Forwarder

Problem: SetMaxSpatialLayer() correctly updated the max spatial layer but failed to initialize target and current layers when they were still set to InvalidLayerSpatial. This caused video forwarding to fail silently.

Impact: Agents using manual subscription with explicit video quality requests (SetVideoQuality) received 0 video packets despite successful subscription. Audio worked fine (separate code path), only video was affected.

Fix: Initialize target and current spatial layers when max is set and they remain invalid.

File: pkg/sfu/forwarder.go

func (f *Forwarder) SetMaxSpatialLayer(spatialLayer int32) (bool, buffer.VideoLayer) {
    f.vls.SetMaxSpatial(spatialLayer)
    newMax := f.vls.GetMax()

    // Initialize target if invalid
    if f.vls.GetTarget().Spatial == buffer.InvalidLayerSpatial {
        f.vls.SetTarget(newMax)
        // Initialize current if invalid
        if f.vls.GetCurrent().Spatial == buffer.InvalidLayerSpatial {
            f.vls.SetCurrent(newMax)
        }
    }

    return true, newMax
}

Issue 2: Fix WrappedReceiver downtrack race condition

Problem: When downtracks were added before the underlying TrackReceiver was ready (still nil), they were silently lost. This race condition occurred when agents subscribed immediately after track publication.

Impact: Recording agents and other clients subscribing quickly after track publish received no packets. The race window was small but reproducible in automated testing scenarios.

Fix: Queue downtracks in a pending list until receiver is ready, then flush the queue atomically.

File: pkg/rtc/wrappedreceiver.go

type WrappedReceiver struct {
    // ... existing fields
    pendingDownTracks []sfu.TrackSender  // Queue for early subscribers
}

func (r *WrappedReceiver) AddDownTrack(track sfu.TrackSender) error {
    r.lock.Lock()
    defer r.lock.Unlock()

    if r.TrackReceiver != nil {
        return r.TrackReceiver.AddDownTrack(track)
    }

    // Queue until receiver ready
    r.pendingDownTracks = append(r.pendingDownTracks, track)
    return nil
}

// Flush queue when receiver becomes ready
func (r *WrappedReceiver) OnSetTrackReceiver() {
    for _, dt := range r.pendingDownTracks {
        r.TrackReceiver.AddDownTrack(dt)
    }
    r.pendingDownTracks = nil
}

Issue 3: Add debug logging to RTP forwarding pipeline

Problem: Zero visibility into RTP packet forwarding made it nearly impossible to diagnose why clients weren't receiving packets. Issues #1 and #2 took hours to identify without logging.

Impact: Silent failures in video forwarding had no diagnostic information. Developers had to modify server code and rebuild to debug packet flow issues.

Fix: Add debug logging for the first 10 H.264 video packets showing:

  • Packet details (sequence number, timestamp, payload size)
  • Downtrack count before broadcast
  • Write count (how many downtracks successfully received the packet)

File: pkg/sfu/receiver.go

Combined Impact

These three issues created a "perfect storm" failure mode where:

  • ✅ Client subscriptions succeeded (no errors thrown)
  • ❌ Video packets never arrived (silent failure)
  • ❌ No diagnostic information available (invisible problem)

Affected Scenarios:

  • Recording agents using manual subscription + explicit video quality
  • Any client calling SetVideoQuality() immediately after subscription
  • Automated testing scenarios with tight timing
  • Server-side recording of specific publisher tracks

Unaffected Scenarios:

  • Standard participant-to-participant calls with auto-subscribe
  • Clients using default video quality (no explicit layer setting)
  • Subscriptions with delayed quality requests

Why These Bugs Weren't Caught Earlier

The Python agents SDK uses auto_subscribe=true by default, which triggers a different subscription code path that avoids all three issues. These bugs specifically affect:

  • Manual subscription workflows (auto_subscribe=false)
  • Explicit video quality requests (SetVideoQuality)
  • Immediate subscriptions after track publication

Testing Validation

✅ Recording agents receive video packets immediately after subscription
✅ Multi-hour recordings complete without packet loss
✅ Immediate subscription after track publish works reliably
✅ Debug logs provide clear visibility into packet flow
✅ No regressions in standard participant subscriptions (verified)
✅ Works with both H.264 and VP8 video codecs

@CLAassistant

CLAassistant commented Oct 14, 2025 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@am-sokolov
am-sokolov force-pushed the agent-recording-fixes branch 2 times, most recently from 6f5e5eb to 1031846 Compare October 14, 2025 21:01
Comment thread pkg/rtc/wrappedreceiver.go Outdated
}

func (r *WrappedReceiver) AddDownTrack(track sfu.TrackSender) error {
r.lock.Lock()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method should be called after DetermineReceiver is called: Downtrack.OnCodecNegotiated -> Downtrack.OnBiding->Receiver.AddTrack, so trackReceiver should not be null. Even if the receiver is null, it will be panic not lost silently.

Comment thread pkg/sfu/forwarder.go

f.logger.Debugw("setting max spatial layer", "layer", spatialLayer)
f.vls.SetMaxSpatial(spatialLayer)
return true, f.vls.GetMax()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should trigger a stream allocator allocation which will set the layers -

sal.OnSubscribedLayerChanged(d, maxLayer)

Which version of the server are you seeing these issues in? These are common use cases where we have not seen issues.

Can you please share server side logs showing the problem?

@am-sokolov
am-sokolov force-pushed the agent-recording-fixes branch from 1031846 to 1968dd1 Compare October 15, 2025 14:42
@am-sokolov

am-sokolov commented Oct 15, 2025 •

Copy link
Copy Markdown
Contributor Author

Update: Removed Issue 2 After Further Testing

Thank you for the thorough review, especially questioning Issue 2. You were correct.

I rebuilt the LiveKit server with only Issue 1 applied (forwarder layer initialisation) and ran the full E2E test. Issue 2 was a misdiagnosis. The symptoms I attributed to a receiver race condition (numDownTracks=0 in logs) were actually caused by Issue 1's invalid forwarder layers. Once layers are properly initialised, packets forward correctly and downtracks work as designed.

Updated PR

I've force-pushed to include only Issue 1 (forwarder layer initialization). The PR now contains:

  • pkg/sfu/forwarder.go - Defensive layer initialization
  • pkg/sfu/forwarder_test.go - Test updates using existing disable() pattern

Regarding Issue 1: Stream Allocator Async Race

You mentioned this should trigger stream allocator allocation via OnSubscribedLayerChanged (downtrack.go:1394).

You're absolutely right that the allocator is designed to set layers. However, I discovered there's a timing race with the async event queue:

The Flow

// streamallocator.go:499-515
func (s *StreamAllocator) OnSubscribedLayerChanged(...) {
s.postEvent(Event{
Signal: streamAllocatorSignalAllocateTrack, // ← Queued to async handler
})
}

Timeline in Agent Scenario:

  1. SetMaxSpatialLayer() called → max set, target/current = INVALID
  2. OnSubscribedLayerChanged() called → posts event to async queue
  3. Publisher already streaming, packets arrive immediately
  4. Forwarder tries to forward, but target = INVALID → 0 packets forwarded
  5. ...10-100ms later... allocator event processed → NOW layers set

Why Normal P2P Works

  • Gradual subscription timing
  • Publisher may not be streaming yet when the subscription happens
  • By the time packets arrive, the allocator has processed the event
  • Race window doesn't matter

Why Agent Scenario Fails

  • Publisher already streaming when agent joins (JT_PUBLISHER dispatch)
  • Agent joins within milliseconds of track publication
  • Immediate SetVideoQuality(HIGH) call
  • Packets ready to forward BEFORE allocator processes the event
  • Race window is critical

Minimal Reproduction

I've created a standalone 250-line program that demonstrates this timing issue main.go.zip

Results:

  • Unpatched server: Publisher sent: 300 packets, Agent received: 0 packets
  • Patched server: Publisher sent: 300 packets, Agent received: 300 packets

My Fix: Defensive Initialisation

func (f *Forwarder) SetMaxSpatialLayer(spatialLayer int32) (bool, buffer.VideoLayer) {
f.vls.SetMaxSpatial(spatialLayer)
newMax := f.vls.GetMax()

  // Defensive: never leave target/current invalid
  // Allocator can still override when its event processes
  if f.vls.GetTarget().Spatial == buffer.InvalidLayerSpatial {
      f.vls.SetTarget(newMax)
      if f.vls.GetCurrent().Spatial == buffer.InvalidLayerSpatial {
          f.vls.SetCurrent(newMax)
      }
  }

  return true, newMax

}

Rationale:

  • Prevents the forwarder from being in an invalid state during the race window
  • Does not interfere with allocator (can still override when event processes)
  • Safe default: max layer is a reasonable initial value
  • No performance impact: simple check

Questions for You

  1. Is there a synchronisation mechanism to wait for allocator events to process?
  2. Should we add a synchronous allocation path for immediate subscriptions?
  3. Is defensive initialisation acceptable, or would you prefer a different architectural approach?

The timing issue is real and reproducible - I just want to fix it in the right place architecturally.

@boks1971

Copy link
Copy Markdown
Contributor

Thank you for all the details @am-sokolov . Really appreciate it. Let me review this once again and get back to you. I think the defensive initialisation you have is probably fine. But, I wanted to look up historical notes to make sure that it does not introduce some unexpected behaviour for some cases.

Comment thread pkg/sfu/forwarder.go
}
}
f.logger.Infow("updated max spatial layer", "newMax", newMax)
return true, newMax

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this.

Can you please make three changes?

  1. Check for isDeficientLocked. If true, do not set target. That means the congestion controller is throttling this track. So, it should be left to stream allocator to unblock this.
  2. Do not set current layer. The forwarder start should happen on a key frame and layer selectors look for that.
  3. Log once indicating that an opportunistic target is set. Also, can you please make it Debugw. This could happen in a lot of cases and would be good to have it at Debug level only.

@am-sokolov
am-sokolov force-pushed the agent-recording-fixes branch from 1968dd1 to af24542 Compare October 16, 2025 11:11
@am-sokolov

Copy link
Copy Markdown
Contributor Author

Thank you for the feedback! I've updated the PR with all three changes:

  1. Added isDeficientLocked() check - Won't set target when congestion controller is throttling
  2. Removed SetCurrent() call - Current layer initialisation now deferred to keyframe-based forwarder start
  3. Changed to Debugw() logging - Single debug-level log to minimise noise

@boks1971

Copy link
Copy Markdown
Contributor

Thank you very much @am-sokolov . Will merge this shortly.

@boks1971

Copy link
Copy Markdown
Contributor

@am-sokolov

Copy link
Copy Markdown
Contributor Author

Done

@boks1971

Copy link
Copy Markdown
Contributor

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

CEO seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Apologies for the delay @am-sokolov . This needs to be signed by the same GH user who is committing to the repo. Looks like GH user CEO committed.

@boks1971

Copy link
Copy Markdown
Contributor

@am-sokolov Please let me know if you can sign using GH user CEO which was used to commit code.

I can take the changes and apply it too, but it would be good to have your contribution attributed correctly.

When SetMaxSpatialLayer() is called with target/current layers in
InvalidLayerSpatial state, opportunistically initialize the target
layer to avoid dropped packets during async stream allocator
initialization.

Guards:
- Only sets target if not congestion-throttled (isDeficientLocked)
- Does not set current layer (deferred to keyframe-based forwarder start)
- Logs at Debug level to avoid log noise

This prevents undefined layer state during manual subscription
with immediate quality upgrades (WithAutoSubscribe(false) +
SetVideoQuality(HIGH)).
@am-sokolov
am-sokolov force-pushed the agent-recording-fixes branch from af24542 to c275b77 Compare October 20, 2025 12:38
@am-sokolov

am-sokolov commented Oct 20, 2025 •

Copy link
Copy Markdown
Contributor Author

I've updated the commit author so the CLA bot should recognize me now. However, it looks like the staticcheck CI is running into an issue that seems unrelated to my changes:

golang.org/x/[email protected]/internal/tokeninternal/tokeninternal.go:64:9:
invalid array length -delta * delta

This appears to be a compatibility issue between the staticcheck action and golang.org/x/tools. I noticed other CI checks are passing fine, so I think this might be an infrastructure hiccup rather than something with the code itself.

Would you mind taking a quick look when you get a chance? Happy to help debug if needed, or if you want me to try anything on my end!

Thanks for your patience with the CLA stuff earlier - I think we should be all set now.

@boks1971

Copy link
Copy Markdown
Contributor

Thank you @am-sokolov . Really appreciate it.

I will take a look.

@boks1971

Copy link
Copy Markdown
Contributor

Looks like staticcheck in the GH CI cache was an older version. Clearing the cache and re-running addresses this. Thank you very much for the contribution. I will merge this now.

@boks1971
boks1971 merged commit c039769 into livekit:master Oct 21, 2025
eleboucher pushed a commit to eleboucher/homelab that referenced this pull request May 15, 2026
…0 → v1.11.0) (#484)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker.io/livekit/livekit-server](https://github.com/livekit/livekit) | minor | `v1.9.0` → `v1.11.0` |

---

### Release Notes

<details>
<summary>livekit/livekit (docker.io/livekit/livekit-server)</summary>

### [`v1.11.0`](https://github.com/livekit/livekit/releases/tag/v1.11.0)

[Compare Source](livekit/livekit@v1.10.1...v1.11.0)

NOTE: Minor version bump that enables data tracks (<https://docs.livekit.io/transport/data/data-tracks/>) by default.

##### Added

- Embedded turn test ([#&#8203;4412](livekit/livekit#4412))
- chore: log API key during worker registration ([#&#8203;4428](livekit/livekit#4428))
- Add some simple data track stats ([#&#8203;4431](livekit/livekit#4431))
- Add `Close` method for UpDataTrackManager and call it on participant ([#&#8203;4432](livekit/livekit#4432))
- Log join duration. ([#&#8203;4433](livekit/livekit#4433))
- Add subscriber stream start event notification ([#&#8203;4449](livekit/livekit#4449))

##### Changed

- Cleaning up some logs and standardising log frequency. ([#&#8203;4420](livekit/livekit#4420))
- Keep subscription synchronous when publisher is expected to resume. ([#&#8203;4424](livekit/livekit#4424), [#&#8203;4425](livekit/livekit#4425))
- Do not close publisher peer connection to aid migration. ([#&#8203;4426](livekit/livekit#4426), [#&#8203;4427](livekit/livekit#4427))
- Enable data tracks by default. ([#&#8203;4429](livekit/livekit#4429))
- chore: pin GH commits and switch to golangci-lint ([#&#8203;4444](livekit/livekit#4444))
- Switch to stdlib maps, slices ([#&#8203;4445](livekit/livekit#4445))
- Store concrete ICE candidate for remote candidates. ([#&#8203;4458](livekit/livekit#4458))

##### Fixed

- clear track notifier observers on subscription teardown ([#&#8203;4413](livekit/livekit#4413))
- Guard against timestamp inversion in RED -> Opus conversion. ([#&#8203;4414](livekit/livekit#4414), [#&#8203;4415](livekit/livekit#4415), [#&#8203;4418](livekit/livekit#4418))
- ensure participant init is correctly serialized for logging ([#&#8203;4417](livekit/livekit#4417))
- Clean up data track observers on unsubscribe. ([#&#8203;4421](livekit/livekit#4421))
- compute agent dispatch affinity from target load ([#&#8203;4442](livekit/livekit#4442))
- Apply IPFilter when get local ip ([#&#8203;4440](livekit/livekit#4440))
- Unsubscribe from data track on close ([#&#8203;4443](livekit/livekit#4443))
- Use Muted in TrackInfo to propagated published track muted. ([#&#8203;4453](livekit/livekit#4453))
- fix: limit join request and WHIP request body to http.DefaultMaxHeaderBytes ([#&#8203;4450](livekit/livekit#4450))
- fix publisher frame count reporting for simulcast streams ([#&#8203;4457](livekit/livekit#4457))

### [`v1.10.1`](https://github.com/livekit/livekit/releases/tag/v1.10.1)

[Compare Source](livekit/livekit@v1.10.0...v1.10.1)

##### Added

- add packet trailer stripping support ([#&#8203;4361](livekit/livekit#4361))
- Path check helpers ([#&#8203;4392](livekit/livekit#4392))
- add deadline to dtls connect context ([#&#8203;4395](livekit/livekit#4395))
- feat(agent-dispatch): add job restart policy ([#&#8203;4401](livekit/livekit#4401))

##### Changed

- Close both peer connections to aid migration. ([#&#8203;4382](livekit/livekit#4382))

##### Fixed

- Fix TURN server URL ([#&#8203;4389](livekit/livekit#4389))
- AV1 parser overflow fix. ([#&#8203;4405](livekit/livekit#4405))
- Address malformed H264/H265 parsing issues ([#&#8203;4407](livekit/livekit#4407))

### [`v1.10.0`](https://github.com/livekit/livekit/releases/tag/v1.10.0)

[Compare Source](livekit/livekit@v1.9.12...v1.10.0)

##### PLEASE NOTE: The logging key for participant session ID (a.k.a participant SID) has been changed from `pID` to `participantID` in this release for the sake of clarity. Hence the minor version bump.

##### Added

- Add option to require media sections when participant joining ([#&#8203;4347](livekit/livekit#4347), [#&#8203;4354](livekit/livekit#4354))
- Support originating calls from custom domains ([#&#8203;4349](livekit/livekit#4349))
- Add StopEgress function to the EgressLauncher interface ([#&#8203;4353](livekit/livekit#4353))
- Add option to not re-use transceiver in e2ee. ([#&#8203;4356](livekit/livekit#4356))
- Add API to restart lite stats. ([#&#8203;4366](livekit/livekit#4366), [#&#8203;4368](livekit/livekit#4368))

* handle AGENT\_ERROR disconnect reason ([#&#8203;4339](livekit/livekit#4339))

##### Changed

- Mark last run of grow bucket outside goroutine. ([#&#8203;4348](livekit/livekit#4348))
- Refine ipv6 support ([#&#8203;4352](livekit/livekit#4352))
- Sample data send error logging. ([#&#8203;4358](livekit/livekit#4358))
- Switch data track extension to 1-byte ID/length. ([#&#8203;4362](livekit/livekit#4362))
- Do not kick off migration of closed participant ([#&#8203;4363](livekit/livekit#4363))
- Do not block all ext ID determination on stream allocator listener ([#&#8203;4364](livekit/livekit#4364))
- Rename log field pID to participantID ([#&#8203;4365](livekit/livekit#4365))
- Replace deprecated io/ioutil with io in whipservice ([#&#8203;4375](livekit/livekit#4375))
- Update grpc to address CVE-2026-33186 ([#&#8203;4381](livekit/livekit#4381))

##### Fixed

- Fix repair stream ID reporting for RTX pairing. ([#&#8203;4369](livekit/livekit#4369))

### [`v1.9.12`](https://github.com/livekit/livekit/releases/tag/v1.9.12)

[Compare Source](livekit/livekit@v1.9.11...v1.9.12)

##### Added

- Add silent frame for pcmu/a ([#&#8203;4258](livekit/livekit#4258))
- adds a test to ensure agent worker errors cause disconnection ([#&#8203;4273](livekit/livekit#4273))
- Populate client\_protocol field in ParticipantInfo ([#&#8203;4293](livekit/livekit#4293))
- Read client protocol from query param ([#&#8203;4294](livekit/livekit#4294))
- generate & log egressID for start egress request ([#&#8203;4303](livekit/livekit#4303))
- ESP32 Client Info ([#&#8203;4267](livekit/livekit#4267))
- feat: make INSTALL\_PATH overridable in install script ([#&#8203;3954](livekit/livekit#3954))

##### Changed

- Defer setting clock rate in RTPStats module till codec is bound. ([#&#8203;4250](livekit/livekit#4250))
- Wrapping SIP errors for invalid argument and not found ([#&#8203;4253](livekit/livekit#4253))
- Ignore parse addr error when add remote candidate ([#&#8203;4264](livekit/livekit#4264))
- Generate config flags ([#&#8203;4268](livekit/livekit#4268))
- clear reference guard when resetting signal stats ([#&#8203;4279](livekit/livekit#4279))
- refresh telemetry guard on participant move ([#&#8203;4280](livekit/livekit#4280))
- use separate allocation for signal stats telemetry guard ([#&#8203;4281](livekit/livekit#4281))
- Set up audio config in audio level module when config is updated. ([#&#8203;4290](livekit/livekit#4290))
- Update self-hosting deployment documentation link ([#&#8203;4312](livekit/livekit#4312))
- Key telemetry stats worker using combination of roomID, participantID ([#&#8203;4323](livekit/livekit#4323))
- Two phase restart when doing external restart of receiver. ([#&#8203;4329](livekit/livekit#4329))
- Send participant left event after track unpublished for moved ([#&#8203;4334](livekit/livekit#4334))

##### Fixed

- Fix receiver restart race ([#&#8203;4248](livekit/livekit#4248))
- require participant broadcast when metadata/attributes are set in token ([#&#8203;4266](livekit/livekit#4266))
- Create buffer if needed when a PLI is requested. ([#&#8203;4282](livekit/livekit#4282))
- Do not increase max expected layer on track info update. ([#&#8203;4285](livekit/livekit#4285))
- Publish is always on publisher peer connection.([#&#8203;4307](livekit/livekit#4307))
- Potential fix for code scanning alert no. 35: Workflow does not contain permissions ([#&#8203;4311](livekit/livekit#4311))
- Potential fix for code scanning alert no. 36: Workflow does not contain permissions ([#&#8203;4310](livekit/livekit#4310))
- Fix for some CodeQL reported issues ([#&#8203;4314](livekit/livekit#4314))
- Protect against incorrect temporal layer. ([#&#8203;4327](livekit/livekit#4327))
- do not discount packets lost on duplicate packets ([#&#8203;4333](livekit/livekit#4333))
- Use ParticipantTelemetryListener of LocalParticipant. ([#&#8203;4342](livekit/livekit#4342))
- Fix SIP client timeout. ([#&#8203;4345](livekit/livekit#4345))

### [`v1.9.11`](https://github.com/livekit/livekit/releases/tag/v1.9.11)

[Compare Source](livekit/livekit@v1.9.10...v1.9.11)

##### PLEASE NOTE: The previous release tag v1.9.10 hit a panic under some conditions. Sincerely regret the inconvenience caused. Although we do test rigorously, it is not guaranteed to cover all scenarios. We request you to report any issues you encounter. Thank you.

##### Added

- Support OpenTelemetry tracing. Add Jaeger support. ([#&#8203;4222](livekit/livekit#4222))
- Add option to force simuclast codec. ([#&#8203;4226](livekit/livekit#4226))
- Log timeout in API ([#&#8203;4231](livekit/livekit#4231), [#&#8203;4232](livekit/livekit#4232))
- Add participant option for data track auto-subscribe. ([#&#8203;4240](livekit/livekit#4240))

##### Changed

- Remove enable arrival time forwarding method. ([#&#8203;4217](livekit/livekit#4217))
- sfu/receiver and sfu/buffer refactor ([#&#8203;4221](livekit/livekit#4221), [#&#8203;4224](livekit/livekit#4224), [#&#8203;4225](livekit/livekit#4225))
- Change some logs to debugw ([#&#8203;4229](livekit/livekit#4229))
- Changing field naming of data track packet ([#&#8203;4235](livekit/livekit#4235))
- Update Pion transport package. ([#&#8203;4237](livekit/livekit#4237))
- Wrapping the invalid request errors for CreateSipParticipant ([#&#8203;4239](livekit/livekit#4239))

##### Fixed

- Swap result sink atomically rather than closing and setting ([#&#8203;4216](livekit/livekit#4216))
- Address crash in v1.9.10 ([#&#8203;4219](livekit/livekit#4219), [#&#8203;4220](livekit/livekit#4220))
- Return on SDP fragment read error. ([#&#8203;4228](livekit/livekit#4228))

### [`v1.9.10`](https://github.com/livekit/livekit/blob/HEAD/CHANGELOG.md#PLEASE-NOTE-The-previous-release-tag-v1910-hit-a-panic-under-some-conditions-Sincerely-regret-the-inconvenience-caused-Although-we-do-test-rigorously-it-is-not-guaranteed-to-cover-all-scenarios-We-request-you-to-report-any-issues-you-encounter-Thank-you)

[Compare Source](livekit/livekit@v1.9.9...v1.9.10)

##### Added

- Support OpenTelemetry tracing. Add Jaeger support. ([#&#8203;4222](livekit/livekit#4222))
- Add option to force simuclast codec. ([#&#8203;4226](livekit/livekit#4226))
- Log timeout in API ([#&#8203;4231](livekit/livekit#4231), [#&#8203;4232](livekit/livekit#4232))
- Add participant option for data track auto-subscribe. ([#&#8203;4240](livekit/livekit#4240))

##### Changed

- Remove enable arrival time forwarding method. ([#&#8203;4217](livekit/livekit#4217))
- sfu/receiver and sfu/buffer refactor ([#&#8203;4221](livekit/livekit#4221), [#&#8203;4224](livekit/livekit#4224), [#&#8203;4225](livekit/livekit#4225))
- Change some logs to debugw ([#&#8203;4229](livekit/livekit#4229))
- Changing field naming of data track packet ([#&#8203;4235](livekit/livekit#4235))
- Update Pion transport package. ([#&#8203;4237](livekit/livekit#4237))
- Wrapping the invalid request errors for CreateSipParticipant ([#&#8203;4239](livekit/livekit#4239))

##### Fixed

- Swap result sink atomically rather than closing and setting ([#&#8203;4216](livekit/livekit#4216))
- Address crash in v1.9.10 ([#&#8203;4219](livekit/livekit#4219), [#&#8203;4220](livekit/livekit#4220))
- Return on SDP fragment read error. ([#&#8203;4228](livekit/livekit#4228))

### [`v1.9.9`](https://github.com/livekit/livekit/releases/tag/v1.9.9)

[Compare Source](livekit/livekit@v1.9.8...v1.9.9)

##### Added

- Add support for RTP stream restart. ([#&#8203;4161](livekit/livekit#4161))

##### Changed

- Avoid duplicate track add to room track manager.  ([#&#8203;4152](livekit/livekit#4152), [#&#8203;4153](livekit/livekit#4153))
- Consistently undo update to sequence number and timestamp when the incoming packet cannot be sequenced. ([#&#8203;4156](livekit/livekit#4156))
- deregister observability function when participant is closed ([#&#8203;4157](livekit/livekit#4157))
- Ensure subscribe data track handles are unique ([#&#8203;4162](livekit/livekit#4162))
- move delete to oss service store ([#&#8203;4164](livekit/livekit#4164))
- clean up manual roomservice log redaction ([#&#8203;4165](livekit/livekit#4165))
- skip lost sequence number ranges in getIntervalStats ([#&#8203;4166](livekit/livekit#4166), [#&#8203;4169](livekit/livekit#4169))

##### Fixed

- chore: fix a large number of spelling issues ([#&#8203;4147](livekit/livekit#4147))
- Handle case of sequence number jump just after start. ([#&#8203;4150](livekit/livekit#4150))
- Drop run away receiver reports. ([#&#8203;4170](livekit/livekit#4170))
- Publish/Unpublish counter match. ([#&#8203;4173](livekit/livekit#4173))

### [`v1.9.8`](https://github.com/livekit/livekit/releases/tag/v1.9.8)

[Compare Source](livekit/livekit@v1.9.7...v1.9.8)

##### Added

- Mark RTCP buffer Write as noinline. (for better heap attribution) ([#&#8203;4138](livekit/livekit#4138))
- add debug metric for tracking references ([#&#8203;4134](livekit/livekit#4134))

##### Changed

- Use isEnding to indicate if down track could be resumed. ([#&#8203;4132](livekit/livekit#4132))
- switch participant callbacks to room to listener interface ([#&#8203;4136](livekit/livekit#4136))
- protocol deps to get inactive file adjusted memory usage. ([#&#8203;4137](livekit/livekit#4137))
- update webrtc to 4.1.8 to pick up DTLS fingerprint check during handshake ([#&#8203;4140](livekit/livekit#4140))

##### Fixed

- Do not pause rid in SDP to prevent race with adaptive streaming ([#&#8203;4129](livekit/livekit#4129))
- leak fixes ([#&#8203;4131](livekit/livekit#4131), [#&#8203;4141](livekit/livekit#4141), [#&#8203;4142](livekit/livekit#4142), [#&#8203;4143](livekit/livekit#4143), [#&#8203;4144](livekit/livekit#4144))

### [`v1.9.7`](https://github.com/livekit/livekit/releases/tag/v1.9.7)

[Compare Source](livekit/livekit@v1.9.6...v1.9.7)

##### Added

- Data tracks (experimental and not ready for use) ([#&#8203;4089](livekit/livekit#4089))

##### Changed

- log bucket growth ([#&#8203;4122](livekit/livekit#4122))
- Update pion/ice to stop gather first on close ([#&#8203;4123](livekit/livekit#4123))
- move utils.WrapAround to mediatransportutil ([#&#8203;4124](livekit/livekit#4124))
- Let participant close remove the published tracks. ([#&#8203;4125](livekit/livekit#4125))

##### Fixed

- Fix concurrent map access for [#&#8203;4126](livekit/livekit#4126). ([#&#8203;4127](livekit/livekit#4127))

### [`v1.9.6`](https://github.com/livekit/livekit/releases/tag/v1.9.6)

[Compare Source](livekit/livekit@v1.9.4...v1.9.6)

##### Added

- Control latency of lossy data channel ([#&#8203;4088](livekit/livekit#4088))
- logger proto redaction. ([#&#8203;4090](livekit/livekit#4090))
- Record join/publish/subscribe cancellations ([#&#8203;4102](livekit/livekit#4102), [#&#8203;4104](livekit/livekit#4104))

##### Fixed

- Fix "address" typo in transport logs (addddress → address) ([#&#8203;4097](livekit/livekit#4097))
- Clear stereo=1 if stereo is not enabled. ([#&#8203;4101](livekit/livekit#4101))
- Participant session close deadlock fixes ([#&#8203;4107](livekit/livekit#4107), [#&#8203;4113](livekit/livekit#4113), [#&#8203;4116](livekit/livekit#4116))

##### Changed

- Switch forwarding latency log to Debugw ([#&#8203;4098](livekit/livekit#4098))
- Update mediatransportutil to get OWD estimator relocation ([#&#8203;4115](livekit/livekit#4115))

### [`v1.9.4`](https://github.com/livekit/livekit/releases/tag/v1.9.4)

[Compare Source](livekit/livekit@v1.9.3...v1.9.4)

##### Added

- Log reason for subscriber not being able to determine codec. ([#&#8203;4071](livekit/livekit#4071))
- Kind details for connector ([#&#8203;4072](livekit/livekit#4072))

##### Fixed

- Prevent invalid track access while peer connection is shutting down. ([#&#8203;4054](livekit/livekit#4054))

##### Changed

- Update PsRPC to get redis pipeliner implementation ([#&#8203;4055](livekit/livekit#4055))
- Forwarding latency measurement. ([#&#8203;4056](livekit/livekit#4056). [#&#8203;4057](livekit/livekit#4057), [#&#8203;4059](livekit/livekit#4059), [#&#8203;4061](livekit/livekit#4061), [#&#8203;4062](livekit/livekit#4062), [#&#8203;4067](livekit/livekit#4067), [#&#8203;4080](livekit/livekit#4080))
- Update pion/transport to v3.1.1 (to get batch I/O ping-pong buffer) ([#&#8203;4070](livekit/livekit#4070))
- Use sync.Pool for objects in packet path. ([#&#8203;4066](livekit/livekit#4066))
- Bump protocol to pull sip validation changes and error mapping ([#&#8203;4081](livekit/livekit#4081))

### [`v1.9.3`](https://github.com/livekit/livekit/releases/tag/v1.9.3)

[Compare Source](livekit/livekit@v1.9.2...v1.9.3)

##### Added

- Opportunistic video layer allocation on setting max spatial layer. ([#&#8203;4003](livekit/livekit#4003), [#&#8203;4030](livekit/livekit#4030), [#&#8203;4031](livekit/livekit#4031), [#&#8203;4033](livekit/livekit#4033))
- use env var for GOARCH. ([#&#8203;4012](livekit/livekit#4012))
- Use simulcast codec as default policy for audio track. ([#&#8203;4040](livekit/livekit#4040))
- Enable AbsCaptureTimeURI in RTC configuration. ([#&#8203;4043](livekit/livekit#4043))
- Add prom histogram for forwarding latency and jitter. ([#&#8203;4044](livekit/livekit#4044), [#&#8203;4045](livekit/livekit#4045))

##### Fixed

- Correct direction for request/response for prom counters. ([#&#8203;4027](livekit/livekit#4027))
- Do not bind buffer if codec is invalid. ([#&#8203;4028](livekit/livekit#4028))
- Remove \~ from rid which indicates disabled layer to get the actual rid. ([#&#8203;4032](livekit/livekit#4032))
- Prevent leakage of previous codec after codec regression. ([#&#8203;4035](livekit/livekit#4035), [#&#8203;4037](livekit/livekit#4037))
- fix: add missing Unlock() in AddReceiver. ([#&#8203;4036](livekit/livekit#4036))

##### Changed

- Some golang modernisation bits. ([#&#8203;4106](livekit/livekit#4106))
- Use rtp converter from protocol/utils. ([#&#8203;4019](livekit/livekit#4019), [#&#8203;4020](livekit/livekit#4020))
- High forwarding latency. ([#&#8203;4034](livekit/livekit#4034), [#&#8203;4038](livekit/livekit#4038))
- if RingingTimeout is provided, deadline should be set to that timeout. ([#&#8203;4018](livekit/livekit#4018))
- Don't warn 0 payload type for PCMU. ([#&#8203;4039](livekit/livekit#4039))

### [`v1.9.2`](https://github.com/livekit/livekit/releases/tag/v1.9.2)

[Compare Source](livekit/livekit@v1.9.1...v1.9.2)

##### Added

- Use gzip reader pool ([#&#8203;3903](livekit/livekit#3903))
- Rpcs for ingress proxy WHIP ([#&#8203;3911](livekit/livekit#3911))
- Include agent\_name as a participant attribute ([#&#8203;3914](livekit/livekit#3914))
- Clean code as there is no oss sweeper for ingress ([#&#8203;3918](livekit/livekit#3918))
- Support simulcasting of audio ([#&#8203;3920](livekit/livekit#3920))
- Subscrbed audio codecs - update from remote nodes. ([#&#8203;3921](livekit/livekit#3921))
- Log some information around high forwarding latency. ([#&#8203;3944](livekit/livekit#3944))
- feat: server rpc apis ([#&#8203;3904](livekit/livekit#3904))
- short circuit participant broadcast filter in livestream mode ([#&#8203;3955](livekit/livekit#3955))
- Adjust for hold time when fowarding RTCP report. ([#&#8203;3956](livekit/livekit#3956))
- Add node\_ip to config-sample.yaml ([#&#8203;3960](livekit/livekit#3960))
- add idempotent reference count to telemetry stats worker ([#&#8203;3964](livekit/livekit#3964))
- add config for user data recording ([#&#8203;3966](livekit/livekit#3966))
- Provide the InputVideo/AudioState to Ingress in WHIPRTCConnectionNotify ([#&#8203;3982](livekit/livekit#3982))
- Add encryption datapacket type ([#&#8203;3869](livekit/livekit#3869))
- Allow passing inline trunk for outbound calls. ([#&#8203;3987](livekit/livekit#3987))
- Log RPC details. ([#&#8203;3991](livekit/livekit#3991))
- "Power of Two Random Choices" option for node selection ([#&#8203;3785](livekit/livekit#3785))
- Adding ProviderInfo to GetSIPTrunkAuthenticationResponse ([#&#8203;3993](livekit/livekit#3993))
- Use answer with mid -> trackID mapping when in single peer connection ([#&#8203;4005](livekit/livekit#4005))
- Include mid -> trackID in both SDP offer and answer. ([#&#8203;4007](livekit/livekit#4007))

##### Fixed

- add incoming request id to request response message ([#&#8203;3912](livekit/livekit#3912))
- Simulcast audio fixes ([#&#8203;3925](livekit/livekit#3925))
- Fix dynacast subscriber node clearing on move participant. ([#&#8203;3926](livekit/livekit#3926))
- mediatransportutil crash fix for logging local address ([#&#8203;3930](livekit/livekit#3930))
- Do DD restart only if DD structure is present. ([#&#8203;3935](livekit/livekit#3935))
- Avoid matching on empty track id. ([#&#8203;3937](livekit/livekit#3937))
- fix stats worker closed condition ([#&#8203;3965](livekit/livekit#3965))
- Update deps to fix redis issue when 1 cluster address is provided ([#&#8203;3969](livekit/livekit#3969))
- Revert unintentional change to not handle transport fallback ([#&#8203;3970](livekit/livekit#3970))
- Do not panic of redis is not configured ([#&#8203;3981](livekit/livekit#3981))
- Sort codec layers when adding track ([#&#8203;3998](livekit/livekit#3998))
- Resort to full search for requested quality is not available. ([#&#8203;4000](livekit/livekit#4000))
- Do not try to read stats from peer connection after close. ([#&#8203;4002](livekit/livekit#4002))
- Update pion/webrtc to prevent GetStats panic. ([#&#8203;4004](livekit/livekit#4004))

##### Changed

- update protocol for sip api change ([#&#8203;3902](livekit/livekit#3902))
- Refactor subscribedTrack + mediaTrackSubscriptions. ([#&#8203;3908](livekit/livekit#3908))
- Set publisher codec preferences after setting remote description ([#&#8203;3913](livekit/livekit#3913))
- update protocol for psrpc ([#&#8203;3915](livekit/livekit#3915))
- Wait for `SetRemoteDescription` before configuring senders. ([#&#8203;3924](livekit/livekit#3924))
- Update mediatransportutil to log external IP found via STUN. ([#&#8203;3929](livekit/livekit#3929))
- Add debugging from DD frame number wrap around. ([#&#8203;3933](livekit/livekit#3933))
- More debugging of DD jump ([#&#8203;3934](livekit/livekit#3934))
- Use difference in key frame counter to stop seeder. ([#&#8203;3936](livekit/livekit#3936))
- Update protocol for SipCreateParticipant ([#&#8203;3939](livekit/livekit#3939))
- mediatransportutil to log local address when validating external IP  ([#&#8203;3942](livekit/livekit#3942))
- Use microseconds for forwarding stats. ([#&#8203;3943](livekit/livekit#3943))
- Tweaks tresholds for logging high forwarding latency/jitter. ([#&#8203;3945](livekit/livekit#3945))
- Flush stats when there are no packets. ([#&#8203;3947](livekit/livekit#3947))
- handle terminated job requests ([#&#8203;3948](livekit/livekit#3948))
- Switch ops queue a singly linked list. ([#&#8203;3949](livekit/livekit#3949))
- Revert "Switch ops queue a singly linked list." ([#&#8203;3950](livekit/livekit#3950))
- Adjust stream allocator ping interval based on state. ([#&#8203;3951](https://github.com/livekit/livekit/issues/3951))
- avoid logging on small values ([#&#8203;3958](https://github.com/livekit/livekit/issues/3958))
- Update protocol for EventKey helper. ([#&#8203;3963](https://github.com/livekit/livekit/issues/3963))
- Do not force codec regression between opus and red. ([#&#8203;3980](https://github.com/livekit/livekit/issues/3980))
- Do not start forawarding on out-of-order packet. ([#&#8203;3985](https://github.com/livekit/livekit/issues/3985))
- Use padding only packets for dummy start of audio. ([#&#8203;3984](https://github.com/livekit/livekit/issues/3984))
- Support Opus mixed with RED when encrypted. ([#&#8203;3986](https://github.com/livekit/livekit/issues/3986))
- Limit check to red + opus when looking for primary codec match. ([#&#8203;3988](https://github.com/livekit/livekit/issues/3988))
- Increment RTP timestamp on padding when using dummy start. ([#&#8203;3989](https://github.com/livekit/livekit/issues/3989))
- Revert to using silence packets for audio dummy start. ([#&#8203;3999](https://github.com/livekit/livekit/issues/3999))
- Count request/response packets on both client and server side. ([#&#8203;4001](https://github.com/livekit/livekit/issues/4001))
- Do not call receiver methods under settings lock. ([#&#8203;4006](https://github.com/livekit/livekit/issues/4006))
- counterfeiter needs an older version of x/tools ([#&#8203;4009](https://github.com/livekit/livekit/issues/4009))

### [`v1.9.1`](https://github.com/livekit/livekit/blob/HEAD/CHANGELOG.md#PLEASE-NOTE-The-previous-release-tag-v1910-hit-a-panic-under-some-conditions-Sincerely-regret-the-inconvenience-caused-Although-we-do-test-rigorously-it-is-not-guaranteed-to-cover-all-scenarios-We-request-you-to-report-any-issues-you-encounter-Thank-you)

[Compare Source](livekit/livekit@v1.9.0...v1.9.1)

##### Added

- Support OpenTelemetry tracing. Add Jaeger support. ([#&#8203;4222](livekit/livekit#4222))
- Add option to force simuclast codec. ([#&#8203;4226](livekit/livekit#4226))
- Log timeout in API ([#&#8203;4231](livekit/livekit#4231), [#&#8203;4232](livekit/livekit#4232))
- Add participant option for data track auto-subscribe. ([#&#8203;4240](livekit/livekit#4240))

##### Changed

- Remove enable arrival time forwarding method. ([#&#8203;4217](livekit/livekit#4217))
- sfu/receiver and sfu/buffer refactor ([#&#8203;4221](livekit/livekit#4221), [#&#8203;4224](livekit/livekit#4224), [#&#8203;4225](livekit/livekit#4225))
- Change some logs to debugw ([#&#8203;4229](livekit/livekit#4229))
- Changing field naming of data track packet ([#&#8203;4235](livekit/livekit#4235))
- Update Pion transport package. ([#&#8203;4237](livekit/livekit#4237))
- Wrapping the invalid request errors for CreateSipParticipant ([#&#8203;4239](livekit/livekit#4239))

##### Fixed

- Swap result sink atomically rather than closing and setting ([#&#8203;4216](livekit/livekit#4216))
- Address crash in v1.9.10 ([#&#8203;4219](livekit/livekit#4219), [#&#8203;4220](livekit/livekit#4220))
- Return on SDP fragment read error. ([#&#8203;4228](livekit/livekit#4228))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->

Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/484
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants