API Documentation
Loading...
Searching...
No Matches
LocalPhysicalCameraView Class Reference

Provides access to a local camera on the system, such as a webcam or camera for a phone. More...

#include <LocalPhysicalCameraView.h>

Inheritance diagram for LocalPhysicalCameraView:
[legend]
Collaboration diagram for LocalPhysicalCameraView:
[legend]

Public Member Functions

 LocalPhysicalCameraView ()
 
 LocalPhysicalCameraView (const DynamicPointer< Camera > &camera, QWidget *parent=nullptr)
 
virtual void refreshInstance () override
 
virtual bool setCameraSource (const QCameraDevice &connection_id)
 
virtual bool setCameraSource (const String &connection_id) override
 
void setToDefaultCamera ()
 
virtual ~LocalPhysicalCameraView ()
 

Protected Slots

void handleCameraError (int camera_error)
 
void handleScreenshotError (int id, int error, const QString &errorString)
 
void handleVideoError ()
 
void processCapturedImage (int index, const QImage &img)
 
void updateCameraState (bool state)
 
void updateRecorderState (int state)
 
void updateRecorderTimespan ()
 

Protected Member Functions

bool finishRecord (File file) override
 
void init ()
 
virtual void invertScreenColors (bool invert) override
 
virtual bool pauseRecord (bool paused, const File &file) override
 
bool startRecord (const File &file) override
 
virtual bool takeImage (const File &file) override
 
void updateCameraSources ()
 

Protected Attributes

QAudioInput * m_audio_input = nullptr
 
QCamera * m_camera = nullptr
 
Buttonm_camera_flash_button
 
QMediaCaptureSession * m_capture_session = nullptr
 
QMediaDevices * m_devices = nullptr
 
QImageCapture * m_image_capture = nullptr
 
QMediaRecorder * m_media_recorder = nullptr
 
File m_screenshot_location
 
QCustomComboBoxm_selection_combo
 
QVideoWidget * m_video_widget = nullptr
 

Detailed Description

Provides access to a local camera on the system, such as a webcam or camera for a phone.


Constructor & Destructor Documentation

◆ LocalPhysicalCameraView() [1/2]

◆ LocalPhysicalCameraView() [2/2]

LocalPhysicalCameraView ( const DynamicPointer< Camera > & camera,
QWidget * parent = nullptr )

◆ ~LocalPhysicalCameraView()

virtual ~LocalPhysicalCameraView ( )
virtual

Member Function Documentation

◆ finishRecord()

bool finishRecord ( File file)
overrideprotected

◆ handleCameraError

void handleCameraError ( int camera_error)
protectedslot

◆ handleScreenshotError

void handleScreenshotError ( int id,
int error,
const QString & errorString )
protectedslot

◆ handleVideoError

void handleVideoError ( )
protectedslot

◆ init()

void init ( )
protected

◆ invertScreenColors()

virtual void invertScreenColors ( bool invert)
overrideprotectedvirtual

◆ pauseRecord()

virtual bool pauseRecord ( bool paused,
const File & file )
overrideprotectedvirtual

◆ processCapturedImage

void processCapturedImage ( int index,
const QImage & img )
protectedslot

◆ refreshInstance()

virtual void refreshInstance ( )
overridevirtual

◆ setCameraSource() [1/2]

virtual bool setCameraSource ( const QCameraDevice & connection_id)
virtual

◆ setCameraSource() [2/2]

virtual bool setCameraSource ( const String & connection_id)
overridevirtual

◆ setToDefaultCamera()

void setToDefaultCamera ( )

◆ startRecord()

bool startRecord ( const File & file)
overrideprotected

◆ takeImage()

virtual bool takeImage ( const File & file)
overrideprotectedvirtual

◆ updateCameraSources()

void updateCameraSources ( )
protected

◆ updateCameraState

void updateCameraState ( bool state)
protectedslot

◆ updateRecorderState

void updateRecorderState ( int state)
protectedslot

◆ updateRecorderTimespan

void updateRecorderTimespan ( )
protectedslot

Member Data Documentation

◆ m_audio_input

QAudioInput* m_audio_input = nullptr
protected

◆ m_camera

QCamera* m_camera = nullptr
protected

◆ m_camera_flash_button

Button* m_camera_flash_button
protected

◆ m_capture_session

QMediaCaptureSession* m_capture_session = nullptr
protected

◆ m_devices

QMediaDevices* m_devices = nullptr
protected

◆ m_image_capture

QImageCapture* m_image_capture = nullptr
protected

◆ m_media_recorder

QMediaRecorder* m_media_recorder = nullptr
protected

◆ m_screenshot_location

File m_screenshot_location
protected

◆ m_selection_combo

QCustomComboBox* m_selection_combo
protected

◆ m_video_widget

QVideoWidget* m_video_widget = nullptr
protected

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