Adds a pair of lifecycle callbacks the app/webrtc subsystem installs via SetHooks: - OnStart fires synchronously just before ffmpeg.Start(). It receives the task config and may return []ConfigIO extras to append to the output list. When extras are appended, startProcess rebuilds the FFmpeg command and the underlying process.Process before starting. A non-nil error aborts the start. - OnStop fires synchronously just after ffmpeg.Stop() so subsystems can tear down per-process state. Hooks run with the restream write lock held; they must not call back into Restreamer methods or they will deadlock. This is the pattern app/webrtc uses to inject per-process RTP output legs without having to reach into restream internals from outside. |
||
|---|---|---|
| .. | ||
| app | ||
| fs | ||
| replace | ||
| store | ||
| restream.go | ||
| restream_test.go | ||