| OpenShot Library | libopenshot
    0.4.0
    | 
This abstract class is the base class, used by writers. Writers are types of classes that encode video, audio, and image files. More...
#include <WriterBase.h>
| Public Member Functions | |
| void | CopyReaderInfo (openshot::ReaderBase *reader) | 
| This method copy's the info struct of a reader, and sets the writer with the same info.  More... | |
| void | DisplayInfo (std::ostream *out=&std::cout) | 
| Display file information in the standard output stream (stdout)  More... | |
| virtual bool | IsOpen ()=0 | 
| Determine if writer is open or closed.  More... | |
| std::string | Json () const | 
| Generate JSON string of this object.  More... | |
| Json::Value | JsonValue () const | 
| Generate Json::Value for this object.  More... | |
| virtual void | Open ()=0 | 
| Open the writer (and start initializing streams)  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... | |
| virtual void | WriteFrame (openshot::ReaderBase *reader, int64_t start, int64_t length)=0 | 
| This method is required for all derived classes of WriterBase. Write a block of frames from a reader.  More... | |
| virtual void | WriteFrame (std::shared_ptr< openshot::Frame > frame)=0 | 
| This method is required for all derived classes of WriterBase. Write a Frame to the video file.  More... | |
| WriterBase () | |
| Constructor for WriterBase class, many things are initialized here.  More... | |
| virtual | ~WriterBase ()=default | 
| Public Attributes | |
| WriterInfo | info | 
| Information about the current media file.  More... | |
This abstract class is the base class, used by writers. Writers are types of classes that encode video, audio, and image files.
The only requirements for a 'writer', are to derive from this base class, and implement the WriteFrame method.
Definition at line 69 of file WriterBase.h.
| WriterBase::WriterBase | ( | ) | 
Constructor for WriterBase class, many things are initialized here.
Definition at line 25 of file WriterBase.cpp.
| 
 | virtualdefault | 
| void WriterBase::CopyReaderInfo | ( | openshot::ReaderBase * | reader | ) | 
This method copy's the info struct of a reader, and sets the writer with the same info.
| reader | The source reader to copy | 
Definition at line 56 of file WriterBase.cpp.
Referenced by openshot::ChunkWriter::ChunkWriter().
| void WriterBase::DisplayInfo | ( | std::ostream * | out = &std::cout | ) | 
Display file information in the standard output stream (stdout)
Definition at line 91 of file WriterBase.cpp.
| 
 | pure virtual | 
Determine if writer is open or closed.
Implemented in openshot::FFmpegWriter, openshot::ChunkWriter, and openshot::ImageWriter.
| std::string WriterBase::Json | ( | ) | const | 
Generate JSON string of this object.
Definition at line 131 of file WriterBase.cpp.
| Json::Value WriterBase::JsonValue | ( | ) | const | 
Generate Json::Value for this object.
Definition at line 138 of file WriterBase.cpp.
Referenced by Json().
| 
 | pure virtual | 
Open the writer (and start initializing streams)
Implemented in openshot::FFmpegWriter, openshot::ChunkWriter, and openshot::ImageWriter.
| void WriterBase::SetJson | ( | const std::string | value | ) | 
Load JSON string into this object.
Definition at line 187 of file WriterBase.cpp.
| void WriterBase::SetJsonValue | ( | const Json::Value | root | ) | 
Load Json::Value into this object.
Definition at line 204 of file WriterBase.cpp.
Referenced by SetJson().
| 
 | pure virtual | 
This method is required for all derived classes of WriterBase. Write a block of frames from a reader.
Implemented in openshot::ImageWriter, openshot::FFmpegWriter, and openshot::ChunkWriter.
| 
 | pure virtual | 
This method is required for all derived classes of WriterBase. Write a Frame to the video file.
Implemented in openshot::FFmpegWriter, and openshot::ChunkWriter.
| WriterInfo openshot::WriterBase::info | 
Information about the current media file.
Definition at line 76 of file WriterBase.h.
Referenced by openshot::FFmpegWriter::AddSphericalMetadata(), openshot::ChunkWriter::ChunkWriter(), CopyReaderInfo(), DisplayInfo(), openshot::FFmpegWriter::FFmpegWriter(), openshot::ImageWriter::ImageWriter(), JsonValue(), openshot::FFmpegWriter::Open(), openshot::FFmpegWriter::PrepareStreams(), openshot::FFmpegWriter::SetAudioOptions(), SetJsonValue(), openshot::FFmpegWriter::SetOption(), openshot::ImageWriter::SetVideoOptions(), openshot::FFmpegWriter::SetVideoOptions(), openshot::ImageWriter::WriteFrame(), openshot::ChunkWriter::WriteFrame(), openshot::FFmpegWriter::WriteHeader(), WriterBase(), and openshot::FFmpegWriter::WriteTrailer().
 1.8.17
 1.8.17