OpenShot Library | libopenshot
0.2.5
|
This class uses the ImageMagick++ libraries, to open image files, and return openshot::Frame objects containing the image. More...
#include <ImageReader.h>
Public Member Functions | |
void | Close () |
Close File. More... | |
CacheMemory * | GetCache () |
Get the cache object used by this reader (always returns NULL for this object) More... | |
std::shared_ptr< Frame > | GetFrame (int64_t requested_frame) |
ImageReader (std::string path) | |
ImageReader (std::string path, bool inspect_reader) | |
bool | IsOpen () |
Determine if reader is open or closed. More... | |
std::string | Json () const override |
Get and Set JSON methods. More... | |
Json::Value | JsonValue () const |
Generate Json::Value for this object. More... | |
std::string | Name () |
Return the type name of the class. More... | |
void | Open () |
Open File - which is called by the constructor automatically. More... | |
void | SetJson (const std::string value) |
Load JSON string into this object. More... | |
void | SetJsonValue (const Json::Value root) |
Load Json::Value into this object. More... | |
![]() | |
void | DisplayInfo () |
Display file information in the standard output stream (stdout) More... | |
openshot::ClipBase * | GetClip () |
Parent clip object of this reader (which can be unparented and NULL) More... | |
ReaderBase () | |
Constructor for the base reader, where many things are initialized. More... | |
void | SetClip (openshot::ClipBase *clip) |
Set parent clip object of this reader. More... | |
virtual | ~ReaderBase ()=default |
Additional Inherited Members | |
![]() | |
openshot::ReaderInfo | info |
Information about the current media file. More... | |
![]() | |
juce::CriticalSection | getFrameCriticalSection |
Section lock for multiple threads. More... | |
openshot::ClipBase * | parent |
juce::CriticalSection | processingCriticalSection |
This class uses the ImageMagick++ libraries, to open image files, and return openshot::Frame objects containing the image.
Definition at line 71 of file ImageReader.h.
ImageReader::ImageReader | ( | std::string | path | ) |
Constructor for ImageReader. This automatically opens the media file and loads frame 1, or it throws one of the following exceptions.
Definition at line 38 of file ImageReader.cpp.
ImageReader::ImageReader | ( | std::string | path, |
bool | inspect_reader | ||
) |
Constructor for ImageReader. This only opens the media file to inspect its properties if inspect_reader=true. When not inspecting the media file, it's much faster, and useful when you are inflating the object using JSON after instantiating it.
Definition at line 45 of file ImageReader.cpp.
|
virtual |
Close File.
Implements openshot::ReaderBase.
Definition at line 108 of file ImageReader.cpp.
Referenced by ImageReader(), and SetJsonValue().
|
inlinevirtual |
Get the cache object used by this reader (always returns NULL for this object)
Implements openshot::ReaderBase.
Definition at line 93 of file ImageReader.h.
|
virtual |
Get an openshot::Frame object for a specific frame number of this reader. All numbers return the same Frame, since they all share the same image data.
requested_frame | The frame number that is requested. |
Implements openshot::ReaderBase.
Definition at line 122 of file ImageReader.cpp.
|
inlinevirtual |
Determine if reader is open or closed.
Implements openshot::ReaderBase.
Definition at line 103 of file ImageReader.h.
|
overridevirtual |
Get and Set JSON methods.
Generate JSON string of this object
Implements openshot::ReaderBase.
Definition at line 139 of file ImageReader.cpp.
|
virtual |
Generate Json::Value for this object.
Implements openshot::ReaderBase.
Definition at line 146 of file ImageReader.cpp.
Referenced by Json().
|
inlinevirtual |
Return the type name of the class.
Implements openshot::ReaderBase.
Definition at line 106 of file ImageReader.h.
|
virtual |
Open File - which is called by the constructor automatically.
Implements openshot::ReaderBase.
Definition at line 55 of file ImageReader.cpp.
Referenced by ImageReader(), and SetJsonValue().
|
virtual |
Load JSON string into this object.
Implements openshot::ReaderBase.
Definition at line 158 of file ImageReader.cpp.
|
virtual |
Load Json::Value into this object.
Implements openshot::ReaderBase.
Definition at line 175 of file ImageReader.cpp.
Referenced by SetJson().