Merge pull request #3720 from MarcZX100/codex/share-clip-extended-3333

feat(libSceShare): implement extended video clip capture
This commit is contained in:
Adrià 2026-10-12 22:07:24 +02:00 committed by GitHub
commit 0142215687
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 25 additions and 14 deletions

View File

@ -105,9 +105,12 @@ int APS5_VABI sceShareCaptureScreenshotExtended(const void* extended_param, int3
}
int APS5_VABI sceShareCaptureVideoClipExtended(void) {
NotImplemented_nid_no_patch(__func__);
return 0;
int APS5_VABI sceShareCaptureVideoClipExtended(const void* extended_param, int32_t* req_id) {
(void)extended_param;
if (req_id != nullptr) {
*req_id = REQUEST_ID_INVALID;
}
return ERROR_NOT_SUPPORTED;
}
int APS5_VABI sceShareGetRunningStatus(uint32_t* status) {

View File

@ -8,6 +8,7 @@ extern "C" {
int APS5_VABI sceShareCaptureScreenshotExtended(const void* extended_param, std::int32_t* req_id);
int APS5_VABI sceShareCaptureScreenshot(const void* param, std::int32_t* req_id);
int APS5_VABI sceShareCaptureVideoClip(const void* param, std::int32_t* req_id);
int APS5_VABI sceShareCaptureVideoClipExtended(const void* extended_param, std::int32_t* req_id);
int APS5_VABI sceShareGetCurrentStatus(std::uint32_t feature_flag, void* status);
int APS5_VABI sceShareOpenMenuForContent(const void* content_id);
int APS5_VABI sceShareGetRunningStatus(std::uint32_t* status);
@ -24,18 +25,21 @@ int main() {
constexpr std::int32_t notSupported = static_cast<std::int32_t>(0x81960007);
std::uint8_t param[64]{};
std::int32_t reqId = 7;
Require(sceShareCaptureScreenshotExtended(param, &reqId) == notSupported);
Require(reqId == -1);
reqId = 7;
Require(sceShareCaptureScreenshotExtended(nullptr, &reqId) == notSupported);
Require(reqId == -1);
Require(sceShareCaptureScreenshotExtended(param, nullptr) == notSupported);
Require(sceShareCaptureScreenshotExtended(nullptr, nullptr) == notSupported);
using Capture = int (APS5_VABI*)(const void*, std::int32_t*);
std::int32_t reqId = 7;
for (Capture capture : {sceShareCaptureScreenshotExtended, sceShareCaptureVideoClipExtended}) {
reqId = 7;
Require(capture(param, &reqId) == notSupported);
Require(reqId == -1);
reqId = 7;
Require(capture(nullptr, &reqId) == notSupported);
Require(reqId == -1);
Require(capture(param, nullptr) == notSupported);
Require(capture(nullptr, nullptr) == notSupported);
}
for (Capture capture : {sceShareCaptureScreenshot, sceShareCaptureVideoClip}) {
reqId = 7;
Require(capture(param, &reqId) == notSupported);

View File

@ -5,3 +5,7 @@
- [sceShareGetCurrentStatus](../../../core/libs/prx/libSceShare/Export.cpp) (libSceShare) - validation (feature flag non-zero, status non-null) and the all-zero 16-byte status taken from the [KytyPS5](https://github.com/KytyPS5/KytyPS5) reimplementation, not confirmed on a PS5 title; the meaning of the recording status values is unknown
- [sceShareGetRunningStatus](../../../core/libs/prx/libSceShare/Export.cpp) (libSceShare) - only the first 32-bit word of the status is known: PPSA01317 treats bits 0x3c of it as a running share feature and gives the call a 40-byte buffer. The host never records or broadcasts, so it stores 0 in that word and leaves the rest untouched; a null status returns `INVALID_PARAM` by analogy with `sceShareGetCurrentStatus`
- [sceShareSetContentParamForApplicationTitle](../../../core/libs/prx/libSceShare/Export.cpp) (libSceShare) - imported by PPSA12544's Unity plugins; the signature follows [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/main/src/libs/libShare.cpp), not confirmed on a PS5 title. The application title is only checked for null, as KytyPS5 does, since nothing is captured
### Functional
- [sceShareCaptureVideoClipExtended](../../../core/libs/prx/libSceShare/Export.cpp) (libSceShare) - imported by PPSA12544's Share plugin; the signature (extended parameter, request id) and the answer follow [KytyPS5](https://github.com/KytyPS5/KytyPS5/blob/147188b143f67c27d8da396e759c19336f64c105/src/libs/libShare.cpp), not confirmed on a PS5 title. Nothing is captured, so, like `sceShareCaptureScreenshotExtended`, it stores the invalid request id -1 when the pointer is not null and returns `NOT_SUPPORTED` without reading the extended parameter, whose layout is unknown