31 #ifndef OPENSHOT_CHUNK_READER_H
32 #define OPENSHOT_CHUNK_READER_H
40 #include <QtCore/qdir.h>
112 std::shared_ptr<openshot::Frame> last_frame;
115 bool does_folder_exist(std::string path);
121 std::string get_chunk_path(int64_t chunk_number, std::string folder, std::string extension);
151 std::shared_ptr<openshot::Frame>
GetFrame(int64_t requested_frame);
157 std::string
Name() {
return "ChunkReader"; };
160 std::string
Json()
const override;
161 void SetJson(
const std::string value);
This class reads a special chunk-formatted file, which can be easily shared in a distributed environm...
std::string Json() const override
Get and Set JSON methods.
void Open()
Open the reader. This is required before you can access frames or data from the reader.
Header file for ReaderBase class.
void Close()
Close the reader.
ChunkReader(std::string path, ChunkVersion chunk_version)
Constructor for ChunkReader. This automatically opens the chunk file or folder and loads frame 1...
The lowest quality stream contained in this chunk file.
This abstract class is the base class, used by all readers in libopenshot.
Header file for CacheMemory class.
bool IsOpen()
Determine if reader is open or closed.
Header file for all Exception classes.
Json::Value JsonValue() const override
Generate Json::Value for this object.
The highest quality stream contained in this chunk file.
The medium quality stream contained in this chunk file.
openshot::CacheMemory * GetCache()
Get the cache object used by this reader (always return NULL for this reader)
Header file for JSON class.
void SetChunkSize(int64_t new_size)
Set the chunk size (number of frames to write in each chunk)
std::shared_ptr< openshot::Frame > GetFrame(int64_t requested_frame)
Get an openshot::Frame object for a specific frame number of this reader.
int64_t number
The chunk number.
ChunkVersion
This enumeration allows the user to choose which version of the chunk they would like (low...
int64_t GetChunkSize()
Get the chunk size (number of frames to write in each chunk)
std::string Name()
Return the type name of the class.
This namespace is the default namespace for all code in the openshot library.
void SetJson(const std::string value)
Load JSON string into this object.
int64_t frame
The frame number.
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
This struct holds the location of a frame within a chunk.
This class is a memory-based cache manager for Frame objects.