From 535366b90c170691842311a3898a3d83d744ef75 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 24 Sep 2026 02:32:59 +0200 Subject: refactor(node): move video streaming out of webrtc_server StreamingMixin in transport/webrtc/apps/streaming.py: stream credit, handover, the transcode slots and _stream_video_inner, moved unchanged. Co-Authored-By: Claude Opus 5.5 --- docs/transfers-v1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/transfers-v1.md') diff --git a/docs/transfers-v1.md b/docs/transfers-v1.md index f99424f..13e4869 100644 --- a/docs/transfers-v1.md +++ b/docs/transfers-v1.md @@ -67,7 +67,7 @@ So there is already a resume story here, it is just not reachable — and there is already a leak. **Video streaming is capped, and its cap is a good model.** `_stream_video` -(`webrtc_server.py:5230`) takes `ctx["_transcode_sem"]`, refuses with +(`webrtc/apps/streaming.py`) takes `ctx["_transcode_sem"]`, refuses with `"Server busy, retry shortly"` when it is empty, and every hard-won lesson in this repo about slots — `_replace_stream`, `shutdown_tasks()`, `_spawn()` and the garbage-collected task, `await proc.wait()` after `kill()` — is a lesson @@ -76,7 +76,7 @@ about *not losing a slot*. That history is why §5 exists. **One bug found while reading, in scope for this work.** `ops.py:1362-1365` hot-swaps the stream cap by assigning `webrtc._stream_sem` — an attribute that does not exist. The real semaphore is `ctx["_transcode_sem"]` -(`webrtc_server.py:5220`), and `hasattr(webrtc, '_stream_sem')` is always +(`_transcode_semaphore`, `webrtc/apps/streaming.py`), and `hasattr(webrtc, '_stream_sem')` is always False, so **changing `max_concurrent_streams` from the Node page has never taken effect without a restart**, contrary to §2.11 of draft v6. Two more hot-swappable caps are about to be added next to it; fix it with one shared -- cgit v1.2.3