Skip to content

Commit b72181e

Browse files
committed
PICO Unreal Intergration SDK 3.3.2
1 parent 5a5fe5b commit b72181e

File tree

1,427 files changed

+86042
-1578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,427 files changed

+86042
-1578
lines changed
36 KB
Binary file not shown.
6.98 KB
Binary file not shown.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
//
2+
// Created by Administrator on 2024/10/22.
3+
//
4+
5+
#ifndef ANDROID_CAMERAAPI_H
6+
#define ANDROID_CAMERAAPI_H
7+
#include <unordered_map>
8+
9+
typedef struct PxrVector3f_ {
10+
float x;
11+
float y;
12+
float z;
13+
} PxrVector3f;
14+
15+
typedef struct PxrQuaternionf_ {
16+
float x;
17+
float y;
18+
float z;
19+
float w;
20+
} PxrQuaternionf;
21+
22+
typedef struct Pose_ {
23+
PxrVector3f position;
24+
PxrQuaternionf orientation;
25+
} Pose;
26+
typedef struct CameraFrame_ {
27+
uint32_t width;
28+
uint32_t height;
29+
uint64_t time;
30+
uint32_t size;
31+
unsigned char *data;
32+
Pose pose;
33+
int status;
34+
} CameraFrame;
35+
typedef struct RGBCameraParamsNew_ {
36+
// Intrinsics
37+
double fx;
38+
double fy;
39+
double cx;
40+
double cy;
41+
// Extrinsics
42+
PxrVector3f l_pos;
43+
PxrQuaternionf l_rot;
44+
PxrVector3f r_pos;
45+
PxrQuaternionf r_rot;
46+
} RGBCameraParamsNew;
47+
struct KeyValuePair {
48+
const char *key;
49+
const char *value;
50+
};
51+
52+
typedef void (*CapturelibCallBack)(int type);
53+
54+
typedef std::unordered_map<std::string, std::string> StringDictionary;
55+
extern "C" {
56+
#if PLATFORM_ANDROID
57+
typedef void setUEEnv(JavaVM *vm,JNIEnv *env,jclass *GGameActivityClassID,jobject *GGameActivityThis);
58+
#endif
59+
typedef bool closeCamera();
60+
typedef bool openCameraAsync(const KeyValuePair *pairs, int count);
61+
typedef void setConfigureDefault();
62+
typedef void setConfigure(bool enableMvHevc, int videoFps);
63+
typedef void setConfigureMap(const KeyValuePair *pairs, int count);
64+
typedef bool startPerformance(int mode, int width, int height);
65+
typedef bool startPreview(void *surface, int mode, int width, int height);
66+
typedef void setCameraFrameBuffer(CameraFrame *f);
67+
typedef void setCapturelibCallBack(CapturelibCallBack callback);
68+
typedef bool getCameraExtrinsics(int *leftCameraExtrinsicsCount, double **leftCameraExtrinsics,
69+
int *rightCameraExtrinsicsCount, double **rightCameraExtrinsics);
70+
typedef bool getCameraIntrinsics(int width, int height, double h_fov, double v_fov, int *count,
71+
double **rateArray);
72+
typedef bool getCameraParametersNew(int width, int height, RGBCameraParamsNew *paramsNew);
73+
74+
}
75+
76+
77+
#endif //ANDROID_CAMERAAPI_H
308 KB
Binary file not shown.
393 KB
Binary file not shown.
4.56 KB
Binary file not shown.

UE_4.27/Plugins/PICOEnterprise/PICOEnterprise.uplugin

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
33
"Version": 1,
4-
"VersionName": "3.2.3",
4+
"VersionName": "3.3.2",
55
"FriendlyName": "PICO Enterprise",
66
"Description": "",
77
"Category": "Virtual Reality",
@@ -18,17 +18,20 @@
1818
"Installed": true,
1919
"SupportedTargetPlatforms": [
2020
"Win64",
21+
"Linux",
2122
"Android"
2223
],
2324
"Modules": [
2425
{
2526
"Name": "PICOEnterprise",
2627
"Type": "Runtime",
2728
"LoadingPhase": "Default",
28-
"WhitelistPlatforms": [
29-
"Win64",
30-
"Android"
31-
]
29+
"PlatformAllowList": [
30+
"Win64",
31+
"Linux",
32+
"Android",
33+
"Mac"
34+
]
3235
}
3336
]
34-
}
37+
}

