feat(contentexport): export images to a persistent host catalog #2232
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2232"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by erick-dsnk on 2026-10-09T12:36:10Z.
What
Guest code can now start an export session, import JPEG/PNG/GIF images from a guest file or a data-provider callback, import an explicit image thumbnail, and finish the session. The five exports previously threw unconditionally. Imports preserve source bytes and publish media plus metadata into a persistent host catalog that a separate content-search change can query.
The catalog lives under the launch root's
/data/anyps5-content. Each successful import receives its own guest-readable path. An exclusive pending directory reserves the content ID; complete media and metadata are published by directory rename. Native file locks serialize publication and catalog snapshots across processes. A generation assigned at publication advances the update ID even when two exports finish in the opposite order from their start.Guest allocator callbacks supply the streaming copy buffer and receive their original user data. Callback imports enforce the declared byte total and the 0/more, 1/done protocol; malformed callbacks, allocation failures and failed imports leave the output and published catalog unchanged. Live sessions enforce the ten-execution limit, and an active callback cannot finish, terminate or reenter its own session.
Scope: image imports. PNG/JPEG use the existing source-built decoders; GIF uses the existing stb submodule and validates its first frame. Video imports and nonzero bytes in the ambiguous reserved/comment field throw. Automatic thumbnails, console gallery notifications and sharing are not implemented. Host storage paths, session-limit application, error precedence and all recovered ABI contracts remain unverified on PS5 hardware; these gaps are recorded in TechnicalDebt.
ABI evidence:
comment; SharpProspero calls them reserved, so a nonzero value throws.Draft limitation: no commercial title has been shown reaching these exports on current main. Maintainer feedback on #1582 requests a title ID and stop log for library additions. This draft supplies working implementation and host test evidence; it does not claim that acceptance requirement is met.
Completion accounting: the unchanged progress scanner reports five newly implemented exports,
libSceContentExport2/7 → 7/7, and overall libraries 2578/3044 (84.69%) → 2583/3044 (84.86%). These figures classify declared exports and do not establish full console compatibility.Tested
Linux, GCC 13.3.0, Release,
BUILD_TESTING=ON, dedicated worktree based on upstream maind70b89989473ba1f6ae13e44e079e67f1f8a44b0.guest_content_export: passed in 0.06 seconds. Checks byte-for-byte JPEG/PNG/GIF import, explicit thumbnail bytes, chunked callbacks including separate final completion, dimensions and ownership metadata, session limits, callback reentrance, allocator balance and failure, malformed callbacks, unsupported images and MIME mismatches, output preservation and rollback, parallel exports, concurrent readers during publication, out-of-order publication generations, reinitialization persistence, and a fresh child process reading and publishing the catalog.tools/check_conventions.py --base upstream/main: passed.tools/check_test_registration.py build: passed; no new unregistered tests.git diff --check: passed.88e5bdeebed5b4923b2887c0e50490dc380add20checked out in the existing USB validation worktree and configured afresh: full default build passed (1,140 rebuild steps), patchedlibstarget passed, andguest_content_exportpassed again in 0.01 seconds. No build artifacts were copied between trees. The dedicated content-export branch and worktree remain separate and clean. No complete CTest suite was run for this content-export head.Checklist
main; no other open PR implements the same functions (complete paginated baseline audit plus newest PRs through #2231; #1128 only reformats this file).mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T12:40:32Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/TechnicalDebt.mdL40Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:10:36Z.
Closing: as the description says, no title reaches these exports on main, and a host image catalog is a lot to carry without one. Reopen when a title stops at one of them.
Pull request closed