Implement positioned movie playback opcode
This commit is contained in:
@@ -1109,7 +1109,7 @@ The surface object's +0x414 member is IMediaPosition. Its vtable +0x28 entry is
|
||||
- **depends on:** 0x236, 0x23f
|
||||
- **evidence:** Ghidra /v2: op_0x241_play_movie_to_surface_at_position@0x4247e0 uses the same 0x478-byte movie-to-texture object, destination render-target check, packed asset open, sound-route/volume path, and movie_play_configure worker as op 0x236. Between open and configure it calls movie+0x414 IMediaPosition vtable+0x20 put_CurrentPosition with operand5/1000.0; operand4 is then passed unchanged as the start delay. Corpus: sole site CALLBACK_LOAD@0x189 receives the layer resource, surface and flags from globals 0x3276/0x3239/0x328a, delay 0, and global 0x329e[layer]-1. The ordinary ADV creation path writes op 0x23f stop_time_ms into 0x329e immediately after op 0x236.
|
||||
|
||||
The seek is applied through IMediaPosition::put_CurrentPosition before movie_play_configure records the flags and start delay. CALLBACK_LOAD does not restore a separately sampled live playback cursor: the ADV setup path stores opcode 0x23f's stop time in global array 0x329e, and load passes stop_time_ms-1. The shipped use therefore reconstructs the movie layer at its terminal frame after a numbered load. The portable FFmpeg seam currently has no initial-position parameter; implementation requires a pre-play seek with keyframe-preroll discard and matching audio positioning, then can reuse the existing 0x236 surface binding, routing, completion, and delayed-start lifecycle.
|
||||
The seek is applied through IMediaPosition::put_CurrentPosition before movie_play_configure records the flags and start delay. CALLBACK_LOAD does not restore a separately sampled live playback cursor: the ADV setup path stores opcode 0x23f's stop time in global array 0x329e, and load passes stop_time_ms-1. The shipped use therefore reconstructs the movie layer at its terminal frame after a numbered load. Port status (2026-07-29): implemented through the existing 0x236 surface binding, routing, and completion lifecycle. FFmpeg ABI v3 seeks its independent video and audio demuxers before worker start; managed preroll selects the video frame active at the requested position (retaining the last frame at stop_time_ms-1), trims audio to the same point, and rebases both remaining timelines to playback time zero. Negative positions clamp to zero and positions at or beyond the graph stop clamp to stop_time_ms-1.
|
||||
|
||||
### 0x242 `set-object-animation-detached` (set-object-animation-detached, argc 2)
|
||||
- **summary:** Replace the retained object's animation-control word at obj+0x2d0. Bit 0 detaches finite one-shot channels from blocking presentation and protects them from 0x243 forced completion until they finish naturally.
|
||||
|
||||
Reference in New Issue
Block a user