OpenShot Library | libopenshot  0.2.4
Public Member Functions | List of all members
openshot::DummyReader Class Reference

This class is used as a simple, dummy reader, which always returns a blank frame. More...

#include <DummyReader.h>

Inheritance diagram for openshot::DummyReader:
openshot::ReaderBase

Public Member Functions

void Close ()
 Close File. More...
 
 DummyReader ()
 Blank constructor for DummyReader, with default settings. More...
 
 DummyReader (openshot::Fraction fps, int width, int height, int sample_rate, int channels, float duration)
 Constructor for DummyReader. More...
 
CacheMemoryGetCache ()
 Get the cache object used by this reader (always returns NULL for this reader) More...
 
std::shared_ptr< openshot::FrameGetFrame (int64_t requested_frame)
 
bool IsOpen ()
 Determine if reader is open or closed. More...
 
std::string Json ()
 Get and Set JSON methods. More...
 
Json::Value JsonValue ()
 Generate Json::JsonValue 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 (std::string value)
 Load JSON string into this object. More...
 
void SetJsonValue (Json::Value root)
 Load Json::JsonValue into this object. More...
 
virtual ~DummyReader ()
 
- Public Member Functions inherited from openshot::ReaderBase
void DisplayInfo ()
 Display file information in the standard output stream (stdout) More...
 
openshot::ClipBaseGetClip ()
 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

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

Detailed Description

This class is used as a simple, dummy reader, which always returns a blank frame.

A dummy reader can be created with any framerate or samplerate. This is useful in unit tests that need to test different framerates or samplerates.

Definition at line 54 of file DummyReader.h.

Constructor & Destructor Documentation

◆ DummyReader() [1/2]

DummyReader::DummyReader ( )

Blank constructor for DummyReader, with default settings.

Definition at line 36 of file DummyReader.cpp.

◆ DummyReader() [2/2]

DummyReader::DummyReader ( openshot::Fraction  fps,
int  width,
int  height,
int  sample_rate,
int  channels,
float  duration 
)

Constructor for DummyReader.

Definition at line 43 of file DummyReader.cpp.

◆ ~DummyReader()

DummyReader::~DummyReader ( )
virtual

Definition at line 77 of file DummyReader.cpp.

Member Function Documentation

◆ Close()

void DummyReader::Close ( )
virtual

Close File.

Implements openshot::ReaderBase.

Definition at line 95 of file DummyReader.cpp.

Referenced by DummyReader().

◆ GetCache()

CacheMemory* openshot::DummyReader::GetCache ( )
inlinevirtual

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

Implements openshot::ReaderBase.

Definition at line 74 of file DummyReader.h.

◆ GetFrame()

std::shared_ptr< Frame > DummyReader::GetFrame ( int64_t  requested_frame)
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 DummyReader.cpp.

Referenced by GetCache().

◆ IsOpen()

bool openshot::DummyReader::IsOpen ( )
inlinevirtual

Determine if reader is open or closed.

Implements openshot::ReaderBase.

Definition at line 84 of file DummyReader.h.

◆ Json()

std::string DummyReader::Json ( )
virtual

Get and Set JSON methods.

Generate JSON string of this object

Implements openshot::ReaderBase.

Definition at line 127 of file DummyReader.cpp.

Referenced by Name().

◆ JsonValue()

Json::Value DummyReader::JsonValue ( )
virtual

Generate Json::JsonValue for this object.

Implements openshot::ReaderBase.

Definition at line 134 of file DummyReader.cpp.

Referenced by Json(), and Name().

◆ Name()

std::string openshot::DummyReader::Name ( )
inlinevirtual

Return the type name of the class.

Implements openshot::ReaderBase.

Definition at line 87 of file DummyReader.h.

◆ Open()

void DummyReader::Open ( )
virtual

Open File - which is called by the constructor automatically.

Implements openshot::ReaderBase.

Definition at line 81 of file DummyReader.cpp.

Referenced by DummyReader(), and Name().

◆ SetJson()

void DummyReader::SetJson ( std::string  value)
virtual

Load JSON string into this object.

Implements openshot::ReaderBase.

Definition at line 145 of file DummyReader.cpp.

Referenced by Name().

◆ SetJsonValue()

void DummyReader::SetJsonValue ( Json::Value  root)
virtual

Load Json::JsonValue into this object.

Implements openshot::ReaderBase.

Definition at line 174 of file DummyReader.cpp.

Referenced by Name(), and SetJson().


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