videorecording + a few other funcs (#80)

* libSceVideoRecording

* sceGameLiveStreamingPermitServerSideRecording

* sceSharePlaySetProhibition

* sceGameLiveStreamingEnableLiveStreaming

* sceGameLiveStreamingPermitLiveStreaming

* fix types

* LongBool->Boolean

---------

Co-authored-by: red-prig <vdpasha@mail.ru>
This commit is contained in:
Kagamma 2023-02-10 00:15:14 +07:00 committed by GitHub
parent 4501aa313e
commit cbcf47cac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 168 additions and 1 deletions

View File

@ -31,7 +31,7 @@
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="129">
<Units Count="130">
<Unit0>
<Filename Value="fpPS4.lpr"/>
<IsPartOfProject Value="True"/>
@ -591,6 +591,11 @@
<Filename Value="src\ps4_libsceaudiodec.pas"/>
<IsPartOfProject Value="True"/>
</Unit128>
<Unit129>
<Filename Value="src\ps4_libscevideorecording.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="ps4_libSceVideoRecording"/>
</Unit129>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -55,6 +55,7 @@ uses
ps4_libSceUlt,
ps4_libSceGameLiveStreaming,
ps4_libSceSharePlay,
ps4_libSceVideoRecording,
ps4_elf,
ps4_pthread,
ps4_program,

View File

@ -15,6 +15,24 @@ begin
Result:=0;
end;
function ps4_sceGameLiveStreamingPermitServerSideRecording(isPermit:Boolean):Integer; SysV_ABI_CDecl;
begin
Writeln('sceGameLiveStreamingPermitServerSideRecording,isPermit=',isPermit);
Result:=0;
end;
function ps4_sceGameLiveStreamingEnableLiveStreaming(isEnable:Boolean):Integer; SysV_ABI_CDecl;
begin
Writeln('sceGameLiveStreamingEnableLiveStreaming,isEnable=',isEnable);
Result:=0;
end;
function ps4_sceGameLiveStreamingPermitLiveStreaming(isPermit:Boolean):Integer; SysV_ABI_CDecl;
begin
Writeln('sceGameLiveStreamingPermitLiveStreaming,isPermit=',isPermit);
Result:=0;
end;
function Load_libSceGameLiveStreaming(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
@ -25,6 +43,9 @@ begin
lib:=Result._add_lib('libSceGameLiveStreaming');
lib^.set_proc($92F604C369419DD9,@ps4_sceGameLiveStreamingInitialize);
lib^.set_proc($FC41E753AF201315,@ps4_sceGameLiveStreamingPermitServerSideRecording);
lib^.set_proc($75633CD005F7F68E,@ps4_sceGameLiveStreamingEnableLiveStreaming);
lib^.set_proc($2B443111B0FBABE7,@ps4_sceGameLiveStreamingPermitLiveStreaming);
end;
initialization

View File

@ -9,12 +9,21 @@ uses
implementation
type
SceSharePlayProhibitionMode=Integer; // enum
function ps4_sceSharePlayInitialize(pHeap:Pointer;heapSize:qword):Integer; SysV_ABI_CDecl;
begin
Writeln('sceSharePlayInitialize:',HexStr(pHeap),':',heapSize);
Result:=0;
end;
function ps4_sceSharePlaySetProhibition(mode:SceSharePlayProhibitionMode):Integer; SysV_ABI_CDecl;
begin
Writeln('sceSharePlaySetProhibition,mode=',mode);
Result:=0;
end;
function Load_libSceSharePlay(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
@ -25,6 +34,7 @@ begin
lib:=Result._add_lib('libSceSharePlay');
lib^.set_proc($8ACAEEAAD86961CC,@ps4_sceSharePlayInitialize);
lib^.set_proc($728D8D0A3FFFA677,@ps4_sceSharePlaySetProhibition);
end;
initialization

View File

@ -0,0 +1,130 @@
unit ps4_libSceVideoRecording;
{$mode ObjFPC}{$H+}
interface
uses
ps4_program,
sys_types;
implementation
const
SCE_VIDEO_RECORDING_INFO_SUBTITLE =$0002;
SCE_VIDEO_RECORDING_INFO_DESCRIPTION =$0006;
SCE_VIDEO_RECORDING_INFO_COMMENTS =$0007;
SCE_VIDEO_RECORDING_INFO_KEYWORDS =$0008;
SCE_VIDEO_RECORDING_INFO_CHAPTER =$000D;
SCE_VIDEO_RECORDING_INFO_COPYRIGHT =$0A01;
SCE_VIDEO_RECORDING_INFO_PERMISSION_LEVEL=$A007;
SCE_VIDEO_RECORDING_INFO_GUARD_AREA =$A008;
SCE_VIDEO_RECORDING_INFO_USER_META =$A009;
SCE_VIDEO_RECORDING_ERROR_INVALID_VALUE =$80A80003;
SCE_VIDEO_RECORDING_STATUS_NONE =0;
SCE_VIDEO_RECORDING_STATUS_RUNNING=1;
SCE_VIDEO_RECORDING_STATUS_PAUSED =2;
type
SceVideoRecordingInfoGuardArea=packed record
x1,x2,y1,y2:Single;
end;
PSceVideoRecordingInfoGuardArea=^SceVideoRecordingInfoGuardArea;
SceVideoRecordingInfoUserMeta=packed record
size :size_t;
flags:Integer;
name :array[0..31 ] of Char;
data :array[0..127] of Char;
align:Integer;
end;
PSceVideoRecordingInfoUserMeta=^SceVideoRecordingInfoUserMeta;
SceVideoRecordingParam2=packed record
size :size_t;
affinityMask :QWORD;
threadPriority:Integer;
ringSec :Integer;
end;
PSceVideoRecordingParam2=^SceVideoRecordingParam2;
function ps4_sceVideoRecordingSetInfo(info:Integer;pInfo:Pointer;infoLen:size_t):Integer; SysV_ABI_CDecl;
begin
Writeln('sceVideoRecordingSetInfo,info=',info,',infoLen=',infoLen);
if (info=SCE_VIDEO_RECORDING_INFO_SUBTITLE) or
(info=SCE_VIDEO_RECORDING_INFO_DESCRIPTION) or
(info=SCE_VIDEO_RECORDING_INFO_COMMENTS) or
(info=SCE_VIDEO_RECORDING_INFO_KEYWORDS) or
(info=SCE_VIDEO_RECORDING_INFO_CHAPTER) or
(info=SCE_VIDEO_RECORDING_INFO_COPYRIGHT) or
(info=SCE_VIDEO_RECORDING_INFO_PERMISSION_LEVEL) or
(info=SCE_VIDEO_RECORDING_INFO_GUARD_AREA) or
(info=SCE_VIDEO_RECORDING_INFO_USER_META) then
Result:=infoLen
else
Result:=SCE_VIDEO_RECORDING_ERROR_INVALID_VALUE;
end;
function ps4_sceVideoRecordingClose(discard:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceVideoRecordingClose,discard=',discard);
Result:=0;
end;
function ps4_sceVideoRecordingGetStatus:Integer; SysV_ABI_CDecl;
begin
Writeln('sceVideoRecordingGetStatus');
Result:=SCE_VIDEO_RECORDING_STATUS_NONE;
end;
function ps4_sceVideoRecordingStart:Integer; SysV_ABI_CDecl;
begin
Writeln('sceVideoRecordingStart');
Result:=0;
end;
function ps4_sceVideoRecordingStop:Integer; SysV_ABI_CDecl;
begin
Writeln('sceVideoRecordingStop');
Result:=0;
end;
function ps4_sceVideoRecordingOpen2(pPath:Pchar;
pParam:PSceVideoRecordingParam2;
pHeap:Pointer;
heapSize:Integer):Integer; SysV_ABI_CDecl;
begin
Writeln('sceVideoRecordingOpen2,pPath=',pPath);
Result:=0;
end;
function ps4_sceVideoRecordingQueryMemSize2(pParam:PSceVideoRecordingParam2):Integer; SysV_ABI_CDecl;
begin
Writeln('sceVideoRecordingQueryMemSize2');
Result:=1024;
end;
function Load_libSceVideoRecording(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
begin
Result:=TElf_node.Create;
Result.pFileName:=name;
lib:=Result._add_lib('libSceVideoRecording');
lib^.set_proc($15CF2AC652883584,@ps4_sceVideoRecordingSetInfo);
lib^.set_proc($287BE43D024330B9,@ps4_sceVideoRecordingClose);
lib^.set_proc($7D9250CC52B81AFE,@ps4_sceVideoRecordingGetStatus);
lib^.set_proc($B56A1EF48946021B,@ps4_sceVideoRecordingStart);
lib^.set_proc($38E171ACC63E99F2,@ps4_sceVideoRecordingStop);
lib^.set_proc($B36F1D6A5070A768,@ps4_sceVideoRecordingOpen2);
lib^.set_proc($6C662463AAB76C8C,@ps4_sceVideoRecordingQueryMemSize2);
end;
initialization
ps4_app.RegistredPreLoad('libSceVideoRecording.prx',@Load_libSceVideoRecording);
end.