🙏 Working camera stream with p4

This commit is contained in:
Rune Harlyk
2026-02-06 14:20:50 +01:00
committed by Rune Harlyk
parent bf2fd957af
commit d81b1b0851
6 changed files with 426 additions and 86 deletions
+9 -13
View File
@@ -11,26 +11,22 @@
namespace Camera {
#if USE_CAMERA && !CONFIG_IDF_TARGET_ESP32P4
#define USE_DVP_CAMERA (USE_CAMERA && !CONFIG_IDF_TARGET_ESP32P4)
#define USE_CSI_CAMERA (USE_CAMERA && CONFIG_IDF_TARGET_ESP32P4)
#if USE_DVP_CAMERA
#include <esp_camera.h>
#include <peripherals/camera_pins.h>
#else
typedef struct {
uint8_t *buf;
size_t len;
} camera_fb_t;
typedef struct {
} sensor_t;
#endif
#define PART_BOUNDARY "frame"
camera_fb_t *safe_camera_fb_get();
sensor_t *safe_sensor_get();
void safe_sensor_return();
#endif
#define PART_BOUNDARY "frame"
class CameraService
#if USE_CAMERA && !CONFIG_IDF_TARGET_ESP32P4
#if USE_DVP_CAMERA
: public StatefulService<CameraSettings>
#endif
{
@@ -42,7 +38,7 @@ class CameraService
esp_err_t cameraStill(httpd_req_t *request);
esp_err_t cameraStream(httpd_req_t *request);
#if USE_CAMERA && !CONFIG_IDF_TARGET_ESP32P4
#if USE_DVP_CAMERA
StatefulProtoEndpoint<CameraSettings, api_CameraSettings> protoEndpoint;
private: