Files
baji-vc/docs/PLAYBACK_CLOCK_FIX_073.md
T

142 lines
9.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Android 0.7.3 action video clock repair
Baseline clean/pushed: `9cebf4f3d3013666aa438b92bf6b017234fc84aa`.
This fixes a failure established by the user's new code20 report, not the earlier
report-less code19 speculation. Existing white-outfit assets remain frozen.
## Device evidence and confirmed cause
One report was received2026-10-13 12:04:11.722 Asia/Shanghai, generated12:04:08.136,
version0.7.2/code20/API31, mode`offline_preview`, exact index
`987e125a7d7a2cde99121b5f5246c82f4dbe36c4899d3d49eaffd1a68bafb887`.
Only version/mode/pin and fixed diagnostic enums/numbers were extracted. No user
conversation, audio, pictures, face/landmark data, keys or raw report is archived.
- First local asset_01 attempt: native start12:03:48.475, output texture timestamp0
accepted12:03:48.638, native rendering info12:03:48.642. At12:03:48.718, elapsed249ms,
native position26ms, output timestamp47,741,893,941us was rejected as
`timestamp_not_indexed`; displayed-layer alpha was1. Stop/release followed.
- Second attempt: native start12:03:57.516, rendering info12:03:57.654, rejection
12:03:57.674 atelapsed160ms with output timestamp47,742,026,182us. Then release.
Layer alpha was0 because the timestamp had not been accepted as a first frame.
- No native-error or user/background/new-turn cancellation initiated these two
stops in the recorded sequence. This establishes the local-player failure; it
does not establish a normal WS/model/plan episode on that phone.
Code20 `AndroidMusicPort.latched` divided the MediaPlayer/TextureView timestamp by
1000 and demanded it match a0–10s source PTS within2us. TextureView's producer
presentation timestamp is not a decoded source-frame identity. This phone's
output value is outside the clip timeline, so the app itself killed playback.
The earlier0 update also cannot prove an actual decoded sourceframe0. Precise
vendor output-clock origin is not established and is not inferred from these
numbers. The source video/asset bytes are valid and unchanged.
Offline mouth metadata did reach levels1–4 with opacity1. These are synthetic
intent/draw callbacks, not evidence of normal AudioTrack mouth gating or human
mouth visibility; mouth amplitude is not changed.
## Minimal repair and retained gates
`AndroidMusicPort` now reuses the existing `ContinuousBodyRenderer` for ACTION
video. Its only new decoding option selects the single H264 video track from the
reviewed H264+AAC container. Conversation/bridge track validation stays unchanged.
The body-only ACTION renderer uploads one transparent texture, uses no registered
mouth layers, preserves white Fit layout, and never loops. Manifest fpsN/fpsD are
passed through, not inferred from an output-clock offset. No schema relaxation or
neutral-mouth reuse is introduced.
The controlled decoder validates each output's real source PTS, latches its own
input SurfaceTexture and composites/swaps the corresponding frame. Frame0 is
prepared and held before ready/audio start; then the legal conversation source
exit, ACTION ownership and first-frame reveal proceed. Output TextureView updates
may be skipped, zero, stale or use another clock: they are sampled diagnostics,
never source indices or completion proofs. No affine mapping from arbitrary
output timestamps or MediaPlayer.currentPosition is used to choose frame/anchor.
Actual bad codec PTS, a missing source entry/final frame, decode/GLES failure and
native audio error remain failures. Existing source-codec rounding tolerance is
retained. Layer/epoch ownership and all stale callback fences remain in force.
MediaPlayer has no video surface and supplies the original container's audio.
It starts only after the real held sourceframe0 and native audio preparation.
Completion needs the actual final source frame plus renderer end, native audio
completion, minimum duration corroboration and actual audio+codec/GLES resource
release. The driver then decodes/presents reviewed return neutralframe96/4s/A
before emitting completed. Early native audio end fails (50ms bounded EOS rounding
allowance, not a timer-generated completion); absent audio completion after video
end fails after the bounded watchdog. Normal record-stop/after-once/new-turn,
settings/background/disconnect cancellation remain the existing protocol.
This changes only Android playback. No gateway/provider/time/TTS/model update or
restart, no asset import/generation and no paid/LLM/ASR/TTS inference call. The
old pin and every3222 runtime file must match code20/19/18. New black-outfit assets
are independent and are not read or imported. Owner batch cap is200 cumulative,
not an additional200; existing recorded21 calls/known video$4.16 and unknown
image/rate fees are unchanged by this work.
## Validation and limitations
Production adapter tests replay the exact two reported output timestamps, zero /
nonzero first output, ignored native rendering info,1us source rounding, invalid
source-codec timebase, missing source entry/final frame, actual audio end, cancel
and late callbacks. Full241-frame cases use source decoder/renderer callbacks;
output timestamps cannot manufacture frames or completion. Existing View ownership,
legal routes, bridge TALK, idle rotation, capture-stop, after-once and stale-turn
regressions remain required. All native codec/EGL/audio ports in host tests are
doubles; current code21 Android/GPU/speaker/recording and listening are **not_run**.
Instrumentation is compile-only. A/V synchronization of the newly separated
native paths needs phone verification; video may hold its true last frame while
waiting for real audio end or release. No perception or playback SLA is claimed.
Use existing settings→离线播放检查→舞蹈01/02 and explicit report after device
verification. Normal WS action shares the same repaired adapter, but the report
above is local/offline, so a normal-plan success is not claimed. Code20 diagnostic
and previous rollback APKs remain intact. Release0.7.3/code21 must use the same
certificate, arm64/min26/target34, frozen pin, occupied-version guards, exact
packaged file bytes and verified HTTP APK/checksum bodies. Results follow after
publication.
Prepublication checks completed: nine JVM/UI entry points;31 packaging tests
(26 publisher tests plus5 repair/diagnostic tests);200 offline software GLES
goldens over the five frozen bodies;97 gateway tests passed and one existing
Silero artifact skip. Production Android callback doubles passed757 reported-clock
assertions and103 native/offline assertions, with the existing1288 View/media,
289 bridge TALK,27 idle and17 full-graph assertion groups retained. Android app
and instrumentation APK compilation passed; instrumentation execution not_run.
Gateway source stage was tests-only (`applied=false`), with no deployment/restart.
## Published candidate
- APK0.7.3/code21, package`com.gorios.lanvoice`, arm64-v8a, min26/target34.
- URL: http://192.168.31.124:8080/lan-voice-v073-playback-clock-fix-code21-arm64-debug.apk
- SHA256:`505e0d70c2ec7ba39316059d49b1d4704e9e05b911ee5df5a3036fd652f61785`.
Matching`.apk.sha256` and both HTTP bodies independently verified.
- Same certificate:`b9608336bc1ed1de3269bb4594f9fe718daaa5439511c5187aa385d2b799dcf1`.
- Built source milestone:`9ec71c7e20991651cd5dccfaa4530df0dee9c012`, pushed main.
- Production bundle gate:5 own bodies/13 edges/8 own-mouth bridges/2 actions;
exact frozen index987e125a…afb887;3222 runtime referenced files, combined
RGBA10,911,120 bytes. Full decode/file/PTS/shape/cache and Kotlin parser passed.
All3816 avatar entries (including legacy rollback resources) are byte-identical
to code20; no review/source/bak files newly packaged.
- Exact APK host replay passed production loader and View paths: happy/sad selection,
idle30s and repeated-new-turn legal returns, neutral/happy→dance241-frame layer
ownership, native audio completion/release→neutralframe96/4s/A. Stale conversation
ticks did not reclaim ACTION. Output-clock updates cannot manufacture source
frames. Tests use Android codec/EGL/audio/surface/capture-stop doubles; no sockets,
sensors, real native GPU or speaker claim.
- The APK replay test now starts repeated-turn cases at a true fresh variant entry
(`f0_loop0`); a randomly sampled late-phase variant could legitimately exit during
the next700ms, invalidating the prior test's fixed-current-package assumption.
This was a host test precondition correction, with no additional app change.
- Code21 phone installation/playback, physical visibility, audio/video synchronization,
native release latency, normal WS episode and human listening remain not_run.
Code20 report establishes the output-clock rejection, not every user symptom.
- Gateway0.8/action admission, Qwen provider, server time and TTS remain unchanged;
staged97pass/1existingSileroSkip used no deployment, restart or inference. This
step used0 generation/paid/model calls. Existing200 cumulative asset-owner budget
does not authorize this code session to generate or import the new visual.
Evidence is ignored local metadata only: `logs/action-emotion/playback-clock-fix-073/`
contains five shader reports and`publish-code21/{bundle-gate,delivery}.json`;
`logs/action-emotion/full-release/checks.json` and client/packaging test evidence
record the current source hashes. No raw device report is committed.