#include <camera.hpp>
◆ begin()
bool esp32cam::CameraClass::begin |
( |
const Config & |
config | ) |
|
Enable camera.
- Returns
- whether success.
◆ capture()
std::unique_ptr< Frame > esp32cam::CameraClass::capture |
( |
| ) |
|
Capture a frame of picture.
- Precondition
- Camera is enabled.
- Returns
- the picture frame, or nullptr on error.
◆ changeResolution()
bool esp32cam::CameraClass::changeResolution |
( |
const Resolution & |
resolution, |
|
|
int |
sleepFor = 500 |
|
) |
| |
Change camera resolution.
- Precondition
- Camera is enabled.
- Parameters
-
resolution | new resolution; must be no higher than initial resolution. |
sleepFor | how long to wait for stabilization (millis). |
- Deprecated:
- Use
update
instead.
◆ end()
bool esp32cam::CameraClass::end |
( |
| ) |
|
Disable camera.
- Returns
- whether success.
◆ listResolutions()
Retrieve list of resolutions (likely) supported by hardware.
- Precondition
- Camera is enabled.
◆ status()
Settings esp32cam::CameraClass::status |
( |
| ) |
const |
Retrieve runtime settings.
- Precondition
- Camera is enabled.
◆ streamMjpeg()
Stream Motion JPEG.
- Precondition
- The camera has been initialized to JPEG mode.
- Returns
- number of frames streamed.
◆ update() [1/2]
template<typename Fn >
std::enable_if_t<std::is_assignable_v<std::function<void(Settings&)>, Fn>, bool> esp32cam::CameraClass::update |
( |
const Fn & |
modifier, |
|
|
int |
sleepFor = 0 |
|
) |
| |
|
inline |
Update runtime settings using modifier function.
- Parameters
-
modifier | function to modify settings. |
sleepFor | how long to wait for stabilization (millis). |
- Precondition
- Camera is enabled.
- Postcondition
- Camera may be left in inconsistent state in case of failure.
- Returns
- whether success.
◆ update() [2/2]
bool esp32cam::CameraClass::update |
( |
const Settings & |
settings, |
|
|
int |
sleepFor = 0 |
|
) |
| |
Update runtime settings.
- Parameters
-
settings | updated settings. |
sleepFor | how long to wait for stabilization (millis). |
- Precondition
- Camera is enabled.
- Postcondition
- Camera may be left in inconsistent state in case of failure.
- Returns
- whether success.
The documentation for this class was generated from the following files:
- /home/runner/work/esp32cam/esp32cam/src/esp32cam/camera.hpp
- /home/runner/work/esp32cam/esp32cam/src/esp32cam/camera.cpp
- /home/runner/work/esp32cam/esp32cam/src/esp32cam/config.cpp