Repository navigation
webOS 3.4: resolve the two missing imports at runtime, and seek by reload on 3.x - #578
Merged
Merged
Conversation
webOS 3.4.0 ships SDL 2.0.3 without LG's SDL_webOS* extensions, and its libplayerAPIs exports StarfishMediaAPIs::Feed only under the pre-C++11 string ABI. Both were strong references bound lazily through the PLT, so the app started but died on the first D-pad press and the first Feed. hide_cursor now dlsyms SDL_webOSCursorVisibility and skips it when absent. sf_feed resolves the cxx11 Feed first, falls back to the COW-string name, and releases the COW reply through the firmware's own _ZNSsD1Ev. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: selfhealer-png <[email protected]>
In-place seek reaches the pipeline through offsets decompiled from a webOS 4.5 libplayerAPIs (StarfishMediaAPIs::player at +0x4c, pipeline at +0x04, ptsToDecode at +0x28). 3.4.0's library is a different build with the pre-C++11 string ABI, and the first fast-forward on a 3.4.0 set crashed through them. Arm INPLACE_SEEK_OK only on a known release >= 4, so 3.x (and an unreadable os_info) take the layout-free reload path, as webOS 5+ already does. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: selfhealer-png <[email protected]>
README, the install guide and troubleshooting name the tested 3.4.3 set beside the 4.0 floor, and the known-issues table records the reload-only seek on 3.x. fwcompat.py's note on the oldest releases and the dated research notes in webos5-port.md / distribution.md say the Feed mangling and SDL cursor imports are now resolved at runtime. The webosbrew catalogue bound stays '>=4.0'. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: selfhealer-png <[email protected]>
Collaborator
|
Finally! Thank you! |
GLinnik21
added a commit
that referenced
this pull request
Oct 9, 2026
…W reply destructor (#581) - 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: Gleb Linnik <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Collaborator
|
@selfhealer-png how's the performance? |
This was referenced Oct 12, 2026
Closed
GLinnik21
added a commit
to chriskoperdraad-tech/plx-native
that referenced
this pull request
Oct 14, 2026
…store, test the hide/show bookkeeping, fix stale docs hide_cursor now takes its function table through hide_through/show_through, so the host can grade the bookkeeping with fake extern "C" functions: the transparent cursor is installed, the previous (or default) cursor is the one motion restores, a second hide keeps it, and LG's extension door is called with 0. When SDL_GetCursor and SDL_GetDefaultCursor both answer NULL nothing is saved to restore, so the swap is skipped instead of leaving the pointer invisible for good. The idle-hide hint decision is a pure function, and a seam-order test pins that it is set before SDL_Init. note_global_press, docs/remote-keys.md and Pointer::cur_hidden said hide_cursor names a webOS-only symbol that fails a host test at ld; since plxnative#578 it resolves through dlsym, and the hider may be a transparent SDL cursor rather than LG's. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
GLinnik21
pushed a commit
that referenced
this pull request
Oct 14, 2026
… s idle (#655) Fixes #642. The system SDL on webOS 3.x is 2.0.4 and exports no SDL_webOS* symbols, so since #578 the runtime lookup of SDL_webOSCursorVisibility returned nothing and every hide_cursor() was a no-op: the pointer stayed on screen, over video too, until LG's SDL hid it itself after about five minutes of stillness. Without LG's extension, hide_cursor() now swaps SDL's cursor for a transparent one instead of switching it off (SDL_ShowCursor(DISABLE) also stops pointer motion reaching the app), and the cursor is restored on the next SDL_MOUSEMOTION. The SDL_WEBOS_CURSOR_SLEEP_TIME hint is set to 5000 ms before SDL_Init, only where SDL_webOSCursorVisibility is absent, so a still pointer hides after about five seconds as in LG's other apps. On webOS 4+ nothing changes: the extension resolves there and the hint is not set. The cursor swap goes through a function table so host tests drive it with fake SDL functions: swap and restore, the default-cursor fallback, double hide, nothing to restore, the LG door and the hint decision, plus a seam-order test that the hint is set before SDL_Init. Stale prose about hide_cursor naming a webOS-only symbol is corrected. Verified on a webOS 3.9.3 set by the contributor. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Oct 22, 2026
* Release notes and audit for v0.9.0 Action-required evaluation (README trigger list, read from the PRs, grep not run on a built tree): no hits that need a reader action. Launch links (#853) add an inbound surface (any app that can launch apps), stated in What's new; the 3.4 image cache writes to /media/developer/temp (#667); crash/error reports gain fixed-value fields with POLICY_VERSION unchanged (#632), stated under Changed; Watchlist and PMS notifications use hosts the app already reaches. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Release notes v0.9.0: coverage and accuracy pass Note: correct the Collections surfaces (no TYPE menu; collection shelf headings live on Home and a library's Recommended page), the Watchlist hold-menu rows, the launch-link sign-in behaviour and platform-release numbering, the notification-feed sentence and the per-profile settings list (no stale "nine"). Add #832, #808, #750/#762, #709 (#628), #641, #647, #793, #871, #877 (#679), #876 and the key-press frame work; credit RichiL10 and Shakil Choudhury. #862 moves from Known issues to the webOS 3.x lines as fixed by #578; the 3.9.3 source-build report (#700) is kept in Compatibility. Compatibility links reports, not reporters' profiles. Audit: #862 provenance (attributed usage-report reading, no counts), contributor list wording. Action-required section: not owed. The README grep over v0.8.0..origin/main (rust-modules/src src ci) hits only CI tooling, test-only loopback listeners and fixture tokens, and the dev-only /tmp/plxnative-trackmemory trigger; the audit's PR-by-PR reading in "Deliberately not done" stands. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Release audit v0.9.0: name the toolchain by its pin file, not its version Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
webOS 3.4: resolve the two missing imports at runtime, and seek by reload on 3.x
Tested on a 2016 LG set, webOS TV Lite 3.4.3 (
dreadlocks-digya, boardM16_DVB, firmware05.70.45), installed through Developer Mode. Before this change, v0.8.0 signed in and browsed, then
died on the first D-pad press and on the first video frame. With it, direct play (1080p H.264 +
E-AC-3), HLS transcodes, subtitles, seeking and search all work on that set.
What was wrong
Graded against the webosbrew firmware inventory (3.4.0 =
05.60.30.01-W16N, the same platformline), the v0.8.0
plxnativebinary had exactly two unresolved strong imports, and so did 3.9.2:SDL_webOSCursorVisibilitySDL_webOS*extensionshide_cursor(), i.e. the first D-pad press_ZN17StarfishMediaAPIs4FeedB5cxx11EPKclibplayerAPIspredates the C++11 string ABI; it exports_ZN17StarfishMediaAPIs4FeedEPKcsf_feed()Both are lazily bound PLT slots, so the loader accepted the binary and the process died on first
call, which is why the set looked almost-working. Every other Starfish/ACB symbol
src/starfish.cnames is present on 3.4.0, except the already-optional
AcbAPI_setMediaAudioData.Separately, the first fast-forward then crashed inside the in-place seek (
SIGSEGV addr=0x43c,immediately after
seek: in-place stuck → retry reopen). That path dereferencesStarfishMediaAPIs::playerat+0x4c,AbstractPlayer::pipelineat+0x04andptsToDecodeat+0x28, all decompiled from a 4.5 binary, and the pre-cxx11 3.4 build is adifferent object.
The change
rust-modules/src/app/boot.rs:hide_cursorresolvesSDL_webOSCursorVisibilityoncethrough
dynlib::Handle::self_handle()and skips it when absent. Theexternblock inapp/mod.rsis removed.src/starfish.c:Feedisdlsym'd, cxx11 name first, then the COW name. On the COWpath the reply is released through the firmware's own
_ZNSsD1Ev(present in 3.4.0'slibstdc++.so.6.0.19), since that string's buffer is a refcounted heap rep. The sret slotstarts with the char pointer in both ABIs, so the reply reads the same. A
feed abi:linelogs which one was taken.
media/src/player/engine.rs:INPLACE_SEEK_OKis armed only on a known release withmajor >= 4, beside the existingVP_EXPORTED(5+) exclusion. 3.x takes the layout-freereload path. Behaviour change to note: an unreadable
os_info.json(major == 0) now alsotakes reload instead of in-place. I chose the slower-but-safe default; happy to flip it if
you'd rather keep the old behaviour there.
floor, and a known-issues row records reload-only seeks on 3.x.
tools/fwcompat.py'scomment and the dated notes in
docs/webos5-port.md/docs/distribution.mdno longer say theFeed mangling blocks the old releases.
docs/webosbrew-package.ymlis untouched (>=4.0)and so is
site/; widening the catalogue bound on one set's evidence felt like your call.On 4.x and later nothing should change at runtime: the cursor call and the cxx11
Feedresolveto the same functions they linked to before, and the seek gate is unchanged for
major >= 4.Evidence from the 3.4.3 set (event log, debug build from this branch)
And the in-place crash, from the build before the seek gate:
No crash records since. CI on my fork passes every job (host lint, both unit suites, Python/C
gates, harness tests, cross-build): https://github.com/selfhealer-png/plx-native/actions
Possibly related
#249 (2018 sets reporting platform release 3.9.3, where video never starts): 3.9.2 lacks the same
cxx11
Feed, so those sets may have been dying at the first Feed. I can't test that, but I'd becurious whether this change helps.
Not covered here
Separate PRs, if you want them: reopening a direct-play transfer the server cuts mid-body (rc=56
after a paused stream; not 3.x-specific), and a "Press OK to type" hint on the Search field.
This work was done with Claude Code (Anthropic) and tested by me on the TV. The commits carry a
Co-Authored-Bytrailer accordingly.🤖 Generated with Claude Code