13#ifndef OPENSHOT_DUMMY_READER_H
14#define OPENSHOT_DUMMY_READER_H
89 std::shared_ptr<openshot::Frame> image_frame;
90 std::shared_ptr<openshot::Frame> last_cached_frame;
94 void init(
Fraction fps,
int width,
int height,
int sample_rate,
int channels,
float duration);
110 void Close()
override;
120 std::shared_ptr<openshot::Frame>
GetFrame(int64_t requested_frame)
override;
123 bool IsOpen()
override {
return is_open; };
126 std::string
Name()
override {
return "DummyReader"; };
129 std::string
Json()
const override;
130 void SetJson(
const std::string value)
override;
135 void Open()
override;
Header file for CacheMemory class.
Header file for Fraction class.
Header file for ReaderBase class.
All cache managers in libopenshot are based on this CacheBase class.
This class is a memory-based cache manager for Frame objects.
This class is used as a simple, dummy reader, which can be very useful when writing unit tests....
bool IsOpen() override
Determine if reader is open or closed.
DummyReader()
Blank constructor for DummyReader, with default settings.
std::shared_ptr< openshot::Frame > GetFrame(int64_t requested_frame) override
void SetJson(const std::string value) override
Load JSON string into this object.
Json::Value JsonValue() const override
Generate Json::Value for this object.
std::string Json() const override
Generate JSON string of this object.
void Open() override
Open File - which is called by the constructor automatically.
CacheMemory * GetCache() override
Get the cache object used by this reader (always returns NULL for this reader)
void Close() override
Close File.
std::string Name() override
Return the type name of the class.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
This class represents a fraction.
This abstract class is the base class, used by all readers in libopenshot.
This namespace is the default namespace for all code in the openshot library.