OpenShot Library | libopenshot 1.1.1
Classes | Public Member Functions | Static Public Member Functions | List of all members
openshot::ScreenCaptureReader Class Reference

#include <ScreenCaptureReader.h>

Inheritance diagram for openshot::ScreenCaptureReader:
openshot::ReaderBase

Classes

class  CaptureBackendReader
 
class  SystemAudioCapture
 

Public Member Functions

void AddSystemAudio (std::shared_ptr< openshot::Frame > frame, int64_t output_frame_number)
 
void Close () override
 Close the reader (and any resources it was consuming) More...
 
CacheBase * GetCache () override
 Get the cache object used by this reader (note: not all readers use cache) More...
 
std::shared_ptr< openshot::Frame > GetFrame (int64_t number) override
 
ScreenCaptureSettings GetSettings () const
 
openshot::CaptureReaderStats GetStats () const
 
bool IsOpen () override
 Determine if reader is open or closed. More...
 
std::string Json () const override
 Generate JSON string of this object. More...
 
Json::Value JsonValue () const override
 Generate Json::Value for this object. More...
 
std::string Name () override
 Return the type name of the class. More...
 
void Open () override
 Open the reader (and start consuming resources, such as images or video files) More...
 
void RequestClose ()
 Signal FFmpeg capture reads to stop; the opening thread must call Close(). More...
 
void ResetSystemAudio ()
 
 ScreenCaptureReader (const ScreenCaptureSettings &settings)
 
void SetJson (const std::string value) override
 Load JSON string into this object. More...
 
void SetJsonValue (const Json::Value root) override
 Load Json::Value into this object. More...
 
 ~ScreenCaptureReader () override
 
- Public Member Functions inherited from openshot::ReaderBase
bool ApplyOrientationMetadata () const
 Return whether readers apply source orientation metadata to returned frames. More...
 
void ApplyOrientationMetadata (bool value)
 Set whether readers should apply source orientation metadata to returned frames. More...
 
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 HardwareDecodeSuccessful () const
 
bool HasMaxDecodeSize () const
 Return true when a maximum decoded frame size is active. More...
 
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...
 
int MaxDecodeHeight () const
 Return the current maximum decoded frame height (0 when unlimited). More...
 
int MaxDecodeWidth () const
 Return the current maximum decoded frame width (0 when unlimited). 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...
 
void SetMaxDecodeSize (int width, int height)
 
virtual ~ReaderBase ()=default
 

Static Public Member Functions

static ScreenCaptureBackend DefaultBackend ()
 
static bool IsBackendSupported (ScreenCaptureBackend backend)
 
static bool IsSystemAudioSupported (ScreenCaptureBackend backend)
 

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
bool apply_orientation_metadata
 Apply source orientation metadata while reading frames. More...
 
openshot::ClipBase * clip
 Pointer to the parent clip instance (if any) More...
 
std::recursive_mutex getFrameMutex
 Mutex for multiple threads. More...
 
int max_decode_height
 Optional maximum decoded frame height (0 disables the limit) More...
 
int max_decode_width
 Optional maximum decoded frame width (0 disables the limit) More...
 

Detailed Description

Definition at line 62 of file ScreenCaptureReader.h.

Constructor & Destructor Documentation

◆ ScreenCaptureReader()

ScreenCaptureReader::ScreenCaptureReader ( const ScreenCaptureSettings &  settings)
explicit

Definition at line 616 of file ScreenCaptureReader.cpp.

◆ ~ScreenCaptureReader()

ScreenCaptureReader::~ScreenCaptureReader ( )
override

Definition at line 678 of file ScreenCaptureReader.cpp.

Member Function Documentation

◆ AddSystemAudio()

void ScreenCaptureReader::AddSystemAudio ( std::shared_ptr< openshot::Frame >  frame,
int64_t  output_frame_number 
)

Definition at line 1061 of file ScreenCaptureReader.cpp.

◆ Close()

