Skip to content

webOS 3.x follow-up: gate in-place seek on the Feed ABI, guard the COW reply destructor - #581

Merged
GLinnik21 merged 1 commit into
mainfrom
followup-578
Oct 9, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
followup-578

Conversation

@GLinnik21

@GLinnik21 GLinnik21 commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #578, from its review. Nothing here changes behaviour on a set that already worked.

What changed

  • In-place seek gate (engine.rs): the rule is now a pure function, inplace_layout_known(major, feed_abi_is_cow), with a unit test. The old-ABI Feed is the primary evidence that libplayerAPIs is the pre-C++11 build whose StarfishMediaAPIs layout differs from the 4.5 one the offsets were decompiled from, so it refuses in-place seek and covers 3.9.x without listing releases. A known release below 4 is refused as well. An unknown release (os_info.json unreadable) with the C++11 Feed keeps in-place seek, as it did before webOS 3.4: resolve the two missing imports at runtime, and seek by reload on 3.x #578; webOS 3.4: resolve the two missing imports at runtime, and seek by reload on 3.x #578 had moved those sets to reload.
  • sf_feed_abi_is_cow() (src/starfish.c, starfish.h), reached through a new VideoSink::feed_abi_is_cow. It is our own C function, so the binary gains no import.
  • Reply destructor guard: the COW string destructor is only called for a non-NULL reply pointer; it reads the rep header just below that pointer.
  • feed abi: log line: says cow whenever the old name resolved, even if _ZNSsD1Ev did not (it used to say cxx11 there). cow … dtor=(nil) now reads as what it is: every reply leaks.
  • Comment fix: the Feed comment said the C++11 mangling starts at 3.9.2; 3.9.2 is still the old ABI.
  • fw-compat-reviewer.md: no longer says the five oldest images fail permanently on two symbols that webOS 3.4: resolve the two missing imports at runtime, and seek by reload on 3.x #578 turned into runtime lookups.

Verification

  • make check on the committed tree: every test result: line ok, 0 failed (media crate: 1188 passed; 0 failed), layer and static gates green.
  • New test: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1113 filtered out.
  • cargo +nightly check --lib --no-default-features: clean.
  • ARM cross-build: links; nm -D pkg/plxnative shows no Feed, SDL_webOSCursorVisibility or _ZNSsD1Ev import.
  • Device (webOS 4.10.2, this build deployed to the debug install): pipe_seek_inplace and pipe_seek_mp4 both PASS 9/9 (2 passed, 0 failed of 2); the log reads feed abi: cxx11 … dtor=(nil) and in-place seek: … sendSegment=1, and the crash log has no record.

The old-ABI path itself cannot be exercised on the 4.x dev set.

🤖 Generated with Claude Code

…W reply destructor

- starfish.c: correct the Feed mangling comment (3.9.2 is still the COW ABI; cxx11 starts
  with the 4.x inventories); track the resolved ABI in g_feed_cow instead of inferring it
  from the destructor pointer, so the `feed abi:` line says cow even without _ZNSsD1Ev.
- sf_feed: run the reply destructor only for a non-NULL reply pointer.
- New sf_feed_abi_is_cow() accessor, bound through VideoSink::feed_abi_is_cow (ffi.rs,
  ffi_host.rs stub, NoSink).
- engine.rs: inplace_layout_known(major, feed_abi_is_cow) is the in-place seek gate: the
  old-ABI Feed refuses it (covers 3.9.x), a known release below 4 too, an unknown release
  with the C++11 Feed keeps it. Unit test added.
- fw-compat-reviewer.md: the oldest images no longer fail on the two symbols #578 made
  runtime lookups; re-run the matrix for what they print.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 38c07fc into main Oct 9, 2026
18 checks passed
@GLinnik21
GLinnik21 deleted the followup-578 branch October 9, 2026 16:19
GLinnik21 pushed a commit that referenced this pull request Oct 25, 2026
On webOS 3.x every direct-play seek was a full reload: the old C++ ABI rules out the private `Segment` offsets (#578, #581), and the public `Seek` had never been tried on that ABI. `Seek` (`_ZN17StarfishMediaAPIs4SeekEPKc`) takes a `const char*`, so its symbol and calling convention are the same on the COW and cxx11 ABIs, and on a 3.9.3 set (OLED55B7V-Z) it works: 80 seeks through it all returned 1, with no downgrade, stuck-seek retry, reload, BufferFull or "Playing error", and playback ran 101-197 s past single seeks, beyond the ~48 s where a wrongly anchored segment would stall.

- `select_seek_mode` picks `NativeSeek` for an old-ABI library on the ACB plane when the set reports release 3 (`old_abi_seek_tested`, `major == 3`). Every other mode is unchanged: webOS 5+ `NativeSeek`, known-layout 4.x `Segment`, other unknown-layout releases and `VP_NONE` `Reload`.
- The nets webOS 5+ already has apply: a refused `Seek` drops the playback to `Reload` (`native_seek_refused`), and a seek that does not anchor within `SEEK_STUCK_MS` is retried, then reloaded. A seek at a speed other than 1x still reloads in every mode.
- `each_firmware_gets_its_seek_mode` covers every row; a new test checks that a refused `Seek` on webOS 3 stays on `Reload` across the reload and that a fresh play clears it.
- Docs: the `SeekMode`/`select_seek_mode` comments, the player's CLAUDE.md, the README's webOS 3.x row and `docs/webos5-port.md`'s "The public `Seek`".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant