feat(libSceNKWebKit): implement media sample flags and JSON #22937

Closed
davidreuveni wants to merge 1 commit from upstream-pr/22937 into main
davidreuveni commented 2026-11-18 13:57:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by davidreuveni on 2026-11-18T13:57:59Z.


What

Implement WebCore::MediaSample::hasAlpha, isNonDisplaying, isSync, toJSONString, and WTF::MediaTime::toJSONString from Sony’s published PS5 11.00–11.60 WebKit source. Preserve the upstream license notices and document the unverified console ABI. Sony’s WebKit source archive

PR #21957 covers separate exports and edits the same technical-debt entry. If both PRs are selected for a combined build, their debt fragments need to be reconciled before folding.

Tested

Linux x86-64 with GCC 14.2. Built the patched libSceNKWebKit.prx and verified all five NIDs. The NKWebKit suite and public-header audit passed 137 checks before rebasing. All five focused checks and the conventions check passed on the submitted commit. Behavioral tests cover flag bits, JSON field order, timestamp variants, non-finite values, and missing callbacks. Console testing remains pending.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5377380880 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22937). Originally posted by [davidreuveni](https://github.com/davidreuveni) on 2026-11-18T13:57:59Z. --- ### What Implement `WebCore::MediaSample::hasAlpha`, `isNonDisplaying`, `isSync`, `toJSONString`, and `WTF::MediaTime::toJSONString` from Sony’s published PS5 11.00–11.60 WebKit source. Preserve the upstream license notices and document the unverified console ABI. [Sony’s WebKit source archive](https://www.playstation.com/en-us/oss/ps5/webkit/) PR #21957 covers separate exports and edits the same technical-debt entry. If both PRs are selected for a combined build, their debt fragments need to be reconciled before folding. ### Tested Linux x86-64 with GCC 14.2. Built the patched `libSceNKWebKit.prx` and verified all five NIDs. The NKWebKit suite and public-header audit passed 137 checks before rebasing. All five focused checks and the conventions check passed on the submitted commit. Behavioral tests cover flag bits, JSON field order, timestamp variants, non-finite values, and missing callbacks. Console testing remains pending. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
PrivacyOnion commented 2026-11-18 14:04:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-18T14:04:13Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 014c842301:

  • Conventions: tools/check_conventions.py failed.
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: No notes, investigation `.md` files or images added to the repository (attach them to this PR)
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: New third-party code is a submodule built from source
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: Generic behaviour, not specific to one title
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: Depends on:
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: Fixes:
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: Unblocks:
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: GPUs tested:
    (pull request): error: [pr-template] Fill in the pull request template: unchecked: AI-assisted:
    (pull request): error: [pr-template] Fill in the pull request template: answer AI-assisted with yes or no
    (pull request): error: [pr-template] Fill in the pull request template: fill Depends on with #N or none
    16 findings, 16 errors; GitHub shows at most 10 error annotations, the job summary lists all
    
  • Build: nkwebkit_mediasample_tests built cleanly.
  • CTest (nkwebkit_mediasample):
    1/1 Test #4546: nkwebkit_mediasample .............   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5958162764 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22937#pullrequestreview-5958162764). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-18T14:04:13Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `014c842301`: - **Conventions**: `tools/check_conventions.py` failed. ``` (pull request): error: [pr-template] Fill in the pull request template: unchecked: Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file (pull request): error: [pr-template] Fill in the pull request template: unchecked: No notes, investigation `.md` files or images added to the repository (attach them to this PR) (pull request): error: [pr-template] Fill in the pull request template: unchecked: New third-party code is a submodule built from source (pull request): error: [pr-template] Fill in the pull request template: unchecked: Generic behaviour, not specific to one title (pull request): error: [pr-template] Fill in the pull request template: unchecked: Depends on: (pull request): error: [pr-template] Fill in the pull request template: unchecked: Fixes: (pull request): error: [pr-template] Fill in the pull request template: unchecked: Unblocks: (pull request): error: [pr-template] Fill in the pull request template: unchecked: GPUs tested: (pull request): error: [pr-template] Fill in the pull request template: unchecked: AI-assisted: (pull request): error: [pr-template] Fill in the pull request template: answer AI-assisted with yes or no (pull request): error: [pr-template] Fill in the pull request template: fill Depends on with #N or none 16 findings, 16 errors; GitHub shows at most 10 error annotations, the job summary lists all ``` - **Build**: `nkwebkit_mediasample_tests` built cleanly. - **CTest** (`nkwebkit_mediasample`): ``` 1/1 Test #4546: nkwebkit_mediasample ............. Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` Requesting changes for the points above.
MarcZX10 commented 2026-11-21 08:15:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T08:15:58Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the console ABI and execution remain unverified as documented.

What I ran

Reviewed head 014c8423010e4980e97b4c3736e0c7f07a36aa78 using the prepared diff and repo_read.py for targeted source and build context. No build or tests were run. The author reports Linux x86-64 testing and focused checks in the PR description; those results were not independently verified.

Results

Check Result Note
Diff and targeted source review passed Implementation and test source read
Build and tests not run Author-reported results only
Console ABI and execution not run Documented as unverified

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • Export.cpp and InventoryExports.hpp were excluded from the review bundle because of size; their relevant diff hunks were inspected, but their complete contents were not read.
  • No programmatic checks were run, and no PS5 console ABI or execution behavior was confirmed.
  • Read changed files: Export.cpp (relevant range), InventoryExports.hpp (relevant range), LegacyExports.hpp, MediaExports.hpp, MediaSample.cpp, WtfNumberFormat.cpp, WtfTextAbi.hpp, tests/MediaSample.cpp, and docs/dev/debt/changes/feat-nkwebkit-media-sample-json.md. files.json was not available by that name; the prepared manifest and file listing were used to identify exclusions.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6004069268 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22937#pullrequestreview-6004069268). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T08:15:58Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the console ABI and execution remain unverified as documented. ## What I ran Reviewed head `014c8423010e4980e97b4c3736e0c7f07a36aa78` using the prepared diff and `repo_read.py` for targeted source and build context. No build or tests were run. The author reports Linux x86-64 testing and focused checks in the PR description; those results were not independently verified. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Implementation and test source read | | Build and tests | not run | Author-reported results only | | Console ABI and execution | not run | Documented as unverified | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified - `Export.cpp` and `InventoryExports.hpp` were excluded from the review bundle because of size; their relevant diff hunks were inspected, but their complete contents were not read. - No programmatic checks were run, and no PS5 console ABI or execution behavior was confirmed. - Read changed files: `Export.cpp` (relevant range), `InventoryExports.hpp` (relevant range), `LegacyExports.hpp`, `MediaExports.hpp`, `MediaSample.cpp`, `WtfNumberFormat.cpp`, `WtfTextAbi.hpp`, `tests/MediaSample.cpp`, and `docs/dev/debt/changes/feat-nkwebkit-media-sample-json.md`. `files.json` was not available by that name; the prepared manifest and file listing were used to identify exclusions. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 12:52:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:52:41Z.

Review: COMMENTED


Built the branch’s changed sources and ran MediaSample on Linux against the existing runtime libraries. The test run passed and covered the media-sample flags and JSON output cases.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6170176712 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22937#pullrequestreview-6170176712). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T12:52:41Z. **Review:** COMMENTED --- Built the branch’s changed sources and ran MediaSample on Linux against the existing runtime libraries. The test run passed and covered the media-sample flags and JSON output cases. AI-assisted: yes.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!22937
No description provided.