libSceContentExport: the export session calls are stubs (Cult of the Lamb imports three); session implementation ready #3374

Closed
opened 2026-10-11 09:23:48 +00:00 by screamm · 3 comments
screamm commented 2026-10-11 09:23:48 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T09:23:48Z.


In libSceContentExport (Export.cpp) sceContentExportStart, Finish, GetProgress, Cancel and FromDataWithThumbnail are NotImplemented_nid_no_patch stubs. Cult of the Lamb (PPSA06465) lists GetProgress, Cancel and FromDataWithThumbnail as absent imports in its import audit (#2686); PPSA21564 (#271) and Cyberpunk (#266) import Start.

Fix branch ready: screamm:feat/content-export-sessions (6d726a47, one commit on main 1c75f4d2). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is. It edits GuestContentUnimplemented.cpp and the ContentExport CMakeLists like the ContentSearch branch in #3370, so whichever lands second needs a trivial rebase.

  • Sources: Orbital db_types.json (cc408367, lines 545 to 554) for the signatures; SharpProspero Interop/Content/ContentExport.cs and ContentExporter.cs (5dfdb4b0) for MaxExecution = 10, the Start → export → Finish flow and the callback struct; shadPS4 content_export.h/content_export_error.h (443f0224) for the 579-byte parameter layout (added to SceTypes.hpp with a size check) and error codes.
  • Start throws before Init2 (the library's existing pattern) and otherwise returns a positive session id with at most 10 open at once (an 11th throws: the sources do not say whether the console returns EXECUTION_MAX); Finish closes a session (unknown id throws invalid_argument); FromDataWithThumbnail checks the library and session, then throws "the host has no media library to export into" before touching the callbacks or the output path; GetProgress and Cancel check the session and throw, since no export ever runs here and the sources describe only a running one; Term throws with open sessions. So a title that exports a photo still stops, but at the precise call with a precise reason; FromData, FromFile, FromFileWithThumbnail are untouched. TechnicalDebt gets one bullet and the three functions leave the PPSA06465 "signatures unknown" bullet.
  • guest_content_export gains Start/Finish before init, 10 ids, the 11th throwing, Term with open sessions, the throws on an open session, invalid_argument on closed ids, and a clean shutdown; the three leave guest_content_unimplemented.

Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON, full build including libs: both tests 3/3; ctest -j8 -E "^agc_driver_|^video_out_flip" 520/520; with main's Export.cpp the extended test fails; tools/check_conventions.py --base main and git diff --check pass. Not run on Linux.

Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5799780807 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3374). Originally posted by [screamm](https://github.com/screamm) on 2026-10-11T09:23:48Z. --- In libSceContentExport ([Export.cpp](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceContentExport/Export.cpp)) `sceContentExportStart`, `Finish`, `GetProgress`, `Cancel` and `FromDataWithThumbnail` are `NotImplemented_nid_no_patch` stubs. Cult of the Lamb (PPSA06465) lists `GetProgress`, `Cancel` and `FromDataWithThumbnail` as absent imports in its import audit (#2686); PPSA21564 (#271) and Cyberpunk (#266) import `Start`. **Fix branch ready:** [`screamm:feat/content-export-sessions`](https://github.com/screamm/AnyPS5/tree/feat/content-export-sessions) (`6d726a47`, one commit on `main` `1c75f4d2`). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is. It edits `GuestContentUnimplemented.cpp` and the ContentExport CMakeLists like the ContentSearch branch in #3370, so whichever lands second needs a trivial rebase. - Sources: Orbital `db_types.json` (`cc408367`, lines 545 to 554) for the signatures; SharpProspero `Interop/Content/ContentExport.cs` and `ContentExporter.cs` (`5dfdb4b0`) for `MaxExecution = 10`, the Start → export → Finish flow and the callback struct; shadPS4 `content_export.h`/`content_export_error.h` (`443f0224`) for the 579-byte parameter layout (added to `SceTypes.hpp` with a size check) and error codes. - `Start` throws before `Init2` (the library's existing pattern) and otherwise returns a positive session id with at most 10 open at once (an 11th throws: the sources do not say whether the console returns `EXECUTION_MAX`); `Finish` closes a session (unknown id throws `invalid_argument`); `FromDataWithThumbnail` checks the library and session, then throws "the host has no media library to export into" before touching the callbacks or the output path; `GetProgress` and `Cancel` check the session and throw, since no export ever runs here and the sources describe only a running one; `Term` throws with open sessions. So a title that exports a photo still stops, but at the precise call with a precise reason; `FromData`, `FromFile`, `FromFileWithThumbnail` are untouched. TechnicalDebt gets one bullet and the three functions leave the PPSA06465 "signatures unknown" bullet. - `guest_content_export` gains Start/Finish before init, 10 ids, the 11th throwing, Term with open sessions, the throws on an open session, `invalid_argument` on closed ids, and a clean shutdown; the three leave `guest_content_unimplemented`. **Tested** on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`, full build including `libs`: both tests 3/3; `ctest -j8 -E "^agc_driver_|^video_out_flip"` 520/520; with `main`'s `Export.cpp` the extended test fails; `tools/check_conventions.py --base main` and `git diff --check` pass. Not run on Linux. Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).
blawesom commented 2026-10-11 10:27:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T10:27:46Z.


Independent verification on Linux (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON.

  • Rebased 6d726a47 onto current main: applies cleanly, no conflicts (also rebases cleanly on top of #3370's branch for whichever lands second).
  • tools/check_conventions.py and git diff --check pass.
  • guest_content_export and guest_content_unimplemented pass.
  • Full suite mirroring the Windows run (ctest -j8 -E "^agc_driver_|^video_out_flip"): 522/522 passed.

The rebased branch is available at blawesom:verify/3374 for anyone carrying — the commit is otherwise unchanged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108072045 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3374#issuecomment-6108072045). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-11T10:27:46Z. --- Independent verification on **Linux** (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`. - Rebased `6d726a47` onto current `main`: applies cleanly, no conflicts (also rebases cleanly on top of #3370's branch for whichever lands second). - `tools/check_conventions.py` and `git diff --check` pass. - `guest_content_export` and `guest_content_unimplemented` pass. - Full suite mirroring the Windows run (`ctest -j8 -E "^agc_driver_|^video_out_flip"`): **522/522 passed**. The rebased branch is available at [`blawesom:verify/3374`](https://github.com/blawesom/AnyPS5/tree/verify/3374) for anyone carrying — the commit is otherwise unchanged.
MarcZX10 commented 2026-10-11 15:59:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T15:59:21Z.


Carried David’s ready commit into #3721, preserving its author metadata. I rebased it onto current main and kept the existing TechnicalDebt entry; the independent Linux verification is summarized in the PR description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6110878791 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3374#issuecomment-6110878791). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T15:59:21Z. --- Carried David’s ready commit into #3721, preserving its author metadata. I rebased it onto current main and kept the existing TechnicalDebt entry; the independent Linux verification is summarized in the PR description.
oneandonlydean commented 2026-10-11 23:27:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:27:27Z.


Closing: fixed by #3721.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115100533 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3374#issuecomment-6115100533). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:27:27Z. --- Closing: fixed by #3721.
Sign in to join this conversation.
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#3374
No description provided.