Skip to content

Commit b27746e

Browse files
committed
Merge branch 'remote-refactor'
2 parents dd0d0ec + 21c539f commit b27746e

File tree

9 files changed

+12
-273
lines changed

9 files changed

+12
-273
lines changed

Content/Scripts/TFPluginAPI.py

Lines changed: 0 additions & 80 deletions
This file was deleted.

Content/Scripts/TensorFlowComponent.py

Lines changed: 0 additions & 170 deletions
This file was deleted.

Content/Scripts/upymodule.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name" : "tensorflow-ue4",
33
"pythonModules": {
4-
"tensorflow": "1.12.0",
5-
"h5py":"2.7.0"
4+
"tensorflow": "1.15.0"
65
}
76
}

Content/TensorflowComponent.uasset

-9.35 KB
Binary file not shown.

Source/TFAudioCapture/Private/FTFAudioCapture.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "ITFAudioCapture.h"
22
#include "TFAudioCaptureComponent.h"
3-
#include "LambdaRunnable.h"
3+
#include "CULambdaRunnable.h"
44
#include "FWindowsAudioCapture.h"
55

66
class FTFAudioCapture : public ITFAudioCapture
@@ -43,7 +43,7 @@ void FTFAudioCapture::StartCapture(TFunction<void(const TArray<uint8>&, float)>
4343
TFunction<void(const TArray<uint8>&, float)> OnDataDelegate = [this, OnAudioData] (const TArray<uint8>& AudioData, float AudioMaxLevel)
4444
{
4545
//Call each added component function inside game thread
46-
FLambdaRunnable::RunShortLambdaOnGameThread([this, AudioData, OnAudioData, AudioMaxLevel]
46+
FCULambdaRunnable::RunShortLambdaOnGameThread([this, AudioData, OnAudioData, AudioMaxLevel]
4747
{
4848
for (auto Delegate : Delegates)
4949
{
@@ -61,7 +61,7 @@ void FTFAudioCapture::StartCapture(TFunction<void(const TArray<uint8>&, float)>
6161
TFunction<void(const TArray<uint8>&, float)> OnFinishedDelegate = [this, OnCaptureFinished](const TArray<uint8>& AudioData, float AudioMaxLevel)
6262
{
6363
//Call each added component function inside game thread
64-
FLambdaRunnable::RunShortLambdaOnGameThread([this, AudioData, OnCaptureFinished, AudioMaxLevel]
64+
FCULambdaRunnable::RunShortLambdaOnGameThread([this, AudioData, OnCaptureFinished, AudioMaxLevel]
6565
{
6666
for (auto Delegate : Delegates)
6767
{

Source/TFAudioCapture/Private/FWindowsAudioCapture.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "FWindowsAudioCapture.h"
2-
#include "LambdaRunnable.h"
2+
#include "CULambdaRunnable.h"
33
#include "CoreMinimal.h"
4+
#include "HAL/ThreadSafeBool.h"
45

56
#include "AllowWindowsPlatformTypes.h"
67
#include <iostream>
@@ -26,7 +27,7 @@ void FWindowsAudioCapture::StartCapture(TFunction<void(const TArray<uint8>&, flo
2627
bRunLoopActive = true;
2728
FThreadSafeBool* bShouldRunPtr = &bRunLoopActive;
2829

29-
FLambdaRunnable::RunLambdaOnBackGroundThread([this, OnAudioData, OnCaptureFinished, bShouldRunPtr]()
30+
FCULambdaRunnable::RunLambdaOnBackGroundThread([this, OnAudioData, OnCaptureFinished, bShouldRunPtr]()
3031
{
3132
HWAVEIN hWaveIn;
3233
MMRESULT result;

Source/TensorFlow/Private/TensorFlow.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include "TensorFlow.h"
44
#include "TensorFlowPrivatePCH.h"
5-
#include "UnrealEnginePython.h"
65
#include "IPluginManager.h"
76

87
#define LOCTEXT_NAMESPACE "FTensorFlowModule"
@@ -11,16 +10,6 @@ DEFINE_LOG_CATEGORY(TensorFlowLog);
1110
void FTensorFlowModule::StartupModule()
1211
{
1312
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
14-
15-
//Get the python module and add self as a dependent
16-
if (FUnrealEnginePythonModule::IsAvailable())
17-
{
18-
FUnrealEnginePythonModule::Get().AddPythonDependentPlugin("TensorFlow");
19-
}
20-
else
21-
{
22-
UE_LOG(TensorFlowLog, Warning, TEXT("UnrealEnginePython Plugin not found! Make sure you've enabled it in Edit->Plugins."));
23-
}
2413
}
2514

2615
void FTensorFlowModule::ShutdownModule()

Source/TensorFlow/TensorFlow.Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public TensorFlow(ReadOnlyTargetRules Target) : base(Target)
6161
"RHI",
6262
"RenderCore",
6363
"Engine",
64-
"UnrealEnginePython"
64+
"MachineLearningRemote"
6565
// ... add other public dependencies that you statically link with here ...
6666
}
6767
);

TensorFlow.uplugin

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
33
"Version": 1,
4-
"VersionName": "0.14.0",
4+
"VersionName": "1.0.0alpha",
55
"FriendlyName": "TensorFlow",
66
"Description": "Unofficial TensorFlow plugin for UE4. Enables state of the art machine learning via python and blueprints.",
77
"Category": "Computing",
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"Name": "TFAudioCapture",
28-
"Type": "Developer",
28+
"Type": "Runtime",
2929
"LoadingPhase": "Default",
3030
"WhitelistPlatforms": [
3131
"Win64",
@@ -35,11 +35,11 @@
3535
],
3636
"Plugins": [
3737
{
38-
"Name": "UnrealEnginePython",
38+
"Name": "SocketIOClient",
3939
"Enabled": true
4040
},
4141
{
42-
"Name": "SocketIOClient",
42+
"Name": "MachineLearningRemote",
4343
"Enabled": true
4444
}
4545
]

0 commit comments

Comments
 (0)