ESPHome 2025.7.1
Loading...
Searching...
No Matches
camera.cpp
Go to the documentation of this file.
1#include "camera.h"
2
3namespace esphome {
4namespace camera {
5
6// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
8
10 if (global_camera != nullptr) {
11 this->status_set_error("Multiple cameras are configured, but only one is supported.");
12 this->mark_failed();
13 return;
14 }
15
16 global_camera = this;
17}
18
20
21} // namespace camera
22} // namespace esphome
virtual void mark_failed()
Mark this component as failed.
void status_set_error(const char *message="unspecified")
Abstract camera base class.
Definition camera.h:57
static Camera * instance()
The singleton instance of the camera implementation.
Definition camera.cpp:19
static Camera * global_camera
Definition camera.h:76
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7