1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 06:02:21 +01:00

Introduce base Camera class to support alternative camera implementations (#9285)

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
This commit is contained in:
DT-art1
2025-07-07 05:45:00 +02:00
committed by GitHub
parent bdd52dbaa4
commit e49b89a051
27 changed files with 254 additions and 132 deletions

View File

@@ -4,8 +4,8 @@
#include "esphome/core/controller.h"
#include "esphome/core/helpers.h"
#ifdef USE_ESP32_CAMERA
#include "esphome/components/esp32_camera/esp32_camera.h"
#ifdef USE_CAMERA
#include "esphome/components/camera/camera.h"
#endif
namespace esphome {
@@ -48,8 +48,8 @@ class ComponentIterator {
#ifdef USE_API
virtual bool on_service(api::UserServiceDescriptor *service);
#endif
#ifdef USE_ESP32_CAMERA
virtual bool on_camera(esp32_camera::ESP32Camera *camera);
#ifdef USE_CAMERA
virtual bool on_camera(camera::Camera *camera);
#endif
#ifdef USE_CLIMATE
virtual bool on_climate(climate::Climate *climate) = 0;
@@ -125,7 +125,7 @@ class ComponentIterator {
#ifdef USE_API
SERVICE,
#endif
#ifdef USE_ESP32_CAMERA
#ifdef USE_CAMERA
CAMERA,
#endif
#ifdef USE_CLIMATE