Skip to content

Commit

Permalink
Merge branch 'remote-refactor'
Browse files Browse the repository at this point in the history
  • Loading branch information
getnamo committed Jun 29, 2020
2 parents dd0d0ec + 21c539f commit b27746e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 273 deletions.
80 changes: 0 additions & 80 deletions Content/Scripts/TFPluginAPI.py

This file was deleted.

170 changes: 0 additions & 170 deletions Content/Scripts/TensorFlowComponent.py

This file was deleted.

3 changes: 1 addition & 2 deletions Content/Scripts/upymodule.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name" : "tensorflow-ue4",
"pythonModules": {
"tensorflow": "1.12.0",
"h5py":"2.7.0"
"tensorflow": "1.15.0"
}
}
Binary file modified Content/TensorflowComponent.uasset
Binary file not shown.
6 changes: 3 additions & 3 deletions Source/TFAudioCapture/Private/FTFAudioCapture.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "ITFAudioCapture.h"
#include "TFAudioCaptureComponent.h"
#include "LambdaRunnable.h"
#include "CULambdaRunnable.h"
#include "FWindowsAudioCapture.h"

class FTFAudioCapture : public ITFAudioCapture
Expand Down Expand Up @@ -43,7 +43,7 @@ void FTFAudioCapture::StartCapture(TFunction<void(const TArray<uint8>&, float)>
TFunction<void(const TArray<uint8>&, float)> OnDataDelegate = [this, OnAudioData] (const TArray<uint8>& AudioData, float AudioMaxLevel)
{
//Call each added component function inside game thread
FLambdaRunnable::RunShortLambdaOnGameThread([this, AudioData, OnAudioData, AudioMaxLevel]
FCULambdaRunnable::RunShortLambdaOnGameThread([this, AudioData, OnAudioData, AudioMaxLevel]
{
for (auto Delegate : Delegates)
{
Expand All @@ -61,7 +61,7 @@ void FTFAudioCapture::StartCapture(TFunction<void(const TArray<uint8>&, float)>
TFunction<void(const TArray<uint8>&, float)> OnFinishedDelegate = [this, OnCaptureFinished](const TArray<uint8>& AudioData, float AudioMaxLevel)
{
//Call each added component function inside game thread
FLambdaRunnable::RunShortLambdaOnGameThread([this, AudioData, OnCaptureFinished, AudioMaxLevel]
FCULambdaRunnable::RunShortLambdaOnGameThread([this, AudioData, OnCaptureFinished, AudioMaxLevel]
{
for (auto Delegate : Delegates)
{
Expand Down
5 changes: 3 additions & 2 deletions Source/TFAudioCapture/Private/FWindowsAudioCapture.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "FWindowsAudioCapture.h"
#include "LambdaRunnable.h"
#include "CULambdaRunnable.h"
#include "CoreMinimal.h"
#include "HAL/ThreadSafeBool.h"

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

FLambdaRunnable::RunLambdaOnBackGroundThread([this, OnAudioData, OnCaptureFinished, bShouldRunPtr]()
FCULambdaRunnable::RunLambdaOnBackGroundThread([this, OnAudioData, OnCaptureFinished, bShouldRunPtr]()
{
HWAVEIN hWaveIn;
MMRESULT result;
Expand Down
11 changes: 0 additions & 11 deletions Source/TensorFlow/Private/TensorFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "TensorFlow.h"
#include "TensorFlowPrivatePCH.h"
#include "UnrealEnginePython.h"
#include "IPluginManager.h"

#define LOCTEXT_NAMESPACE "FTensorFlowModule"
Expand All @@ -11,16 +10,6 @@ DEFINE_LOG_CATEGORY(TensorFlowLog);
void FTensorFlowModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module

//Get the python module and add self as a dependent
if (FUnrealEnginePythonModule::IsAvailable())
{
FUnrealEnginePythonModule::Get().AddPythonDependentPlugin("TensorFlow");
}
else
{
UE_LOG(TensorFlowLog, Warning, TEXT("UnrealEnginePython Plugin not found! Make sure you've enabled it in Edit->Plugins."));
}
}

void FTensorFlowModule::ShutdownModule()
Expand Down
2 changes: 1 addition & 1 deletion Source/TensorFlow/TensorFlow.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public TensorFlow(ReadOnlyTargetRules Target) : base(Target)
"RHI",
"RenderCore",
"Engine",
"UnrealEnginePython"
"MachineLearningRemote"
// ... add other public dependencies that you statically link with here ...
}
);
Expand Down
8 changes: 4 additions & 4 deletions TensorFlow.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "0.14.0",
"VersionName": "1.0.0alpha",
"FriendlyName": "TensorFlow",
"Description": "Unofficial TensorFlow plugin for UE4. Enables state of the art machine learning via python and blueprints.",
"Category": "Computing",
Expand All @@ -25,7 +25,7 @@
},
{
"Name": "TFAudioCapture",
"Type": "Developer",
"Type": "Runtime",
"LoadingPhase": "Default",
"WhitelistPlatforms": [
"Win64",
Expand All @@ -35,11 +35,11 @@
],
"Plugins": [
{
"Name": "UnrealEnginePython",
"Name": "SocketIOClient",
"Enabled": true
},
{
"Name": "SocketIOClient",
"Name": "MachineLearningRemote",
"Enabled": true
}
]
Expand Down

0 comments on commit b27746e

Please sign in to comment.