The CameraCapture class handles camera video capturing.
More...
#include <CameraCapture.h>
|
| Q_DISABLE_COPY (CameraCapture) |
| Q_DISABLE_COPY disables copy constructor and assignment operator.
|
|
| CameraCapture (const int index, QObject *parent=nullptr) |
| Constructor with camera index.
|
|
| ~CameraCapture () |
| Destructor.
|
|
void | bind_display_widget (CameraDisplayWidget *widget) |
| Bind a display widget for camera output.
|
|
void | set_capture_delay_time (const int gap_time) |
| Set capture delay time in milliseconds.
|
|
bool | isActivate () const |
| Check if the camera is active.
|
|
bool | start () |
| Start the camera capture session.
|
|
bool | close () |
| Close the camera capture session.
|
|
The CameraCapture class handles camera video capturing.
◆ Error
Error enum lists possible camera error cases.
Enumerator |
---|
CAMERA_UNEXISTED | Camera does not exist.
|
CAMERA_UNOPENED | Camera not opened.
|
CAMERA_UNBIND_DISPLAY | Camera not bound to display widget.
|
CAMERA_MULTI_OPENED | Camera already opened.
|
◆ CameraCapture()
CameraCapture::CameraCapture |
( |
const int |
index, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructor with camera index.
- Parameters
-
index | Valid index of the camera. |
parent | Optional QObject parent. |
◆ bind_display_widget()
Bind a display widget for camera output.
- Parameters
-
◆ cameraClosed
void CameraCapture::cameraClosed |
( |
int |
index | ) |
|
|
signal |
Signal emitted when camera is closed.
- Parameters
-
◆ cameraOpened
void CameraCapture::cameraOpened |
( |
int |
index | ) |
|
|
signal |
Signal emitted when camera is opened.
- Parameters
-
◆ close()
bool CameraCapture::close |
( |
| ) |
|
Close the camera capture session.
- Returns
- True if closed successfully.
◆ errorOccur
Signal emitted when an error occurs.
- Parameters
-
◆ isActivate()
bool CameraCapture::isActivate |
( |
| ) |
const |
Check if the camera is active.
- Returns
- True if active.
◆ set_capture_delay_time()
void CameraCapture::set_capture_delay_time |
( |
const int |
gap_time | ) |
|
|
inline |
Set capture delay time in milliseconds.
- Parameters
-
gap_time | Delay time in ms. |
◆ start()
bool CameraCapture::start |
( |
| ) |
|
Start the camera capture session.
- Returns
- True if started successfully.
The documentation for this class was generated from the following files:
- extern_app/GeneralLocalCamera/Core/CameraCapture.h
- extern_app/GeneralLocalCamera/Core/CameraCapture.cpp