Skip to content

player: webOS 3 seeks in place through LG's public Seek - #1038

Merged
GLinnik21 merged 3 commits into
plxnative:mainfrom
dimitrije83:native-seek-3x
Oct 25, 2026
Merged

GLinnik21 merged 3 commits into
plxnative:mainfrom
dimitrije83:native-seek-3x

Conversation

@dimitrije83

Copy link
Copy Markdown
Contributor

On webOS 3.x every direct-play seek is a full reload today. The old C++ ABI rules out the private Segment offsets (#578, #581), and the public Seek was left out because nobody had tried it on that ABI. I tried it on my 3.9.3 set, and it works: a seek becomes a cut, where it was a black screen and a fresh Load.

The change

select_seek_mode now picks NativeSeek for an old-ABI library on the ACB plane when the set reports release 3:

Before After
VP_EXPORTED (webOS 5+) NativeSeek NativeSeek
known layout, ACB (webOS 4.x) Segment Segment
layout unknown, ACB, release 3 Reload NativeSeek
layout unknown, ACB, any other release (2.x, an old-ABI 4.x build, unknown) Reload Reload
VP_NONE Reload Reload

Seek is _ZN17StarfishMediaAPIs4SeekEPKc. It takes a const char*, so its symbol and calling convention are the same on the COW and cxx11 ABIs. That it also behaves the same rests on the device test below, not on the decompile in docs/webos5-port.md, which is of 4.5. The private verbs still never run on 3.x.

The nets are the ones webOS 5+ already has:

  • a refused Seek drops the playback to Reload (native_seek_refused);
  • a seek that doesn't anchor within SEEK_STUCK_MS is retried, then reloaded.

Neither net catches a Seek that is accepted and then anchors wrong: the stale-segment stall, which shows up about 48 s later as BufferFull and "Playing error". That's why the new branch is gated to the one release that's tested (old_abi_seek_tested, major == 3) and not to every old-ABI library. A seek at a speed other than 1x still reloads in every mode.

The rest of the diff is docs and tests:

  • the SeekMode, select_seek_mode and seek_hud_regressions comments, the player's CLAUDE.md, two pump/engine comments, the README's webOS 3.x row, and a webOS 3 paragraph in docs/webos5-port.md's "The public Seek";
  • the_other_firmwares_keep_their_modes becomes each_firmware_gets_its_seek_mode and covers each row of the table above;
  • a new test checks that a refused Seek on webOS 3 keeps the playback on Reload across the reload, and that a fresh play clears it.

Tested

On an LG OLED55B7V-Z, platform release 3.9.3 (feed abi: cow), Developer Mode, debug-flavour builds with devtriggers only. There were three phases:

  1. main with no trigger: reload, as a baseline;
  2. main with plxnative-seekmode = native;
  3. this branch with no trigger. The log reads seek mode: NativeSeek (layout_known=false old_abi_seek=true) on every play.

Results:

  • 80 seeks through Seek: 53 forced by the trigger on main, 27 chosen by this branch. Every Seek returned 1. No downgrade, no stuck-seek retry, no reload, no BufferFull, no Playing error.
  • Files: an MP4 (H.264 1080p, AAC 5.1); an MKV (4K HDR10 HEVC Main 10, E-AC-3 Atmos); an MKV (1080p HEVC, E-AC-3, with its embedded SRT subtitles on).
  • Kinds of seek: forward and backward scrubs, several quick taps then OK, a seek from pause (OK commits and plays on, as designed), and seeks with the scrub preview stills showing.
  • Long play after a seek: playback ran on for 197 s, 158 s and 101 s after single seeks, well past the ~48 s where a wrongly anchored segment would have stalled.
  • Subtitles stayed in step after each seek. One OpenSubtitles download that the server picked was out of step from the start, before any seek, and lined up once I switched to the embedded track. That's the file, not the seek.
  • HDR: the TV's HDR banner showed when the 4K film started and didn't come back after any seek. A reload re-shows it on every seek, so the TV didn't leave HDR. I didn't check the picture mode beyond that.
  • Time from the scrub commit to playback moving again, counted in the event log's once-a-second loop= lines, so ±1 s: reload 3–4 s, Seek 1–3 s, most often 1 (9 reload seeks against the same file).
    • A reload tears down (~140–200 ms), Loads (60–80 ms), reopens the file (110–170 ms) and primes from scratch, with the picture black throughout.
    • With Seek the last frame stays on screen until the new one arrives, and only the demuxer's reopen-and-seek and the prime remain.
  • At 1.5x, seeks reload as before, and the speed session's PCM check still passes (speed: pipeline audio audio/x-raw 48 kHz x2 -> ok).

make check-cargo passes (20,050 tests, 0 failed, clippy clean). In the full make check, tools/test_tv_sched_trace.py's test_bad_arguments fails on this Mac (Python 3.15). It fails the same way on a clean checkout of main, and nothing in this diff touches it. ci/test_build_gc.py failed once while another process was using .git and passes on its own.

Only 3.9.3 is tested. Other 3.x releases (3.4 included) also report release 3, so they get Seek too, with the refusal and stuck-seek nets. A report from one of them would be welcome.

dimitrije83 and others added 3 commits October 25, 2026 19:16
The old-ABI libraries reloaded on every direct-play seek: the private
Segment offsets are from a 4.5 binary and are not used there, and the
public Seek had not been tried on that ABI. Seek takes a const char*, so
its symbol and calling convention are the same on the COW and cxx11
ABIs.

select_seek_mode now picks NativeSeek for an old-ABI library on the ACB
plane when the set reports release 3 (old_abi_seek_tested). A refused
Seek still drops the playback to Reload, and a seek that does not anchor
within SEEK_STUCK_MS is retried, then reloaded. Neither catches a Seek
that is accepted and then anchors wrong, so other old-ABI releases
(webOS 2, an old-ABI 4.x build, an unknown release) keep reloading, as
does VP_NONE. A speed other than 1x still reloads in every mode.

Device check, OLED55B7V-Z (3.9.3, COW Feed): 80 seeks through Seek (53
forced with the plxnative-seekmode trigger on main, 27 chosen by this
branch) over MP4 H.264, MKV 4K HDR10 HEVC with E-AC-3 Atmos, and MKV
HEVC with SRT subtitles on; every Seek accepted and anchored, no stall or fallback,
playback running on for up to 197 s after a seek. From the commit to
playback moving again: reload 3-4 s with a black screen, Seek 1-3 s
with the last frame held.

Signed-off-by: Dimitrije Juras <[email protected]>
… pump Reload comment

- engine.rs (native_seek_tests): the "inplace_layout_known + old_abi_seek_tested ->
  select_seek_mode" composition was written out in a closure and again inline; one
  `mode_for(major, cow, window_mode)` helper now serves both, so the tests compose the
  facts in one place, as `start_bufferfeed_inner` does.
- pump.rs: the `Reload` comment named only "no video plane" as a way a session lands on
  reload-per-seek; webOS 2, an old-ABI 4.x build and an unknown release also reload
  (`select_seek_mode`), so it now says so.

Behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 36af659 into plxnative:main Oct 25, 2026
13 checks passed
@GLinnik21

Copy link
Copy Markdown
Collaborator

Thanks @dimitrije83, 80 seeks on a real 3.9.3 set is exactly the evidence this needed. Merged.

Two small things I pushed before merging: the seek-mode tests share one mode_for(major, cow, window_mode) helper instead of a closure plus an inline copy, and the comment on the pump's Reload branch now names every way a playback ends up there (no plane, or an unknown-layout library Seek isn't tested on). No behaviour change, and main merged in clean.

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.

2 participants