VideoFrameSource that pulls frames from the ESP32 camera (esp_camera.h, the Arduino-ESP32 "esp32-camera" component) - nextFrame() returns esp_camera_fb_get()'s buffer, releasing the previous frame (esp_camera_fb_return()) first; as with any VideoFrameSource, the returned pointer is only valid until the next nextFrame() call.
More...
#include <CameraFrameSourceESP32.h>
VideoFrameSource that pulls frames from the ESP32 camera (esp_camera.h, the Arduino-ESP32 "esp32-camera" component) - nextFrame() returns esp_camera_fb_get()'s buffer, releasing the previous frame (esp_camera_fb_return()) first; as with any VideoFrameSource, the returned pointer is only valid until the next nextFrame() call.
width/height/fps/format (see videoInfo()) must be configured explicitly
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ CameraFrameSource() [1/2]
◆ CameraFrameSource() [2/2]
- Parameters
-
| info | width/height/fps/format reported by videoInfo() - must match camera_config_t's own frame_size/pixel_format (this class has no lookup table from one to the other). |
◆ begin()
Initializes the camera (esp_camera_init()).
◆ end()
Releases the last captured frame buffer (if any) and deinitializes the camera.
◆ nextFrame()
| const uint8_t * nextFrame |
( |
size_t & |
len | ) |
|
|
inlineoverridevirtual |
Releases the previous frame (if still held), captures a new one via esp_camera_fb_get(), and returns its buffer - nullptr (len 0) if the camera capture failed.
Implements VideoFrameSource.
◆ releaseFrame()
◆ setCameraConfig()
| void setCameraConfig |
( |
camera_config_t |
config | ) |
|
|
inline |
Defines the camera_config_t esp_camera_init() is called with - see the esp32-camera component's own docs for the individual fields. Call before begin().
◆ setVideoInfo()
Defines the width/height/fps/format reported by videoInfo() - see the constructor. Call before begin().
◆ videoInfo()
◆ writeTo()
| bool writeTo |
( |
Print & |
out | ) |
|
|
inlineinherited |
Write the frame to the indicated destination.
◆ cfg
◆ fb
| camera_fb_t* fb = nullptr |
|
protected |
◆ info
The documentation for this class was generated from the following file: