OpenShot Library | libopenshot  0.2.7
Public Member Functions | List of all members
openshot::DecklinkWriter Class Reference

This class uses the Blackmagic Decklink libraries, to send video streams to Blackmagic devices. More...

#include <DecklinkWriter.h>

Inheritance diagram for openshot::DecklinkWriter:
openshot::WriterBase

Public Member Functions

void Close ()
 Close the device and video stream. More...
 
 DecklinkWriter (int device, int video_mode, int pixel_format, int channels, int sample_depth)
 
bool IsOpen ()
 Determine if writer is open or closed. More...
 
void Open ()
 Open device and video stream - which is called by the constructor automatically. More...
 
void WriteFrame (std::shared_ptr< Frame > frame)
 This method is required for all derived classes of WriterBase. Write a Frame to the video file. More...
 
void WriteFrame (ReaderBase *reader, int start, int length)
 This method is required for all derived classes of WriterBase. Write a block of frames from a reader. More...
 
- Public Member Functions inherited from openshot::WriterBase
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...
 
std::string Json () const
 Generate JSON string of this object. More...
 
Json::Value JsonValue () const
 Generate Json::Value for this object. 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 (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...
 
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...
 
 WriterBase ()
 Constructor for WriterBase class, many things are initialized here. More...
 
virtual ~WriterBase ()=default
 

Additional Inherited Members

- Public Attributes inherited from openshot::WriterBase
WriterInfo info
 Information about the current media file. More...
 

Detailed Description

This class uses the Blackmagic Decklink libraries, to send video streams to Blackmagic devices.

This requires special hardware manufactured by Blackmagic Designs. Once the device is acquired and connected, this reader returns openshot::Frame objects containing the image and audio data.

Definition at line 43 of file DecklinkWriter.h.

Constructor & Destructor Documentation

◆ DecklinkWriter()

DecklinkWriter::DecklinkWriter ( int  device,
int  video_mode,
int  pixel_format,
int  channels,
int  sample_depth 
)

Constructor for DecklinkWriter. This automatically opens the device or it throws one of the following exceptions.

Definition at line 17 of file DecklinkWriter.cpp.

Member Function Documentation

◆ Close()

void DecklinkWriter::Close ( )

Close the device and video stream.

Definition at line 175 of file DecklinkWriter.cpp.

◆ IsOpen()

bool openshot::DecklinkWriter::IsOpen ( )
inlinevirtual

Determine if writer is open or closed.

Implements openshot::WriterBase.

Definition at line 90 of file DecklinkWriter.h.

◆ Open()

void DecklinkWriter::Open ( )
virtual

Open device and video stream - which is called by the constructor automatically.

Implements openshot::WriterBase.

Definition at line 42 of file DecklinkWriter.cpp.

◆ WriteFrame() [1/2]

void DecklinkWriter::WriteFrame ( std::shared_ptr< Frame frame)

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

Definition at line 215 of file DecklinkWriter.cpp.

Referenced by WriteFrame().

◆ WriteFrame() [2/2]

void DecklinkWriter::WriteFrame ( ReaderBase reader,
int  start,
int  length 
)

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

Definition at line 225 of file DecklinkWriter.cpp.


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