OpenShot Library | libopenshot
0.4.0
|
Go to the documentation of this file.
13 #ifndef OPENSHOT_CHUNK_READER_H
14 #define OPENSHOT_CHUNK_READER_H
87 std::shared_ptr<openshot::Frame> last_frame;
90 bool does_folder_exist(std::string
path);
96 std::string get_chunk_path(int64_t chunk_number, std::string folder, std::string extension);
110 void Close()
override;
126 std::shared_ptr<openshot::Frame>
GetFrame(int64_t requested_frame)
override;
129 bool IsOpen()
override {
return is_open; };
132 std::string
Name()
override {
return "ChunkReader"; };
135 std::string
Json()
const override;
136 void SetJson(
const std::string value)
override;
141 void Open()
override;
void SetJson(const std::string value) override
Load JSON string into this object.
std::shared_ptr< openshot::Frame > GetFrame(int64_t requested_frame) override
Get an openshot::Frame object for a specific frame number of this reader.
int64_t GetChunkSize()
Get the chunk size (number of frames to write in each chunk)
This class reads a special chunk-formatted file, which can be easily shared in a distributed environm...
This namespace is the default namespace for all code in the openshot library.
void SetChunkSize(int64_t new_size)
Set the chunk size (number of frames to write in each chunk)
This struct holds the location of a frame within a chunk.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
All cache managers in libopenshot are based on this CacheBase class.
openshot::CacheBase * GetCache() override
Get the cache object used by this reader (always return NULL for this reader)
int64_t number
The chunk number.
std::string Json() const override
Generate JSON string of this object.
Header file for ReaderBase class.
void Close() override
Close the reader.
This abstract class is the base class, used by all readers in libopenshot.
int64_t frame
The frame number.
bool IsOpen() override
Determine if reader is open or closed.
Header file for JSON class.
void Open() override
Open the reader. This is required before you can access frames or data from the reader.
std::string Name() override
Return the type name of the class.
ChunkVersion
This enumeration allows the user to choose which version of the chunk they would like (low,...
@ THUMBNAIL
The lowest quality stream contained in this chunk file.
ChunkReader(std::string path, ChunkVersion chunk_version)
Constructor for ChunkReader. This automatically opens the chunk file or folder and loads frame 1,...
Json::Value JsonValue() const override
Generate Json::Value for this object.
@ FINAL
The highest quality stream contained in this chunk file.
@ PREVIEW
The medium quality stream contained in this chunk file.