|
|
|
@ -45,6 +45,7 @@ internal class CallVideoPlayer(private val id: Long, private val failure: (Strin |
|
|
|
if (next.detach != null && output?.surface !== next.detach) continue |
|
|
|
if (next.detach != null && output?.surface !== next.detach) continue |
|
|
|
close(); output?.release?.invoke(); output = next; surface = next.surface |
|
|
|
close(); output?.release?.invoke(); output = next; surface = next.surface |
|
|
|
pending = null; displayed.value = null; CallVideoNative.requestKey(id) |
|
|
|
pending = null; displayed.value = null; CallVideoNative.requestKey(id) |
|
|
|
|
|
|
|
LogManager.addLog("INFO", "call", "video output attached=${surface != null} call=$id") |
|
|
|
} |
|
|
|
} |
|
|
|
val valid = NativeLib.callAudioClock(id, now / 1000, clock) && clock[5] != 0L |
|
|
|
val valid = NativeLib.callAudioClock(id, now / 1000, clock) && clock[5] != 0L |
|
|
|
if (valid && sourceEpoch != clock[1]) { |
|
|
|
if (valid && sourceEpoch != clock[1]) { |
|
|
|
@ -55,7 +56,10 @@ internal class CallVideoPlayer(private val id: Long, private val failure: (Strin |
|
|
|
if (held >= 0 && valid && heldPts <= clock[4]) { |
|
|
|
if (held >= 0 && valid && heldPts <= clock[4]) { |
|
|
|
val render = heldPts >= clock[4] - 500_000 |
|
|
|
val render = heldPts >= clock[4] - 500_000 |
|
|
|
decoder!!.releaseOutputBuffer(held, render); held = -1 |
|
|
|
decoder!!.releaseOutputBuffer(held, render); held = -1 |
|
|
|
if (render) { displayed.value = format; lastRendered = now } |
|
|
|
if (render) { |
|
|
|
|
|
|
|
if (displayed.value != format) LogManager.addLog("INFO", "call", "video visible call=$id format=$format") |
|
|
|
|
|
|
|
displayed.value = format; lastRendered = now |
|
|
|
|
|
|
|
} |
|
|
|
lastProgress = now |
|
|
|
lastProgress = now |
|
|
|
} |
|
|
|
} |
|
|
|
if (decoder != null && held < 0) { |
|
|
|
if (decoder != null && held < 0) { |
|
|
|
|