| 
    OpenShot Library | libopenshot
    0.4.0
    
   | 
 
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 (std::ostream *out=&std::cout) | 
| Display file information in the standard output stream (stdout)  More... | |
| virtual openshot::CacheBase * | GetCache ()=0 | 
| Get the cache object used by this reader (note: not all readers use cache)  More... | |
| virtual std::shared_ptr< openshot::Frame > | GetFrame (int64_t number)=0 | 
| virtual bool | IsOpen ()=0 | 
| Determine if reader is open or closed.  More... | |
| virtual std::string | Json () const =0 | 
| Generate JSON string of this object.  More... | |
| virtual Json::Value | JsonValue () const =0 | 
| Generate Json::Value for this object.  More... | |
| virtual std::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... | |
| openshot::ClipBase * | ParentClip () | 
| Parent clip object of this reader (which can be unparented and NULL)  More... | |
| void | ParentClip (openshot::ClipBase *new_clip) | 
| Set parent clip object of this reader.  More... | |
| ReaderBase () | |
| Constructor for the base reader, where many things are initialized.  More... | |
| virtual void | SetJson (const std::string value)=0 | 
| Load JSON string into this object.  More... | |
| virtual void | SetJsonValue (const Json::Value root)=0 | 
| Load Json::Value into this object.  More... | |
| virtual | ~ReaderBase ()=default | 
Public Attributes | |
| openshot::ReaderInfo | info | 
| Information about the current media file.  More... | |
Protected Attributes | |
| openshot::ClipBase * | clip | 
| Pointer to the parent clip instance (if any)  More... | |
| std::recursive_mutex | getFrameMutex | 
| Mutex for multiple threads.  More... | |
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 populate ReaderInfo.
Definition at line 75 of file ReaderBase.h.
| ReaderBase::ReaderBase | ( | ) | 
Constructor for the base reader, where many things are initialized.
Definition at line 26 of file ReaderBase.cpp.
      
  | 
  virtualdefault | 
      
  | 
  pure virtual | 
Close the reader (and any resources it was consuming)
Implemented in openshot::Timeline, openshot::FFmpegReader, openshot::FrameMapper, openshot::Clip, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
Referenced by openshot::ChunkWriter::Close(), openshot::Clip::Close(), openshot::FrameMapper::Close(), openshot::ChunkReader::GetFrame(), openshot::Clip::Reader(), and openshot::Mask::SetJsonValue().
| void ReaderBase::DisplayInfo | ( | std::ostream * | out = &std::cout | ) | 
Display file information in the standard output stream (stdout)
Definition at line 60 of file ReaderBase.cpp.
Referenced by openshot::QtPlayer::SetSource(), and openshot::QtPlayer::SetTimelineSource().
      
  | 
  pure virtual | 
Get the cache object used by this reader (note: not all readers use cache)
Implemented in openshot::Timeline, openshot::FFmpegReader, openshot::FrameMapper, openshot::Clip, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
Referenced by openshot::Timeline::ClearAllCache(), openshot::VideoCacheThread::run(), and openshot::VideoCacheThread::Seek().
      
  | 
  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::Timeline, openshot::FFmpegReader, openshot::FrameMapper, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, openshot::ImageReader, and openshot::Clip.
Referenced by openshot::AudioWaveformer::ExtractSamples(), openshot::Mask::GetFrame(), openshot::ChunkReader::GetFrame(), openshot::AudioReaderSource::getNextAudioBlock(), openshot::VideoCacheThread::prefetchWindow(), openshot::ImageWriter::WriteFrame(), openshot::ChunkWriter::WriteFrame(), and openshot::FFmpegWriter::WriteFrame().
      
  | 
  pure virtual | 
Determine if reader is open or closed.
Implemented in openshot::Timeline, openshot::FFmpegReader, openshot::FrameMapper, openshot::Clip, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
Referenced by openshot::AudioWaveformer::ExtractSamples(), openshot::Mask::GetFrame(), openshot::FrameMapper::IsOpen(), and openshot::Clip::SetJsonValue().
      
  | 
  pure virtual | 
Generate JSON string of this object.
Implemented in openshot::Timeline, openshot::Clip, openshot::FFmpegReader, openshot::FrameMapper, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
Referenced by openshot::Mask::PropertiesJSON().
      
  | 
  pure virtual | 
Generate Json::Value for this object.
Implemented in openshot::Timeline, openshot::Clip, openshot::FFmpegReader, openshot::FrameMapper, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
Definition at line 106 of file ReaderBase.cpp.
Referenced by openshot::Mask::JsonValue(), openshot::ImageReader::JsonValue(), openshot::QtHtmlReader::JsonValue(), openshot::TextReader::JsonValue(), openshot::QtTextReader::JsonValue(), openshot::QtImageReader::JsonValue(), openshot::DummyReader::JsonValue(), openshot::ChunkReader::JsonValue(), openshot::FrameMapper::JsonValue(), openshot::FFmpegReader::JsonValue(), openshot::Clip::JsonValue(), and openshot::Timeline::JsonValue().
      
  | 
  pure virtual | 
Return the type name of the class.
Implemented in openshot::Timeline, openshot::FFmpegReader, openshot::FrameMapper, openshot::Clip, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
Referenced by openshot::Clip::Reader().
      
  | 
  pure virtual | 
