#include "mediapipe/tasks/cc/core/external_file_handler.h"
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#ifdef ABSL_HAVE_MMAP
#include <sys/mman.h>
#endif
#ifdef _WIN32
#include <direct.h>
#include <io.h>
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <memory>
#include <string>
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/match.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "mediapipe/framework/port/status_macros.h"
#include "mediapipe/tasks/cc/common.h"
#include "mediapipe/tasks/cc/core/proto/external_file.pb.h"
#include "mediapipe/util/resource_util.h"
namespace mediapipe {
namespace tasks {
namespace core {
namespace {
StatusCode;
#ifndef O_BINARY
#ifdef _O_BINARY
#define O_BINARY …
#else
#define O_BINARY …
#endif
#endif
int64_t GetPageSizeAlignedOffset(int64_t offset) { … }
}
absl::StatusOr<std::unique_ptr<ExternalFileHandler>>
ExternalFileHandler::CreateFromExternalFile(
const proto::ExternalFile* external_file) { … }
absl::Status ExternalFileHandler::MapExternalFile() { … }
absl::string_view ExternalFileHandler::GetFileContent() { … }
ExternalFileHandler::~ExternalFileHandler() { … }
}
}
}