add read_as_binary parameter for custom resource providers
This commit is contained in:
parent
8278dbc38f
commit
f0fd8a7160
|
@ -32,7 +32,7 @@ ResourceProviderFn resource_provider_ = nullptr;
|
||||||
absl::Status GetResourceContents(const std::string& path, std::string* output,
|
absl::Status GetResourceContents(const std::string& path, std::string* output,
|
||||||
bool read_as_binary) {
|
bool read_as_binary) {
|
||||||
if (resource_provider_) {
|
if (resource_provider_) {
|
||||||
return resource_provider_(path, output);
|
return resource_provider_(path, output, read_as_binary);
|
||||||
}
|
}
|
||||||
return internal::DefaultGetResourceContents(path, output, read_as_binary);
|
return internal::DefaultGetResourceContents(path, output, read_as_binary);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
namespace mediapipe {
|
namespace mediapipe {
|
||||||
|
|
||||||
typedef std::function<absl::Status(const std::string&, std::string*)>
|
typedef std::function<absl::Status(const std::string&, std::string*, bool)>
|
||||||
ResourceProviderFn;
|
ResourceProviderFn;
|
||||||
|
|
||||||
// Returns true if files are provided via a custom resource provider.
|
// Returns true if files are provided via a custom resource provider.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user