mirror of
https://github.com/esphome/esphome.git
synced 2024-11-15 03:28:12 +01:00
Fixes to pass test.
This commit is contained in:
parent
8da004362d
commit
b9bb4a7a65
2 changed files with 6 additions and 5 deletions
|
@ -41,9 +41,10 @@ APIConnection::APIConnection(std::unique_ptr<socket::Socket> sock, APIServer *pa
|
|||
#endif
|
||||
|
||||
#ifdef USE_CAMERA
|
||||
if (camera::Camera::global_camera != nullptr)
|
||||
if (camera::Camera::global_camera != nullptr) {
|
||||
this->image_reader_ =
|
||||
std::unique_ptr<camera::CameraImageReader>{camera::Camera::global_camera->create_image_reader()};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
void APIConnection::start() {
|
||||
|
|
|
@ -152,12 +152,12 @@ class ESP32Camera : public Component, public camera::Camera {
|
|||
void dump_config() override;
|
||||
float get_setup_priority() const override;
|
||||
/* public API (specific) */
|
||||
void start_stream(camera::CameraRequester requester);
|
||||
void stop_stream(camera::CameraRequester requester);
|
||||
void request_image(camera::CameraRequester requester);
|
||||
void start_stream(camera::CameraRequester requester) override;
|
||||
void stop_stream(camera::CameraRequester requester) override;
|
||||
void request_image(camera::CameraRequester requester) override;
|
||||
void update_camera_parameters();
|
||||
|
||||
void add_image_callback(std::function<void(std::shared_ptr<camera::CameraImage>)> &&callback);
|
||||
void add_image_callback(std::function<void(std::shared_ptr<camera::CameraImage>)> &&callback) override;
|
||||
void add_stream_start_callback(std::function<void()> &&callback);
|
||||
void add_stream_stop_callback(std::function<void()> &&callback);
|
||||
camera::CameraImageReader *create_image_reader() override;
|
||||
|
|
Loading…
Reference in a new issue