Open the reader (and start consuming resources, such as images or video files)
Implemented in openshot::Timeline, openshot::FFmpegReader, openshot::FrameMapper, openshot::Clip, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
Referenced by openshot::ChunkWriter::ChunkWriter(), openshot::AudioWaveformer::ExtractSamples(), openshot::Mask::GetFrame(), openshot::ChunkReader::GetFrame(), openshot::Clip::Open(), openshot::FrameMapper::Open(), and openshot::Clip::SetJsonValue().
| openshot::ClipBase * ReaderBase::ParentClip | ( | ) | 
Parent clip object of this reader (which can be unparented and NULL)
Definition at line 240 of file ReaderBase.cpp.
Referenced by openshot::Clip::Clip(), openshot::ObjectDetection::GetFrame(), openshot::FrameMapper::GetFrame(), openshot::Clip::Reader(), and openshot::Clip::SetJsonValue().
| void ReaderBase::ParentClip | ( | openshot::ClipBase * | new_clip | ) | 
Set parent clip object of this reader.
Definition at line 245 of file ReaderBase.cpp.
      
  | 
  pure virtual | 
Load JSON string into this object.
Implemented in openshot::Timeline, openshot::Clip, openshot::FFmpegReader, openshot::FrameMapper, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
      
  | 
  pure virtual | 
Load Json::Value into this object.
Implemented in openshot::Timeline, openshot::Clip, openshot::FFmpegReader, openshot::FrameMapper, openshot::ChunkReader, openshot::DummyReader, openshot::QtImageReader, openshot::QtTextReader, openshot::TextReader, openshot::QtHtmlReader, and openshot::ImageReader.
Definition at line 157 of file ReaderBase.cpp.
Referenced by openshot::Mask::SetJsonValue(), openshot::ImageReader::SetJsonValue(), openshot::QtHtmlReader::SetJsonValue(), openshot::TextReader::SetJsonValue(), openshot::QtTextReader::SetJsonValue(), openshot::QtImageReader::SetJsonValue(), openshot::DummyReader::SetJsonValue(), openshot::ChunkReader::SetJsonValue(), openshot::FrameMapper::SetJsonValue(), openshot::FFmpegReader::SetJsonValue(), openshot::Clip::SetJsonValue(), and openshot::Timeline::SetJsonValue().
      
  | 
  protected | 
Pointer to the parent clip instance (if any)
Definition at line 80 of file ReaderBase.h.
Referenced by openshot::Timeline::AddClip(), openshot::Timeline::ApplyMapperToClips(), openshot::Timeline::Clear(), openshot::Timeline::ClearAllCache(), openshot::Timeline::ClipEffects(), openshot::Timeline::Close(), openshot::Timeline::GetClip(), openshot::Timeline::GetClipEffect(), openshot::Timeline::GetFrame(), ParentClip(), ReaderBase(), openshot::Timeline::RemoveClip(), and openshot::Timeline::Timeline().
      
  | 
  protected | 
Mutex for multiple threads.
Definition at line 79 of file ReaderBase.h.
Referenced by openshot::Timeline::AddClip(), openshot::Timeline::ApplyJsonDiff(), openshot::Timeline::Clear(), openshot::FrameMapper::Close(), openshot::FFmpegReader::Close(), openshot::Timeline::Close(), openshot::QtHtmlReader::GetFrame(), openshot::QtTextReader::GetFrame(), openshot::QtImageReader::GetFrame(), openshot::DummyReader::GetFrame(), openshot::FrameMapper::GetFrame(), openshot::FFmpegReader::GetFrame(), openshot::Timeline::GetFrame(), openshot::FFmpegReader::Open(), openshot::Timeline::RemoveClip(), openshot::Timeline::SetCache(), openshot::Timeline::SetJson(), and openshot::Timeline::SetJsonValue().
| openshot::ReaderInfo openshot::ReaderBase::info | 
Information about the current media file.
Definition at line 88 of file ReaderBase.h.
Referenced by openshot::Timeline::apply_effects(), openshot::FrameMapper::ChangeMapping(), openshot::Clip::Clip(), openshot::QtHtmlReader::Close(), openshot::QtTextReader::Close(), openshot::QtImageReader::Close(), openshot::FFmpegReader::Close(), openshot::WriterBase::CopyReaderInfo(), DisplayInfo(), openshot::Clip::End(), openshot::AudioWaveformer::ExtractSamples(), openshot::FrameMapper::FrameMapper(), openshot::Mask::GetFrame(), openshot::QtHtmlReader::GetFrame(), openshot::QtTextReader::GetFrame(), openshot::QtImageReader::GetFrame(), openshot::FrameMapper::GetFrame(), openshot::FFmpegReader::GetFrame(), openshot::Timeline::GetFrame(), openshot::FrameMapper::GetMappedFrame(), openshot::Timeline::GetMaxFrame(), openshot::Timeline::GetMinFrame(), openshot::AudioReaderSource::getTotalLength(), openshot::Clip::init_reader_rotation(), openshot::Clip::init_reader_settings(), JsonValue(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::TextReader::Open(), openshot::QtTextReader::Open(), openshot::QtImageReader::Open(), openshot::DummyReader::Open(), openshot::Clip::Open(), openshot::FFmpegReader::Open(), openshot::Clip::PropertiesJSON(), ReaderBase(), openshot::VideoCacheThread::run(), SetJsonValue(), openshot::Timeline::SetJsonValue(), openshot::Timeline::SetMaxSize(), openshot::QtPlayer::SetSource(), openshot::QtPlayer::Speed(), and openshot::Timeline::Timeline().
 1.8.17