OpenShot Library | libopenshot  0.1.2
Public Member Functions | List of all members
openshot::QtImageReader Class Reference

This class uses the Qt library, to open image files, and return openshot::Frame objects containing the image. More...

#include <QtImageReader.h>

Inheritance diagram for openshot::QtImageReader:
openshot::ReaderBase

Public Member Functions

void Close ()
 Close File. More...
 
CacheGetCache ()
 Get the cache object used by this reader (always returns NULL for this object) More...
 
tr1::shared_ptr< FrameGetFrame (long int requested_frame) throw (ReaderClosed)
 
bool IsOpen ()
 Determine if reader is open or closed. More...
 
string Json ()
 Get and Set JSON methods. More...
 
Json::Value JsonValue ()
 Generate Json::JsonValue for this object. More...
 
string Name ()
 Return the type name of the class. More...
 
void Open () throw (InvalidFile)
 Open File - which is called by the constructor automatically. More...
 
 QtImageReader (string path) throw (InvalidFile)
 
void SetJson (string value) throw (InvalidJSON)
 Load JSON string into this object. More...
 
void SetJsonValue (Json::Value root) throw (InvalidFile)
 Load Json::JsonValue into this object. More...
 
- Public Member Functions inherited from openshot::ReaderBase
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...
 
 ReaderBase ()
 Constructor for the base reader, where many things are initialized. More...
 

Additional Inherited Members

- Public Attributes inherited from openshot::ReaderBase
ReaderInfo info
 Information about the current media file. More...
 
- Protected Attributes inherited from openshot::ReaderBase
CriticalSection getFrameCriticalSection
 Section lock for multiple threads. More...
 
CriticalSection processingCriticalSection
 

Detailed Description

This class uses the Qt library, to open image files, and return openshot::Frame objects containing the image.

// Create a reader for a video
QtImageReader r("MyAwesomeImage.jpeg");
r.Open(); // Open the reader
// Get frame number 1 from the video
tr1::shared_ptr<Frame> f = r.GetFrame(1);
// Now that we have an openshot::Frame object, lets have some fun!
f->Display(); // Display the frame on the screen
// Close the reader
r.Close();

Definition at line 69 of file QtImageReader.h.

Constructor & Destructor Documentation

◆ QtImageReader()

QtImageReader::QtImageReader ( string  path)
throw (InvalidFile
)

Constructor for QtImageReader. This automatically opens the media file and loads frame 1, or it throws one of the following exceptions.

Definition at line 32 of file QtImageReader.cpp.

Member Function Documentation

◆ Close()

void QtImageReader::Close ( )
virtual

Close File.

Implements openshot::ReaderBase.

Definition at line 89 of file QtImageReader.cpp.

◆ GetCache()

Cache* openshot::QtImageReader::GetCache ( )
inlinevirtual

Get the cache object used by this reader (always returns NULL for this object)

Implements openshot::ReaderBase.

Definition at line 86 of file QtImageReader.h.

◆ GetFrame()

tr1::shared_ptr< Frame > QtImageReader::GetFrame ( long int  requested_frame)
throw (ReaderClosed
)
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.

Returns
The requested frame (containing the image)
Parameters
requested_frameThe frame number that is requested.

Implements openshot::ReaderBase.

Definition at line 106 of file QtImageReader.cpp.

◆ IsOpen()

bool openshot::QtImageReader::IsOpen ( )
inlinevirtual

Determine if reader is open or closed.

Implements openshot::ReaderBase.

Definition at line 96 of file QtImageReader.h.

◆ Json()

string QtImageReader::Json ( )
virtual

Get and Set JSON methods.

Generate JSON string of this object

Implements openshot::ReaderBase.

Definition at line 123 of file QtImageReader.cpp.

◆ JsonValue()

Json::Value QtImageReader::JsonValue ( )
virtual

Generate Json::JsonValue for this object.

Implements openshot::ReaderBase.

Definition at line 130 of file QtImageReader.cpp.

◆ Name()

string openshot::QtImageReader::Name ( )
inlinevirtual

Return the type name of the class.

Implements openshot::ReaderBase.

Definition at line 99 of file QtImageReader.h.

◆ Open()

void QtImageReader::Open ( )
throw (InvalidFile
)
virtual

Open File - which is called by the constructor automatically.

Implements openshot::ReaderBase.

Definition at line 40 of file QtImageReader.cpp.

◆ SetJson()

void QtImageReader::SetJson ( string  value)
throw (InvalidJSON
)
virtual

Load JSON string into this object.

Implements openshot::ReaderBase.

Definition at line 142 of file QtImageReader.cpp.

◆ SetJsonValue()

void QtImageReader::SetJsonValue ( Json::Value  root)
throw (InvalidFile
)
virtual

Load Json::JsonValue into this object.

Implements openshot::ReaderBase.

Definition at line 165 of file QtImageReader.cpp.


The documentation for this class was generated from the following files: