add read_as_binary parameter for custom resource providers

This commit is contained in:
Silverlan 2023-06-29 16:51:40 +02:00 committed by GitHub
parent 8278dbc38f
commit f0fd8a7160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -7,7 +7,7 @@
namespace mediapipe {
typedef std::function<absl::Status(const std::string&, std::string*)>
typedef std::function<absl::Status(const std::string&, std::string*, bool)>
ResourceProviderFn;
// Returns true if files are provided via a custom resource provider.