Retain the video engine in the call service before starting its workers

This commit is contained in:
evgeny committed 2026-10-29 13:34:24 +01:00
1 parent fba07e893f
commit 2320aa4f71
2 files changed
+2

No files matched your search

@@ -275,6 +275,7 @@ class CallService : Service() {
check(audio.start(id)) { "audio engine rejected start" }
operation = "video"
video = CallVideoEngine(this, id)
video!!.start()
LogManager.addLog("INFO", "CallService", "audio/video started id=$id")
return true
} catch (e: Exception) {
@@ -51,6 +51,7 @@ class CallVideoEngine(context: Context, val id: Long) {
var stopped = false; var stops = 0
val state = MutableStateFlow(CallVideoState())
val display = MutableStateFlow<Any?>(null)
fun start() { check("start" !in failures) { "video startup unavailable" } }
fun select(settings: CallVideoSettings) { state.value = CallVideoState(settings) }
fun stop(): Boolean {
stops++