void ScreenCaptureReader::Close ( )
overridevirtual

Close the reader (and any resources it was consuming)

Implements openshot::ReaderBase.

Definition at line 1205 of file ScreenCaptureReader.cpp.

Referenced by Open(), and ~ScreenCaptureReader().

◆ DefaultBackend()

ScreenCaptureBackend ScreenCaptureReader::DefaultBackend ( )
static

◆ GetCache()

CacheBase * openshot::ScreenCaptureReader::GetCache ( )
inlineoverridevirtual

Get the cache object used by this reader (note: not all readers use cache)

Implements openshot::ReaderBase.

Definition at line 84 of file ScreenCaptureReader.h.

◆ GetFrame()

std::shared_ptr< Frame > ScreenCaptureReader::GetFrame ( int64_t  number)
overridevirtual

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.

Returns
The requested frame of video
Parameters
[in]numberThe frame number that is requested.

Implements openshot::ReaderBase.

Definition at line 1041 of file ScreenCaptureReader.cpp.

◆ GetSettings()

ScreenCaptureSettings openshot::ScreenCaptureReader::GetSettings ( ) const
inline

Definition at line 97 of file ScreenCaptureReader.h.

◆ GetStats()

openshot::CaptureReaderStats ScreenCaptureReader::GetStats ( ) const

Definition at line 1244 of file ScreenCaptureReader.cpp.

◆ IsBackendSupported()

bool ScreenCaptureReader::IsBackendSupported ( ScreenCaptureBackend  backend)
static

Definition at line 696 of file ScreenCaptureReader.cpp.

Referenced by DefaultBackend().

◆ IsOpen()

bool ScreenCaptureReader::IsOpen ( )
overridevirtual

Determine if reader is open or closed.

Implements openshot::ReaderBase.

Definition at line 690 of file ScreenCaptureReader.cpp.

◆ IsSystemAudioSupported()

bool ScreenCaptureReader::IsSystemAudioSupported ( ScreenCaptureBackend  backend)
static

Definition at line 718 of file ScreenCaptureReader.cpp.

◆ Json()

std::string ScreenCaptureReader::Json ( ) const
overridevirtual

Generate JSON string of this object.

Implements openshot::ReaderBase.

Definition at line 1258 of file ScreenCaptureReader.cpp.

◆ JsonValue()

Json::Value ScreenCaptureReader::JsonValue ( ) const
overridevirtual

Generate Json::Value for this object.

Implements openshot::ReaderBase.

Definition at line 1263 of file ScreenCaptureReader.cpp.

Referenced by Json().

◆ Name()

std::string openshot::ScreenCaptureReader::Name ( )
inlineoverridevirtual

Return the type name of the class.

Implements openshot::ReaderBase.

Definition at line 87 of file ScreenCaptureReader.h.

◆ Open()

void ScreenCaptureReader::Open ( )
overridevirtual

Open the reader (and start consuming resources, such as images or video files)

Implements openshot::ReaderBase.

Definition at line 868 of file ScreenCaptureReader.cpp.

◆ RequestClose()

void ScreenCaptureReader::RequestClose ( )

Signal FFmpeg capture reads to stop; the opening thread must call Close().

Definition at line 1200 of file ScreenCaptureReader.cpp.

◆ ResetSystemAudio()

void ScreenCaptureReader::ResetSystemAudio ( )

Definition at line 1068 of file ScreenCaptureReader.cpp.

◆ SetJson()

void ScreenCaptureReader::SetJson ( const std::string  value)
overridevirtual

Load JSON string into this object.

Implements openshot::ReaderBase.

Definition at line 1288 of file ScreenCaptureReader.cpp.

◆ SetJsonValue()

void ScreenCaptureReader::SetJsonValue ( const Json::Value  root)
overridevirtual

Load Json::Value into this object.

Implements openshot::ReaderBase.

Definition at line 1297 of file ScreenCaptureReader.cpp.

Referenced by SetJson().


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