34#define NDEVR_SUPPORTS_LOCAL_CAMERA 1
35#if NDEVR_SUPPORTS_LOCAL_CAMERA
48class QMediaCaptureSession;
50class QCameraImageCapture;
51class QVideoEncoderSettings;
52class QAudioEncoderSettings;
56#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
57 class QCustomComboBox;
88 QMediaDevices* m_devices =
nullptr;
89 QMediaCaptureSession* m_capture_session =
nullptr;
90 QCamera* m_camera =
nullptr;
91 QAudioInput* m_audio_input =
nullptr;
92 QImageCapture* m_image_capture =
nullptr;
93 QVideoWidget* m_video_widget =
nullptr;
94 QMediaRecorder* m_media_recorder =
nullptr;
112 virtual bool setCameraSource(
const String& connection_id)
override;
113 virtual bool setCameraSource(
const QCameraInfo& connection_id);
114 virtual void refreshInstance()
override;
115 void setToDefaultCamera();
116 QAudioEncoderSettings audioSettings()
const;
117 QVideoEncoderSettings videoSettings()
const;
120 void processCapturedImage(
int index,
const QImage& img);
121 void handleCameraError(
int camera_error);
123 bool startRecord(
const File& file)
override;
124 bool finishRecord(
const File& file)
override;
125 virtual bool takeImage(
const File& file)
override;
126 virtual void invertScreenColors(
bool invert)
override;
127 void updateCameraState(
int state);
129 File m_screenshot_location;
131 QCameraImageCapture* imageCapture;
132 QMediaRecorder* mediaRecorder;
133 QVideoWidget* m_video_widget;
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition DesignObjectLookup.h:61
Definition Pointer.hpp:303
Definition LocalPhysicalCameraView.h:99
virtual PhysicalCameraView * createView(const DynamicPointer< Camera > &camera, DesignObjectLookup *model_manager, bool auto_add_models, QWidget *parent) override
virtual Buffer< DynamicPointer< Camera > > availableCameraStreams() const override
virtual bool canCreateView(const DynamicPointer< Camera > &camera, DesignObjectLookup *model_manager) override
Definition LocalPhysicalCameraView.h:60
void updateCameraSources()
virtual bool takeImage(const File &file) override
virtual void refreshInstance() override
bool finishRecord(File file) override
LocalPhysicalCameraView(const DynamicPointer< Camera > &camera, QWidget *parent=nullptr)
Button * m_camera_flash_button
Definition LocalPhysicalCameraView.h:96
LocalPhysicalCameraView()
void handleScreenshotError(int id, int error, const QString &errorString)
virtual bool pauseRecord(bool paused, const File &file) override
virtual ~LocalPhysicalCameraView()
virtual void invertScreenColors(bool invert) override
void setToDefaultCamera()
QCustomComboBox * m_selection_combo
Definition LocalPhysicalCameraView.h:95
void updateRecorderState(int state)
void updateCameraState(bool state)
File m_screenshot_location
Definition LocalPhysicalCameraView.h:87
void updateRecorderTimespan()
virtual bool setCameraSource(const QCameraDevice &connection_id)
void processCapturedImage(int index, const QImage &img)
bool startRecord(const File &file) override
virtual bool setCameraSource(const String &connection_id) override
void handleCameraError(int camera_error)
Definition QCustomCombobox.h:47