From f0fd8a71604ce436ddb12159b70852782e19a74e Mon Sep 17 00:00:00 2001 From: Silverlan Date: Thu, 29 Jun 2023 16:51:40 +0200 Subject: [PATCH] add read_as_binary parameter for custom resource providers --- mediapipe/util/resource_util.cc | 2 +- mediapipe/util/resource_util_custom.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mediapipe/util/resource_util.cc b/mediapipe/util/resource_util.cc index 38636f32e..a4f296d10 100644 --- a/mediapipe/util/resource_util.cc +++ b/mediapipe/util/resource_util.cc @@ -32,7 +32,7 @@ ResourceProviderFn resource_provider_ = nullptr; absl::Status GetResourceContents(const std::string& path, std::string* output, bool read_as_binary) { if (resource_provider_) { - return resource_provider_(path, output); + return resource_provider_(path, output, read_as_binary); } return internal::DefaultGetResourceContents(path, output, read_as_binary); } diff --git a/mediapipe/util/resource_util_custom.h b/mediapipe/util/resource_util_custom.h index e74af8b2e..59f24657e 100644 --- a/mediapipe/util/resource_util_custom.h +++ b/mediapipe/util/resource_util_custom.h @@ -7,7 +7,7 @@ namespace mediapipe { -typedef std::function +typedef std::function ResourceProviderFn; // Returns true if files are provided via a custom resource provider.