@@ -10,7 +10,7 @@ captured `legend.mkv` session advanced from roughly 2:52 to 3:25 and continued
1010receiving OHCodec video outputs, while successful presentation FPS stayed at
1111zero. Only the first few private-consumer callbacks/imports completed.
1212
13- The failure was not demux seekability, audio clocking, software decode
13+ The first failure was not demux seekability, audio clocking, software decode
1414throughput, ArkTS slider state, or a Vulkan color path. The asynchronous
1515OHCodec/Vulkan handshake queued frame A into its private one-buffer
1616` OH_ConsumerSurface ` and correctly returned ` DeferredUntilRedraw ` . Before the
@@ -40,6 +40,45 @@ invalidating Player's snapshot without canceling the interop's queued A.
4040- Player invokes invalidation again when generation changes during a backend
4141 call, closing the race where an old render attempt queues its producer just
4242 after seek publishes the new generation.
43+ - Stressing consecutive forward/backward seeks exposed that invalidation alone
44+ was insufficient: OHCodec can cancel a surface output during decoder flush
45+ without publishing the callback which would normally drain it. A preliminary
46+ callback-before-flush wait reproduced ` seek.error: Operation timed out ` ,
47+ proving that ordering circular.
48+ - A second diagnostic ordering which joined old native render calls before
49+ flush was also rejected on-device. Wednesday's backward seek left
50+ ` ReleaseOutputBuffer ` and ` QueueInputBuffer ` IPC calls blocked for five
51+ seconds and triggered HarmonyOS ` THREAD_BLOCK_6S ` ; the system killed the
52+ foreground process. The codec flush must be allowed to break that native
53+ dependency, not wait behind it.
54+ - The final C++ contract is a non-joining two-phase protocol. Player first
55+ publishes non-blocking invalidation, flushes the hardware decoder, publishes
56+ the completed cancellation generation, and calls
57+ ` completePendingFrameInvalidation() ` . OHCodec acquires and releases an
58+ available invalidated buffer, or clears the association known to have been
59+ cancelled by the synchronous flush. A retired render call which returns
60+ after the first pass repeats invalidation and completion, closing the
61+ late-republish race. A later callback without an association is drained as
62+ an orphan and cannot poison the next exact frame.
63+ - The remaining freeze was a callback lock cycle. OHOS can invoke the private
64+ Surface callback before ` OH_VideoDecoder_RenderOutputBuffer() ` returns. The
65+ adapter and mobile selector used to reacquire renderer-state locks which the
66+ render thread still held around that native call; the callback waited for the
67+ render thread while the next producer operation waited for callback return.
68+ Redraw forwarding now uses a separate event lock and atomically published
69+ active renderer API/generation, so it never enters those state locks.
70+ - An early callback and the producer-return path also used to schedule two
71+ redraws for the same exactly-once OHCodec output. The second present was a
72+ successful no-op and could never produce the callback needed to continue.
73+ Interop now records callbacks while the producer call is in flight and emits
74+ exactly one redraw after it returns. Orphan acquisition remains on the Vulkan
75+ render thread because a callback may precede the buffer becoming acquirable.
76+ - ` Player::seek() ` now accepts the latest request during asynchronous input
77+ opening without changing the interrupt epoch which protects that open. The
78+ request is clamped and executed after metadata is available, and its callback
79+ receives failure if opening cannot complete. The OHOS Demo forwards the
80+ request to this core contract instead of rejecting it from a stale ArkTS
81+ ` seekable ` snapshot.
4382
4483There is no per-frame GPU wait, decoded-source map, software transfer, staging
4584copy, upload, decoder fallback, or ArkTS/caller-owned retry-frame state. GPU
@@ -59,6 +98,22 @@ submissions already in flight retain their existing timeline-based lifetime.
5998- The OHOS player native library linked and the signed debug HAP packaged at
6099 ` modern/examples/ohos/player-hap/entry/build/default/outputs/default/entry-default-signed.hap ` .
61100
62- The HAP was not installed or launched in this repair turn. Connected-device
63- replay with local ` legend.mkv ` and ` wednesday.mp4 ` remains gated on explicit
64- installation approval.
101+ The final signed HAP was overwrite-installed on the connected ALN-AL80. Both
102+ document-picker cold starts omitted the former ` 当前媒体不可定位 ` toast, and
103+ both processes survived the complete matrix:
104+
105+ | Media / cell | Position | FPS | Hardware decoded | Presented | Native release/callback |
106+ | ---| ---:| ---:| ---:| ---:| ---:|
107+ | ` legend.mkv ` cold | 0:10 / 45:44 | 25.1 | 257 | 254 | 255/255 |
108+ | ` legend.mkv ` forward | 30:15 / 45:44 | 25.1 | 769 | 766 | 767/767 |
109+ | ` legend.mkv ` backward | 6:05 / 45:44 | 25.0 | 1,312 | 1,307 | 1,308/1,308 |
110+ | ` wednesday.mp4 ` cold | 0:10 / 59:28 | 24.1 | 244 | 239 | 240/240 |
111+ | ` wednesday.mp4 ` forward | 39:15 / 59:28 | 24.1 | 787 | 782 | 783/783 |
112+ | ` wednesday.mp4 ` backward | 7:49 / 59:28 | 24.0 | 1,254 | 1,247 | 1,249/1,249 |
113+
114+ An additional Wednesday stress run completed eight forward/backward pairs.
115+ After the last seek it remained Loaded at 24.1 FPS; hardware decode/presentation
116+ rose from 2,163/2,113 to 2,354/2,304 during the next five seconds, native
117+ release and callback stayed balanced at 2,311/2,311, and Player drops remained
118+ two. The final process emitted no seek timeout, media error, ` THREAD_BLOCK ` , or
119+ crash evidence.
0 commit comments