0.123.1: log each buffering event with time since the last seek and the stall count (counts only)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -279,7 +279,12 @@ internal fun EmbyPlaybackDialog(session: EmbySampleSession, plan: EmbyPlaybackPl
|
||||
}
|
||||
override fun onPlaybackStateChanged(state: Int) {
|
||||
// A stall is buffering that nobody asked for: refilling after a seek (tuning in, Catch Up, skipping) isn't one.
|
||||
if (state == Player.STATE_BUFFERING && ready && SystemClock.elapsedRealtime() - PlaybackHealth.seekedAt > PlaybackHealth.SEEK_SETTLE_MS) PlaybackHealth.stalls++
|
||||
if (state == Player.STATE_BUFFERING && ready) {
|
||||
val sinceSeek = SystemClock.elapsedRealtime() - PlaybackHealth.seekedAt
|
||||
if (sinceSeek > PlaybackHealth.SEEK_SETTLE_MS) PlaybackHealth.stalls++
|
||||
// Counts only, for checking on the TV (adb logcat -s OrbitPlayer): no titles.
|
||||
android.util.Log.i("OrbitPlayer", "buffering channel=${scheduled?.channel?.number} afterSeekMs=$sinceSeek stalls=${PlaybackHealth.stalls}")
|
||||
}
|
||||
PlaybackHealth.playing = state == Player.STATE_READY || state == Player.STATE_BUFFERING
|
||||
buffering = state == Player.STATE_BUFFERING
|
||||
if (state == Player.STATE_ENDED && scheduled != null) onEndedEarly?.invoke()
|
||||
|
||||
Reference in New Issue
Block a user