Skip to content

Commit

Permalink
fix: I/F has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Dec 19, 2020
1 parent 2a38c36 commit 65bc5a7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions C/third_party/mediapipe_model_path.diff
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ index 0000000..ffe126f
+#endif // MEDIAPIPE_UTIL_RESOURCE_MANAGER_H_
diff --git a/mediapipe/util/resource_util_unity.cc b/mediapipe/util/resource_util_unity.cc
new file mode 100644
index 0000000..6ddbefa
index 0000000..89d1d1c
--- /dev/null
+++ b/mediapipe/util/resource_util_unity.cc
@@ -0,0 +1,20 @@
@@ -0,0 +1,25 @@
+#include "mediapipe/util/resource_manager.h"
+#include "mediapipe/util/resource_util.h"
+#include "mediapipe/framework/port/singleton.h"
Expand All @@ -128,7 +128,12 @@ index 0000000..6ddbefa
+}
+
+::mediapipe::Status GetResourceContents(const std::string& path,
+ std::string* output) {
+ std::string* output,
+ bool read_as_binary) {
+ if (!read_as_binary) {
+ LOG(WARNING)
+ << "Setting \"read_as_binary\" to false is a no-op on Unity.";
+ }
+ RET_CHECK(Singleton<ResourceManager>::get()->ReadFile(path, output))
+ << "could not read asset: " << path;
+ return mediapipe::OkStatus();
Expand Down

0 comments on commit 65bc5a7

Please sign in to comment.