13 #ifndef OPENSHOT_CAMERACAPTUREREADER_H
14 #define OPENSHOT_CAMERACAPTUREREADER_H
38 std::map<std::string, std::string>
options;
47 void Close()
override;
49 std::shared_ptr<openshot::Frame>
GetFrame(int64_t number)
override;
50 bool IsOpen()
override {
return reader && reader->IsOpen(); };
51 std::string
Name()
override {
return "CameraCaptureReader"; };
52 std::string
Json()
const override;
53 void SetJson(
const std::string value)
override;
65 void ValidateSettings()
const;
70 std::unique_ptr<ScreenCaptureReader> reader;
Header file for Audio Device Info struct.
Header file for live screen capture readers.
All cache managers in libopenshot are based on this CacheBase class.
void Open() override
Open the reader (and start consuming resources, such as images or video files)
Json::Value JsonValue() const override
Generate Json::Value for this object.
void Close() override
Close the reader (and any resources it was consuming)
static bool IsBackendSupported(CameraCaptureBackend backend)
static AudioDeviceList GetDeviceNames(CameraCaptureBackend backend=CAMERA_CAPTURE_AUTO)
CameraCaptureReader(const CameraCaptureSettings &settings)
std::string Json() const override
Generate JSON string of this object.
openshot::CaptureReaderStats GetStats() const
std::shared_ptr< openshot::Frame > GetFrame(int64_t number) override
CacheBase * GetCache() override
Get the cache object used by this reader (note: not all readers use cache)
std::string Name() override
Return the type name of the class.
~CameraCaptureReader() override
static CameraCaptureBackend DefaultBackend()
bool IsOpen() override
Determine if reader is open or closed.
void SetJson(const std::string value) override
Load JSON string into this object.
CameraCaptureSettings GetSettings() const
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
This class represents a fraction.
This abstract class is the base class, used by all readers in libopenshot.
This namespace is the default namespace for all code in the openshot library.
@ CAMERA_CAPTURE_WINDOWS_DSHOW
@ CAMERA_CAPTURE_MAC_AVFOUNDATION
std::vector< std::pair< std::string, std::string > > AudioDeviceList
std::map< std::string, std::string > options
CameraCaptureBackend backend