mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-25 03:46:18 +00:00
log error for videodec ,videodec2 (#2900)
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
This commit is contained in:
parent
c6ea7d8f76
commit
7eea1fc4d6
2 changed files with 29 additions and 0 deletions
|
@ -17,10 +17,12 @@ int PS4_SYSV_ABI sceVideodecCreateDecoder(const OrbisVideodecConfigInfo* pCfgInf
|
|||
LOG_INFO(Lib_Videodec, "called");
|
||||
|
||||
if (!pCfgInfoIn || !pRsrcInfoIn || !pCtrlOut) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (pCfgInfoIn->thisSize != sizeof(OrbisVideodecConfigInfo) ||
|
||||
pRsrcInfoIn->thisSize != sizeof(OrbisVideodecResourceInfo)) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
|
@ -37,15 +39,18 @@ int PS4_SYSV_ABI sceVideodecDecode(OrbisVideodecCtrl* pCtrlIn,
|
|||
OrbisVideodecPictureInfo* pPictureInfoOut) {
|
||||
LOG_TRACE(Lib_Videodec, "called");
|
||||
if (!pCtrlIn || !pInputDataIn || !pPictureInfoOut) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (pCtrlIn->thisSize != sizeof(OrbisVideodecCtrl) ||
|
||||
pFrameBufferInOut->thisSize != sizeof(OrbisVideodecFrameBuffer)) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
VdecDecoder* decoder = (VdecDecoder*)pCtrlIn->handle;
|
||||
if (!decoder) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid decoder handle");
|
||||
return ORBIS_VIDEODEC_ERROR_HANDLE;
|
||||
}
|
||||
return decoder->Decode(*pInputDataIn, *pFrameBufferInOut, *pPictureInfoOut);
|
||||
|
@ -56,6 +61,7 @@ int PS4_SYSV_ABI sceVideodecDeleteDecoder(OrbisVideodecCtrl* pCtrlIn) {
|
|||
|
||||
VdecDecoder* decoder = (VdecDecoder*)pCtrlIn->handle;
|
||||
if (!decoder) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid decoder handle");
|
||||
return ORBIS_VIDEODEC_ERROR_HANDLE;
|
||||
}
|
||||
delete decoder;
|
||||
|
@ -68,15 +74,18 @@ int PS4_SYSV_ABI sceVideodecFlush(OrbisVideodecCtrl* pCtrlIn,
|
|||
LOG_INFO(Lib_Videodec, "called");
|
||||
|
||||
if (!pFrameBufferInOut || !pPictureInfoOut) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (pFrameBufferInOut->thisSize != sizeof(OrbisVideodecFrameBuffer) ||
|
||||
pPictureInfoOut->thisSize != sizeof(OrbisVideodecPictureInfo)) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
VdecDecoder* decoder = (VdecDecoder*)pCtrlIn->handle;
|
||||
if (!decoder) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid decoder handle");
|
||||
return ORBIS_VIDEODEC_ERROR_HANDLE;
|
||||
}
|
||||
return decoder->Flush(*pFrameBufferInOut, *pPictureInfoOut);
|
||||
|
@ -92,10 +101,12 @@ int PS4_SYSV_ABI sceVideodecQueryResourceInfo(const OrbisVideodecConfigInfo* pCf
|
|||
LOG_INFO(Lib_Videodec, "called");
|
||||
|
||||
if (!pCfgInfoIn || !pRsrcInfoOut) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (pCfgInfoIn->thisSize != sizeof(OrbisVideodecConfigInfo) ||
|
||||
pRsrcInfoOut->thisSize != sizeof(OrbisVideodecResourceInfo)) {
|
||||
LOG_ERROR(Lib_Videodec, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,9 +17,11 @@ sceVideodec2QueryComputeMemoryInfo(OrbisVideodec2ComputeMemoryInfo* computeMemIn
|
|||
LOG_INFO(Lib_Vdec2, "called");
|
||||
|
||||
if (!computeMemInfo) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC2_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (computeMemInfo->thisSize != sizeof(OrbisVideodec2ComputeMemoryInfo)) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC2_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
|
@ -47,10 +49,12 @@ sceVideodec2QueryDecoderMemoryInfo(const OrbisVideodec2DecoderConfigInfo* decode
|
|||
LOG_INFO(Lib_Vdec2, "called");
|
||||
|
||||
if (!decoderCfgInfo || !decoderMemInfo) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC2_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (decoderCfgInfo->thisSize != sizeof(OrbisVideodec2DecoderConfigInfo) ||
|
||||
decoderMemInfo->thisSize != sizeof(OrbisVideodec2DecoderMemoryInfo)) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC2_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
|
@ -74,10 +78,12 @@ s32 PS4_SYSV_ABI sceVideodec2CreateDecoder(const OrbisVideodec2DecoderConfigInfo
|
|||
LOG_INFO(Lib_Vdec2, "called");
|
||||
|
||||
if (!decoderCfgInfo || !decoderMemInfo || !decoder) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC2_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (decoderCfgInfo->thisSize != sizeof(OrbisVideodec2DecoderConfigInfo) ||
|
||||
decoderMemInfo->thisSize != sizeof(OrbisVideodec2DecoderMemoryInfo)) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC2_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
|
@ -89,6 +95,7 @@ s32 PS4_SYSV_ABI sceVideodec2DeleteDecoder(OrbisVideodec2Decoder decoder) {
|
|||
LOG_INFO(Lib_Vdec2, "called");
|
||||
|
||||
if (!decoder) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC2_ERROR_DECODER_INSTANCE;
|
||||
}
|
||||
|
||||
|
@ -103,13 +110,16 @@ s32 PS4_SYSV_ABI sceVideodec2Decode(OrbisVideodec2Decoder decoder,
|
|||
LOG_TRACE(Lib_Vdec2, "called");
|
||||
|
||||
if (!decoder) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid decoder instance");
|
||||
return ORBIS_VIDEODEC2_ERROR_DECODER_INSTANCE;
|
||||
}
|
||||
if (!inputData || !frameBuffer || !outputInfo) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC2_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (inputData->thisSize != sizeof(OrbisVideodec2InputData) ||
|
||||
frameBuffer->thisSize != sizeof(OrbisVideodec2FrameBuffer)) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC2_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
|
@ -122,13 +132,16 @@ s32 PS4_SYSV_ABI sceVideodec2Flush(OrbisVideodec2Decoder decoder,
|
|||
LOG_INFO(Lib_Vdec2, "called");
|
||||
|
||||
if (!decoder) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid decoder instance");
|
||||
return ORBIS_VIDEODEC2_ERROR_DECODER_INSTANCE;
|
||||
}
|
||||
if (!frameBuffer || !outputInfo) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC2_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (frameBuffer->thisSize != sizeof(OrbisVideodec2FrameBuffer) ||
|
||||
outputInfo->thisSize != sizeof(OrbisVideodec2OutputInfo)) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC2_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
|
||||
|
@ -139,6 +152,7 @@ s32 PS4_SYSV_ABI sceVideodec2Reset(OrbisVideodec2Decoder decoder) {
|
|||
LOG_INFO(Lib_Vdec2, "called");
|
||||
|
||||
if (!decoder) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid decoder instance");
|
||||
return ORBIS_VIDEODEC2_ERROR_DECODER_INSTANCE;
|
||||
}
|
||||
|
||||
|
@ -150,12 +164,15 @@ s32 PS4_SYSV_ABI sceVideodec2GetPictureInfo(const OrbisVideodec2OutputInfo* outp
|
|||
LOG_TRACE(Lib_Vdec2, "called");
|
||||
|
||||
if (!outputInfo) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid arguments");
|
||||
return ORBIS_VIDEODEC2_ERROR_ARGUMENT_POINTER;
|
||||
}
|
||||
if (outputInfo->thisSize != sizeof(OrbisVideodec2OutputInfo)) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC2_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
if (outputInfo->pictureCount == 0 || gPictureInfos.empty()) {
|
||||
LOG_ERROR(Lib_Vdec2, "No picture info available");
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
@ -163,6 +180,7 @@ s32 PS4_SYSV_ABI sceVideodec2GetPictureInfo(const OrbisVideodec2OutputInfo* outp
|
|||
OrbisVideodec2AvcPictureInfo* picInfo =
|
||||
static_cast<OrbisVideodec2AvcPictureInfo*>(p1stPictureInfoOut);
|
||||
if (picInfo->thisSize != sizeof(OrbisVideodec2AvcPictureInfo)) {
|
||||
LOG_ERROR(Lib_Vdec2, "Invalid struct size");
|
||||
return ORBIS_VIDEODEC2_ERROR_STRUCT_SIZE;
|
||||
}
|
||||
*picInfo = gPictureInfos.back();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue