Subsystem.SetTeardownHook installs a callback the subsystem invokes just before closing per-stream Sources in onProcessStop. Used by the WHEP Handler in M3 to drain its per-stream peer index before the underlying Sources go away — closes the 'subscribers fan out into a closed channel' race the design's §6 error matrix calls out as 'Publisher disconnects / FFmpeg exits'. Single consumer by design (one subsystem, one handler). Calling SetTeardownHook again replaces the previous callback; nil detaches. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| ffmigrate | ||
| import | ||
| webrtc | ||
| version.go | ||