|
OpenShot Library | libopenshot
0.1.1
|
This abstract class is the base class, used by all readers in libopenshot. More...
#include <ReaderBase.h>
Public Member Functions | |
| virtual void | Close ()=0 |
| Close the reader (and any resources it was consuming) More... | |
| void | DisplayInfo () |
| Display file information in the standard output stream (stdout) More... | |
| void | DrawFrameOnScene (string path, long _graphics_scene_address) |
| Test method to draw a bitmap on a Qt QGraphicsScene. More... | |
| virtual Cache * | GetCache ()=0 |
| Get the cache object used by this reader (note: not all readers use cache) More... | |
| virtual tr1::shared_ptr< Frame > | GetFrame (long int number)=0 |
| virtual bool | IsOpen ()=0 |
| A thread safe version of GetFrame. More... | |
| virtual string | Json ()=0 |
| Get and Set JSON methods. More... | |
| virtual Json::Value | JsonValue ()=0 |
| Generate Json::JsonValue for this object. More... | |
| virtual string | Name ()=0 |
| Return the type name of the class. More... | |
| virtual void | Open ()=0 |
| Open the reader (and start consuming resources, such as images or video files) More... | |
| ReaderBase () | |
| Constructor for the base reader, where many things are initialized. More... | |
| virtual void | SetJson (string value)=0 throw (InvalidJSON) |
| Load JSON string into this object. More... | |
| virtual void | SetJsonValue (Json::Value root)=0 |
| Load Json::JsonValue into this object. More... | |
Public Attributes | |
| bool | debug |
| ReaderInfo | info |
| Information about the current media file. More... | |
Protected Member Functions | |
| void | AppendDebugMethod (string method_name, string arg1_name, float arg1_value, string arg2_name, float arg2_value, string arg3_name, float arg3_value, string arg4_name, float arg4_value, string arg5_name, float arg5_value, string arg6_name, float arg6_value) |
| Append debug information as JSON. More... | |
Protected Attributes | |
| CriticalSection | getFrameCriticalSection |
| Section lock for multiple threads. More... | |
| CriticalSection | processingCriticalSection |
This abstract class is the base class, used by all readers in libopenshot.
Readers are types of classes that read video, audio, and image files, and return openshot::Frame objects. The only requirements for a 'reader', are to derive from this base class, implement the GetFrame method, and call the InitFileInfo() method.
Definition at line 95 of file ReaderBase.h.
| ReaderBase::ReaderBase | ( | ) |
Constructor for the base reader, where many things are initialized.
Definition at line 33 of file ReaderBase.cpp.
|
protected |
Append debug information as JSON.
Definition at line 67 of file ReaderBase.cpp.
|
pure virtual |
Close the reader (and any resources it was consuming)
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
| void ReaderBase::DisplayInfo | ( | ) |
Display file information in the standard output stream (stdout)
Definition at line 113 of file ReaderBase.cpp.
| void ReaderBase::DrawFrameOnScene | ( | string | path, |
| long | _graphics_scene_address | ||
| ) |
Test method to draw a bitmap on a Qt QGraphicsScene.
Definition at line 279 of file ReaderBase.cpp.
|
pure virtual |
Get the cache object used by this reader (note: not all readers use cache)
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
|
pure virtual |
This method is required for all derived classes of ReaderBase, and returns the openshot::Frame object, which contains the image and audio information for that frame of video.
| [in] | number | The frame number that is requested. |
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
|
pure virtual |
A thread safe version of GetFrame.
Determine if reader is open or closed
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
|
pure virtual |
Get and Set JSON methods.
Generate JSON string of this object
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
|
pure virtual |
Generate Json::JsonValue for this object.
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
Definition at line 153 of file ReaderBase.cpp.
|
pure virtual |
Return the type name of the class.
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
|
pure virtual |
Open the reader (and start consuming resources, such as images or video files)
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
|
pure virtual | ||||||||||||||
Load JSON string into this object.
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
|
pure virtual |
Load Json::JsonValue into this object.
Implemented in openshot::FFmpegReader, openshot::Timeline, openshot::FrameMapper, openshot::ChunkReader, openshot::TextReader, openshot::DecklinkReader, openshot::QtImageReader, openshot::ImageReader, and openshot::DummyReader.
Definition at line 202 of file ReaderBase.cpp.
| bool openshot::ReaderBase::debug |
Enable or disable debug output. Output will display on the standard output, and you can optionally invoke the OutputDebugJSON() method, which will format the debug output as JSON.
Definition at line 117 of file ReaderBase.h.
|
protected |
Section lock for multiple threads.
Definition at line 99 of file ReaderBase.h.
| ReaderInfo openshot::ReaderBase::info |
Information about the current media file.
Definition at line 120 of file ReaderBase.h.
|
protected |
Definition at line 100 of file ReaderBase.h.
1.8.6