UE_4.27/Plugins/PICOEnterprise/Source/PICOEnterprise/PICOEnterprise.Build.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public PICOEnterprise(ReadOnlyTargetRules Target) : base(Target)
3131

3232
if (Target.Platform == UnrealTargetPlatform.Android)
3333
{
34+
RuntimeDependencies.Add(Path.Combine(ModuleDirectory, "../../Libs/arm64-v8a/libCameraRenderingPlugin.so"));
35+
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "../../Libs/arm64-v8a/libpvrcapturelib.so"));
36+
RuntimeDependencies.Add(Path.Combine(ModuleDirectory, "../../Libs/arm64-v8a/libpvrcapturelib.so"));
3437
// Vulkan
3538
AddEngineThirdPartyPrivateStaticDependencies(Target, "Vulkan");
3639
{

UE_4.27/Plugins/PICOEnterprise/Source/PICOEnterprise/PICOEnterprise_UPL.xml

Lines changed: 126 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,28 @@ Unreal® Engine, Copyright 1998 – 2023, Epic Games, Inc. All rights reserved.
77
<root xmlns:android="http://schemas.android.com/apk/res/android">
88
<init>
99
<log text="PICOEnterprise init"/>
10-
<log text="PICOEnterprise SDK Version = UE_3.2.3"/>
10+
<log text="PICOEnterprise SDK Version = UE_3.3.2"/>
1111
</init>
1212

1313
<androidManifestUpdates>
1414
<addElements tag="application">
15-
<meta-data android:name="pvr.tobsdk.version" android:value="UE_3.2.3" />
15+
<meta-data android:name="pvr.tobsdk.version" android:value="UE_3.3.2" />
1616
<meta-data android:name="pico_advance_interface" android:value="0"/>
1717
</addElements>
18+
<addPermission android:name="android.permission.CAMERA"/>
1819
</androidManifestUpdates>
1920

2021
<resourceCopies>
2122
<copyFile src="$S(PluginDir)/../../Libs/BAuthLib-1.0.0.jar"
2223
dst="$S(BuildDir)/libs/BAuthLib-1.0.0.jar" />
24+
<copyFile src="$S(PluginDir)/../../Libs/CameraRenderingPlugin.jar"
25+
dst="$S(BuildDir)/libs/CameraRenderingPlugin.jar" />
26+
<copyFile src="$S(PluginDir)/../../Libs/capturelib-0.0.7.jar"
27+
dst="$S(BuildDir)/libs/capturelib-0.0.7.jar" />
28+
<copyFile src="$S(PluginDir)/../../Libs/arm64-v8a/libCameraRenderingPlugin.so"
29+
dst="$S(BuildDir)/libs/arm64-v8a/libCameraRenderingPlugin.so" />
30+
<copyFile src="$S(PluginDir)/../../Libs/arm64-v8a/libpvrcapturelib.so"
31+
dst="$S(BuildDir)/libs/arm64-v8a/libpvrcapturelib.so" />
2332
</resourceCopies>
2433

2534
<buildGradleAdditions>
@@ -50,7 +59,7 @@ allprojects {
5059
}
5160

5261
dependencies {
53-
implementation 'com.picoxr.tobservice:tobservicelib:4.3.18'
62+
implementation 'com.picoxr.tobservice:tobservicelib:4.3.20'
5463
implementation 'com.google.code.gson:gson:2.8.6'
5564
}
5665
</insert>
@@ -77,6 +86,7 @@ import com.pvr.tobservice.model.PicoCastMediaFormat;
7786
import com.pvr.tobservice.model.MarkerInfo;
7887
import com.pvr.tobservice.model.MarkerInfoF;
7988
import com.pvr.tobservice.model.OffLineSystemUpdateConfig;
89+
import com.pvr.tobservice.model.LargeSpaceBoundsInfo;
8090
import com.pvr.tobservice.enums.PBS_DeviceControlEnum;
8191
import com.pvr.tobservice.enums.PBS_HomeEventEnum;
8292
import com.pvr.tobservice.enums.PBS_HomeFunctionEnum;
@@ -4059,6 +4069,119 @@ String[] SetStaticIpConfiguration(String ssid, String password, String StaticIP,
40594069
return R;
40604070
}
40614071

4072+
int SetDeviceOwner(String PackageName, String ClassName)
4073+
{
4074+
IToBServiceProxy binder = (IToBServiceProxy)ToBServiceHelper.getInstance().getServiceBinder();
4075+
if (binder != null)
4076+
{
4077+
ComponentName componentName = new ComponentName(PackageName, ClassName);
4078+
return binder.setDeviceOwner(componentName);
4079+
}
4080+
return Integer.MAX_VALUE;
4081+
}
4082+
4083+
String GetDeviceOwner()
4084+
{
4085+
IToBServiceProxy binder = (IToBServiceProxy)ToBServiceHelper.getInstance().getServiceBinder();
4086+
if (binder != null)
4087+
{
4088+
ComponentName name = binder.getDeviceOwner();
4089+
if(name != null)
4090+
{
4091+
return name.toString();
4092+
}
4093+
}
4094+
return "";
4095+
}
4096+
4097+
int SetBrowserHomePage(String url)
4098+
{
4099+
IToBServiceProxy binder = (IToBServiceProxy)ToBServiceHelper.getInstance().getServiceBinder();
4100+
if (binder != null)
4101+
{
4102+
return binder.setBrowserHomePage(url);
4103+
}
4104+
return Integer.MAX_VALUE;
4105+
}
4106+
4107+
String GetBrowserHomePage()
4108+
{
4109+
IToBServiceProxy binder = (IToBServiceProxy)ToBServiceHelper.getInstance().getServiceBinder();
4110+
if (binder != null)
4111+
{
4112+
return binder.getBrowserHomePage();
4113+
}
4114+
return "";
4115+
}
4116+
4117+
String SetMotionTrackerAutoStart(int enable)
4118+
{
4119+
IToBServiceProxy binder = (IToBServiceProxy)ToBServiceHelper.getInstance().getServiceBinder();
4120+
if (binder != null)
4121+
{
4122+
return binder.setMotionTrackerAutoStart(enable);
4123+
}
4124+
return "";
4125+
}
4126+
4127+
int AllowWifiAutoJoin(String ssid, String password, int networkID, boolean allowAutoJoin)
4128+
{
4129+
IToBServiceProxy binder = (IToBServiceProxy)ToBServiceHelper.getInstance().getServiceBinder();
4130+
if (binder != null)
4131+
{
4132+
WifiConfiguration config = new WifiConfiguration();
4133+
if (password.isEmpty())
4134+
{
4135+
config.SSID = "\"" + ssid + "\"";
4136+
config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
4137+
}
4138+
else
4139+
{
4140+
config.allowedAuthAlgorithms.clear();
4141+
config.allowedGroupCiphers.clear();
4142+
config.allowedKeyManagement.clear();
4143+
config.allowedPairwiseCiphers.clear();
4144+
config.allowedProtocols.clear();
4145+
config.SSID = "\"" + ssid + "\"";
4146+
config.preSharedKey = "\"" + password + "\"";
4147+
config.hiddenSSID = true;
4148+
config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
4149+
config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.TKIP);
4150+
config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
4151+
config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
4152+
config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
4153+
config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
4154+
config.status = WifiConfiguration.Status.ENABLED;
4155+
}
4156+
4157+
if (ssid.isEmpty())
4158+
{
4159+
return binder.allowWifiAutoJoin(null, networkID, allowAutoJoin);
4160+
}
4161+
else
4162+
{
4163+
return binder.allowWifiAutoJoin(config, networkID, allowAutoJoin);
4164+
}
4165+
}
4166+
return Integer.MAX_VALUE;
4167+
}
4168+
4169+
String[] GetLargeSpaceBoundsInfoWithType()
4170+
{
4171+
IToBServiceProxy binder = (IToBServiceProxy)ToBServiceHelper.getInstance().getServiceBinder();
4172+
if (binder != null)
4173+
{
4174+
LargeSpaceBoundsInfo[] temps = binder.getLargeSpaceBoundsInfoWithType();
4175+
String[] results = new String[temps.length];
4176+
for (int i = 0; i &lt; temps.length; i++)
4177+
{
4178+
results[i] = temps[i].toString();
4179+
}
4180+
return results;
4181+
}
4182+
return null;
4183+
}
4184+
40624185
</insert>
40634186
</gameActivityClassAdditions>
40644187

0 commit comments

Comments
 (0)