OpenShot Library | libopenshot  0.1.9
Public Member Functions | Public Attributes | List of all members
openshot::WriterBase Class Referenceabstract

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>

Inheritance diagram for openshot::WriterBase:
openshot::ChunkWriter openshot::DecklinkWriter openshot::FFmpegWriter openshot::ImageWriter

Public Member Functions

void CopyReaderInfo (ReaderBase *reader)
 This method copy's the info struct of a reader, and sets the writer with the same info. More...
 
void DisplayInfo ()
 Display file information in the standard output stream (stdout) More...
 
virtual bool IsOpen ()=0
 Determine if writer is open or closed. More...
 
string Json ()
 Get and Set JSON methods. More...
 
Json::Value JsonValue ()
 Generate Json::JsonValue for this object. More...
 
virtual void Open ()=0
 Open the writer (and start initializing streams) More...
 
void SetJson (string value)
 Load JSON string into this object. More...
 
void SetJsonValue (Json::Value root)
 Load Json::JsonValue into this object. More...
 
virtual void WriteFrame (std::shared_ptr< Frame > frame)=0
 This method is required for all derived classes of WriterBase. Write a Frame to the video file. More...
 
virtual void WriteFrame (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...
 
 WriterBase ()
 Constructor for WriterBase class, many things are initialized here. More...
 

Public Attributes

WriterInfo info
 Information about the current media file. More...
 

Detailed Description

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 85 of file WriterBase.h.

Constructor & Destructor Documentation

◆ WriterBase()

WriterBase::WriterBase ( )

Constructor for WriterBase class, many things are initialized here.

Definition at line 33 of file WriterBase.cpp.

Member Function Documentation

◆ CopyReaderInfo()

void WriterBase::CopyReaderInfo ( ReaderBase reader)

This method copy's the info struct of a reader, and sets the writer with the same info.

Parameters
readerThe source reader to copy

Definition at line 64 of file WriterBase.cpp.

◆ DisplayInfo()

void WriterBase::DisplayInfo ( )

Display file information in the standard output stream (stdout)

Definition at line 99 of file WriterBase.cpp.

◆ IsOpen()

virtual bool openshot::WriterBase::IsOpen ( )
pure virtual

Determine if writer is open or closed.

Implemented in openshot::FFmpegWriter, openshot::ChunkWriter, openshot::ImageWriter, and openshot::DecklinkWriter.

◆ Json()

string WriterBase::Json ( )

Get and Set JSON methods.

Generate JSON string of this object

Definition at line 139 of file WriterBase.cpp.

◆ JsonValue()

Json::Value WriterBase::JsonValue ( )

Generate Json::JsonValue for this object.

Definition at line 146 of file WriterBase.cpp.

◆ Open()

virtual void openshot::WriterBase::Open ( )
pure virtual

Open the writer (and start initializing streams)

Implemented in openshot::FFmpegWriter, openshot::ChunkWriter, openshot::ImageWriter, and openshot::DecklinkWriter.

◆ SetJson()

void WriterBase::SetJson ( string  value)

Load JSON string into this object.

Definition at line 195 of file WriterBase.cpp.

◆ SetJsonValue()

void WriterBase::SetJsonValue ( Json::Value  root)

Load Json::JsonValue into this object.

Definition at line 218 of file WriterBase.cpp.

◆ WriteFrame() [1/2]

virtual void openshot::WriterBase::WriteFrame ( std::shared_ptr< Frame frame)
pure virtual

This method is required for all derived classes of WriterBase. Write a Frame to the video file.

Implemented in openshot::FFmpegWriter, openshot::ChunkWriter, openshot::ImageWriter, and openshot::DecklinkWriter.

◆ WriteFrame() [2/2]

virtual void openshot::WriterBase::WriteFrame ( ReaderBase reader,
int64_t  start,
int64_t  length 
)
pure virtual

This method is required for all derived classes of WriterBase. Write a block of frames from a reader.

Implemented in openshot::FFmpegWriter, openshot::ChunkWriter, and openshot::ImageWriter.

Member Data Documentation

◆ info

WriterInfo openshot::WriterBase::info

Information about the current media file.

Definition at line 92 of file WriterBase.h.


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