ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
esphome::esp32_camera::ESP32Camera Class Referencefinal

#include <esp32_camera.h>

Inheritance diagram for esphome::esp32_camera::ESP32Camera:
esphome::camera::Camera esphome::EntityBase esphome::Component

Data Structures

struct  Window
 A rectangle, with (0, 0) at the top left, in the pixels of whatever it is measured against. More...
 

Public Member Functions

 ESP32Camera ()
 
void set_data_pins (std::array< uint8_t, 8 > pins)
 
void set_vsync_pin (uint8_t pin)
 
void set_href_pin (uint8_t pin)
 
void set_pixel_clock_pin (uint8_t pin)
 
void set_external_clock (uint8_t pin, uint32_t frequency)
 
void set_i2c_pins (uint8_t sda, uint8_t scl)
 
void set_i2c_id (i2c::InternalI2CBus *i2c_bus)
 
void set_reset_pin (uint8_t pin)
 
void set_power_down_pin (uint8_t pin)
 
void set_pixel_format (ESP32CameraPixelFormat format)
 
void set_frame_size (ESP32CameraFrameSize size)
 
void set_jpeg_quality (uint8_t quality)
 
void set_vertical_flip (bool vertical_flip)
 
void set_horizontal_mirror (bool horizontal_mirror)
 
void set_contrast (int contrast)
 
void set_brightness (int brightness)
 
void set_saturation (int saturation)
 
void set_special_effect (ESP32SpecialEffect effect)
 
void set_aec_mode (ESP32GainControlMode mode)
 
void set_aec2 (bool aec2)
 
void set_ae_level (int ae_level)
 
void set_aec_value (uint32_t aec_value)
 
void set_agc_mode (ESP32GainControlMode mode)
 
void set_agc_value (uint8_t agc_value)
 
void set_agc_gain_ceiling (ESP32AgcGainCeiling gain_ceiling)
 
void set_wb_mode (ESP32WhiteBalanceMode mode)
 
void set_test_pattern (bool test_pattern)
 
void set_max_update_interval (uint32_t max_update_interval)
 
void set_idle_update_interval (uint32_t idle_update_interval)
 
void set_frame_buffer_mode (camera_grab_mode_t mode)
 
void set_frame_buffer_count (uint8_t fb_count)
 
void set_frame_buffer_location (camera_fb_location_t fb_location)
 
void set_capture_delay (uint16_t capture_delay)
 
template<typename F >
void add_on_capture_callback (F &&callback)
 Called with true on capture start and false on capture end.
 
void setup () override
 
void loop () override
 
void dump_config () override
 
void on_shutdown () override
 
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 ()
 
bool set_window (int offset_x, int offset_y, int width, int height)
 Read out the given rectangle of the frame, replacing any previous window.
 
bool reset_window ()
 Read out the whole sensor again; changing the frame size does the same.
 
bool supports_window () const
 True when the sensor takes a window in the configured pixel format; meant for lambdas.
 
void set_initial_window (int offset_x, int offset_y, int width, int height)
 Window to apply at the end of setup(), in frame pixels.
 
void add_listener (camera::CameraListener *listener) override
 Add a listener to receive camera events.
 
camera::CameraImageReader * create_image_reader () override
 
- Public Member Functions inherited from esphome::camera::Camera
 Camera ()
 
virtual ~Camera ()
 
- Public Member Functions inherited from esphome::EntityBase
 ESPDEPRECATED ("Use get_name_to() or get_log_name() instead. Will be removed in ESPHome 2027.5.0", "2026.11.0") const StringRef &get_name() const
 The name is in flash here; the first call makes a RAM copy that is kept for the life of the device.
 
StringRef get_name_to (std::span< char, ENTITY_NAME_BUF_SIZE > buffer) const
 Get the name of this Entity, copied out of flash into buffer.
 
 ESPDEPRECATED ("Use get_name_to() or get_log_name() instead. Will be removed in ESPHome 2027.5.0", "2026.11.0") const StringRef &get_name() const
 
const StringRef & get_name_to (std::span< char, ENTITY_NAME_BUF_SIZE >) const
 
bool name_equals (const StringRef &other) const
 
const ProgmemStringRef & get_name_progmem () const
 The name as stored, for consumers that read flash themselves (e.g. API progmem fields).
 
size_t write_name_to (char *buf, size_t buf_size) const
 Copy the name into buf (null terminated), returns its length.
 
const LogString * get_log_name () const
 Get the name for a "%s" log argument (LOG_STR_ARG).
 
bool has_own_name () const
 
uint32_t get_object_id_hash () const
 
StringRef get_object_id_to (std::span< char, OBJECT_ID_MAX_LEN > buf) const
 Get object_id with zero heap allocation For static case: returns StringRef to internal storage (buffer unused) For dynamic case: formats into buffer and returns StringRef to buffer.
 
size_t write_object_id_to (char *buf, size_t buf_size) const
 Write object_id directly to buffer, returns length written (excluding null) Useful for building compound strings without intermediate buffer.
 
bool is_internal () const
 
void set_internal (bool internal)
 
bool is_disabled_by_default () const
 
EntityCategory get_entity_category () const
 
const char * get_device_class_to (std::span< char, MAX_DEVICE_CLASS_LENGTH > buffer) const
 
ProgmemStringRef get_device_class_progmem () const
 The device class as stored (in flash on ESP8266), for consumers that read flash themselves.
 
StringRef get_unit_of_measurement_ref () const
 
const char * get_icon_to (std::span< char, MAX_ICON_LENGTH > buffer) const
 
ProgmemStringRef get_icon_progmem () const
 The icon as stored (in flash on ESP8266), for consumers that read flash themselves.
 
uint32_t get_device_id () const
 
Device * get_device () const
 
bool has_state () const
 
void set_has_state (bool state)
 
 ESPDEPRECATED ("Use make_entity_preference<T>() instead, or preferences won't be migrated. " "See https://github.com/esphome/backlog/issues/85. Will be removed in 2027.1.0.", "2026.7.0") uint32_t get_preference_hash()
 Get a unique hash for storing preferences/settings for this entity.
 
template<typename T >
ESPPreferenceObject make_entity_preference (uint32_t version=0)
 Create a preference object for storing this entity's state/settings.
 
template<typename T >
ESPPreferenceObject make_entity_preference (uint32_t version, bool in_flash)
 As make_entity_preference(), stored in flash or RTC memory where the backend supports the choice.
 
- Public Member Functions inherited from esphome::Component
virtual float get_setup_priority () const
 priority of setup().
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
void call ()
 
virtual void on_safe_shutdown ()
 
virtual bool teardown ()
 Called during teardown to allow component to gracefully finish operations.
 
virtual void on_powerdown ()
 Called last before a reboot or deep sleep to power down hardware.
 
uint8_t get_component_state () const
 
void reset_to_construction_state ()
 Reset this component back to the construction state to allow setup to run again.
 
bool is_in_loop_state () const
 Check if this component has completed setup and is in the loop state.
 
bool is_idle () const
 Check if this component is idle.
 
void mark_failed ()
 Mark this component as failed.
 
void mark_failed (const LogString *message)
 
bool ESPHOME_ALWAYS_INLINE setup_check (bool ok)
 Marks the component failed with message (default "Communication failed") unless ok; returns ok.
 
bool ESPHOME_ALWAYS_INLINE setup_check (bool ok, const LogString *message)
 
void disable_loop ()
 Disable this component's loop.
 
void enable_loop ()
 Enable this component's loop.
 
void enable_loop_soon_any_context ()
 Thread and ISR-safe version of enable_loop() that can be called from any context.
 
bool is_failed () const
 
bool is_ready () const
 
virtual bool can_proceed ()
 
bool status_has_warning () const
 
bool status_has_error () const
 
void status_set_warning ()
 
void status_set_warning (const char *message)
 
void status_set_warning (const LogString *message)
 
bool status_comm_result (bool ok)
 Clears the warning when ok, else sets it with message (default "Communication failed"); returns ok.
 
bool status_comm_result (bool ok, const LogString *message)
 
void status_set_error ()
 
void status_set_error (const LogString *message)
 
void status_clear_warning ()
 
void status_clear_error ()
 
 ESPDEPRECATED ("Use status_momentary_warning() without a name. Removed in 2027.5.0", "2026.11.0") void status_momentary_warning(const char *name
 
void status_momentary_warning (uint32_t length=5000)
 Set warning status flag and clear it after length ms.
 
void status_momentary_warning (const LogString *message, uint32_t length=5000)
 
 ESPDEPRECATED ("Use status_momentary_error() without a name. Removed in 2027.5.0", "2026.11.0") void status_momentary_error(const char *name
 
void status_momentary_error (uint32_t length=5000)
 Set error status flag and clear it after length ms.
 
void status_momentary_error (const LogString *message, uint32_t length=5000)
 
bool has_overridden_loop () const
 
const LogString * get_component_log_str () const ESPHOME_ALWAYS_INLINE
 Get the integration where this component was declared as a LogString for logging.
 
bool should_warn_of_blocking (uint32_t blocking_time, uint32_t &threshold_ms_out)
 

Protected Member Functions

bool has_requested_image_ () const
 
bool can_return_image_ () const
 
void cancel_capture_ ()
 
bool advance_capture_ (uint32_t now, uint8_t requesters)
 
bool advance_capture_with_frame_ (const camera_fb_t *fb)
 
void end_capture_ ()
 
void finish_ended_capture_ ()
 
void apply_window_ ()
 
void dump_window_config_ (sensor_t *sensor)
 
sensor_t * window_sensor_ () const
 
- Protected Member Functions inherited from esphome::EntityBase
friend void::setup ()
 
friend void::original_setup ()
 
void configure_entity_ (const char *name, uint32_t object_id_hash, uint32_t entity_fields)
 Combined entity setup from codegen: set name, object_id hash, entity string indices, and flags.
 
void set_device_ (Device *device)
 
ESPPreferenceObject make_entity_preference_ (size_t size, uint32_t version)
 Non-template helpers for make_entity_preference() to avoid code bloat.
 
ESPPreferenceObject make_entity_preference_ (size_t size, uint32_t version, bool in_flash)
 
uint32_t entity_preference_key_ (uint32_t version)
 Key for both helpers; preference hash migration goes here.
 
- Protected Member Functions inherited from esphome::Component
friend void::setup ()
 
friend void::original_setup ()
 
void set_component_source_ (uint8_t index)
 Set where this component was loaded from for some debug messages.
 
virtual void call_setup ()
 
void call_dump_config_ ()
 
void enable_loop_slow_path_ ()
 
void set_component_state_ (uint8_t state)
 Helper to set component state (clears state bits and sets new state)
 
bool set_status_flag_ (uint8_t flag)
 Helper to set a status LED flag on both this component and the app.
 
bool set_error_flag_ (const LogString *message)
 Set the error flag and log it; true when it was not set before.
 
void set_interval (const char *name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a const char* name.
 
void set_interval (uint32_t id, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a numeric ID (zero heap allocation).
 
void set_interval (InternalSchedulerID id, uint32_t interval, std::function< void()> &&f)
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const char *name)
 Cancel an interval function.
 
bool cancel_interval (uint32_t id)
 
bool cancel_interval (InternalSchedulerID id)
 
void set_timeout (const char *name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a const char* name.
 
void set_timeout (uint32_t id, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a numeric ID (zero heap allocation).
 
void set_timeout (InternalSchedulerID id, uint32_t timeout, std::function< void()> &&f)
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const char *name)
 Cancel a timeout function.
 
bool cancel_timeout (uint32_t id)
 
bool cancel_timeout (InternalSchedulerID id)
 
void defer (const char *name, std::function< void()> &&f)
 Defer a callback to the next loop() call with a const char* name.
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call.
 
void defer (uint32_t id, std::function< void()> &&f)
 Defer a callback with a numeric ID (zero heap allocation)
 
bool cancel_defer (const char *name)
 Cancel a defer callback using the specified name, name must not be empty.
 
bool cancel_defer (uint32_t id)
 
void status_clear_warning_slow_path_ ()
 
void status_clear_error_slow_path_ ()
 

Static Protected Member Functions

static void framebuffer_task (void *pv)
 

Protected Attributes

Window window_ {}
 
camera_config_t config_ {}
 
bool vertical_flip_ {true}
 
bool horizontal_mirror_ {true}
 
int contrast_ {0}
 
int brightness_ {0}
 
int saturation_ {0}
 
ESP32SpecialEffect special_effect_ {ESP32_SPECIAL_EFFECT_NONE}
 
ESP32GainControlMode aec_mode_ {ESP32_GC_MODE_AUTO}
 
bool aec2_ {false}
 
int ae_level_ {0}
 
uint32_t aec_value_ {300}
 
ESP32GainControlMode agc_mode_ {ESP32_GC_MODE_AUTO}
 
uint8_t agc_value_ {0}
 
ESP32AgcGainCeiling agc_gain_ceiling_ {ESP32_GAINCEILING_2X}
 
ESP32WhiteBalanceMode wb_mode_ {ESP32_WB_MODE_AUTO}
 
bool test_pattern_ {false}
 
uint32_t max_update_interval_ {1000}
 
uint32_t idle_update_interval_ {15000}
 
esp_err_t init_error_ {ESP_OK}
 
std::shared_ptr< ESP32CameraImage > current_image_
 
std::atomic< uint8_t > single_requesters_ {0}
 
std::atomic< uint8_t > stream_requesters_ {0}
 
QueueHandle_t framebuffer_get_queue_
 
QueueHandle_t framebuffer_return_queue_
 
std::vector< camera::CameraListener * > listeners_
 
uint32_t last_idle_request_ {0}
 
uint32_t last_update_ {0}
 
uint32_t last_log_time_ {0}
 
uint16_t frame_count_ {0}
 
i2c::InternalI2CBus * i2c_bus_ {nullptr}
 
LazyCallbackManager< void(bool)> capture_callback_ {}
 
uint32_t capture_started_ {0}
 
uint32_t capture_ready_ms_ {0}
 
uint16_t capture_delay_ {0}
 
CaptureState capture_state_ {CaptureState::CAPTURE_STATE_IDLE}
 
RAMAllocator< camera_fb_t > fb_allocator_ {RAMAllocator<camera_fb_t>::ALLOC_INTERNAL}
 
- Protected Attributes inherited from esphome::EntityBase
ProgmemStringRef name_
 
uint32_t object_id_hash_ {}
 
Device * device_ {}
 
struct esphome::EntityBase::EntityFlags flags_
 
uint8_t device_class_idx_ {}
 
uint8_t uom_idx_ {}
 
uint8_t icon_idx_ {}
 
- Protected Attributes inherited from esphome::Component
uint8_t component_source_index_ {0}
 Index into component source PROGMEM lookup table (0 = not set)
 
uint8_t warn_if_blocking_over_ {WARN_IF_BLOCKING_OVER_CS}
 Warn threshold in centiseconds (max 2550ms)
 
uint8_t component_state_ {0x00}
 State of this component - each bit has a purpose: Bits 0-2: Component state (0x00=CONSTRUCTION, 0x01=SETUP, 0x02=LOOP, 0x03=FAILED, 0x04=LOOP_DONE) Bit 3: STATUS_LED_WARNING Bit 4: STATUS_LED_ERROR Bit 5: Has overridden loop() (set at registration time) Bits 6-7: Unused - reserved for future expansion.
 
volatile bool pending_enable_loop_ {false}
 ISR-safe flag for enable_loop_soon_any_context.
 
ComponentRuntimeStats runtime_stats_
 

Additional Inherited Members

- Static Public Member Functions inherited from esphome::camera::Camera
static Camera * instance ()
 The singleton instance of the camera implementation.
 
- Data Fields inherited from esphome::Component
uint32_t length = 5000)
 
- Static Protected Attributes inherited from esphome::camera::Camera
static Camera * global_camera = nullptr
 

Detailed Description

Definition at line 131 of file esp32_camera.h.

Constructor & Destructor Documentation

◆ ESP32Camera()

esphome::esp32_camera::ESP32Camera::ESP32Camera ( )

Definition at line 336 of file esp32_camera.cpp.

Member Function Documentation

◆ add_listener()

void esphome::esp32_camera::ESP32Camera::add_listener ( camera::CameraListener * listener)
inlineoverridevirtual

Add a listener to receive camera events.

Implements esphome::camera::Camera.

Definition at line 228 of file esp32_camera.h.

◆ add_on_capture_callback()

template<typename F >
void esphome::esp32_camera::ESP32Camera::add_on_capture_callback ( F && callback)
inline

Called with true on capture start and false on capture end.

Definition at line 182 of file esp32_camera.h.

◆ advance_capture_()

bool esphome::esp32_camera::ESP32Camera::advance_capture_ ( uint32_t now,
uint8_t requesters )
protected

Definition at line 551 of file esp32_camera.cpp.

◆ advance_capture_with_frame_()

bool esphome::esp32_camera::ESP32Camera::advance_capture_with_frame_ ( const camera_fb_t * fb)
protected

Definition at line 586 of file esp32_camera.cpp.

◆ apply_window_()

void esphome::esp32_camera::ESP32Camera::apply_window_ ( )
protected

Definition at line 339 of file esp32_camera_window.cpp.

◆ can_return_image_()

bool esphome::esp32_camera::ESP32Camera::can_return_image_ ( ) const
protected

Definition at line 543 of file esp32_camera.cpp.

◆ cancel_capture_()

void esphome::esp32_camera::ESP32Camera::cancel_capture_ ( )
protected

Definition at line 545 of file esp32_camera.cpp.

◆ create_image_reader()

camera::CameraImageReader * esphome::esp32_camera::ESP32Camera::create_image_reader ( )
overridevirtual

Implements esphome::camera::Camera.

Definition at line 509 of file esp32_camera.cpp.

◆ dump_config()

void esphome::esp32_camera::ESP32Camera::dump_config ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 126 of file esp32_camera.cpp.

◆ dump_window_config_()

void esphome::esp32_camera::ESP32Camera::dump_window_config_ ( sensor_t * sensor)
protected

Definition at line 345 of file esp32_camera_window.cpp.

◆ end_capture_()

void esphome::esp32_camera::ESP32Camera::end_capture_ ( )
protected

Definition at line 600 of file esp32_camera.cpp.

◆ finish_ended_capture_()

void esphome::esp32_camera::ESP32Camera::finish_ended_capture_ ( )
protected

Definition at line 606 of file esp32_camera.cpp.

◆ framebuffer_task()

void esphome::esp32_camera::ESP32Camera::framebuffer_task ( void * pv)
staticprotected

Definition at line 612 of file esp32_camera.cpp.

◆ has_requested_image_()

bool esphome::esp32_camera::ESP32Camera::has_requested_image_ ( ) const
protected

Definition at line 542 of file esp32_camera.cpp.

◆ loop()

void esphome::esp32_camera::ESP32Camera::loop ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 196 of file esp32_camera.cpp.

◆ on_shutdown()

void esphome::esp32_camera::ESP32Camera::on_shutdown ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 610 of file esp32_camera.cpp.

◆ request_image()

void esphome::esp32_camera::ESP32Camera::request_image ( camera::CameraRequester requester)
overridevirtual

Implements esphome::camera::Camera.

Definition at line 508 of file esp32_camera.cpp.

◆ reset_window()

bool esphome::esp32_camera::ESP32Camera::reset_window ( )

Read out the whole sensor again; changing the frame size does the same.

Definition at line 415 of file esp32_camera_window.cpp.

◆ set_ae_level()

void esphome::esp32_camera::ESP32Camera::set_ae_level ( int ae_level)
inline

Definition at line 161 of file esp32_camera.h.

◆ set_aec2()

void esphome::esp32_camera::ESP32Camera::set_aec2 ( bool aec2)
inline

Definition at line 160 of file esp32_camera.h.

◆ set_aec_mode()

void esphome::esp32_camera::ESP32Camera::set_aec_mode ( ESP32GainControlMode mode)
inline

Definition at line 159 of file esp32_camera.h.

◆ set_aec_value()

void esphome::esp32_camera::ESP32Camera::set_aec_value ( uint32_t aec_value)
inline

Definition at line 162 of file esp32_camera.h.

◆ set_agc_gain_ceiling()

void esphome::esp32_camera::ESP32Camera::set_agc_gain_ceiling ( ESP32AgcGainCeiling gain_ceiling)
inline

Definition at line 166 of file esp32_camera.h.

◆ set_agc_mode()

void esphome::esp32_camera::ESP32Camera::set_agc_mode ( ESP32GainControlMode mode)
inline

Definition at line 164 of file esp32_camera.h.

◆ set_agc_value()

void esphome::esp32_camera::ESP32Camera::set_agc_value ( uint8_t agc_value)
inline

Definition at line 165 of file esp32_camera.h.

◆ set_brightness()

void esphome::esp32_camera::ESP32Camera::set_brightness ( int brightness)
inline

Definition at line 155 of file esp32_camera.h.

◆ set_capture_delay()

void esphome::esp32_camera::ESP32Camera::set_capture_delay ( uint16_t capture_delay)
inline

Definition at line 180 of file esp32_camera.h.

◆ set_contrast()

void esphome::esp32_camera::ESP32Camera::set_contrast ( int contrast)
inline

Definition at line 154 of file esp32_camera.h.

◆ set_data_pins()

void esphome::esp32_camera::ESP32Camera::set_data_pins ( std::array< uint8_t, 8 > pins)

Definition at line 352 of file esp32_camera.cpp.

◆ set_external_clock()

void esphome::esp32_camera::ESP32Camera::set_external_clock ( uint8_t pin,
uint32_t frequency )

Definition at line 365 of file esp32_camera.cpp.

◆ set_frame_buffer_count()

void esphome::esp32_camera::ESP32Camera::set_frame_buffer_count ( uint8_t fb_count)

Definition at line 487 of file esp32_camera.cpp.

◆ set_frame_buffer_location()

void esphome::esp32_camera::ESP32Camera::set_frame_buffer_location ( camera_fb_location_t fb_location)

Definition at line 491 of file esp32_camera.cpp.

◆ set_frame_buffer_mode()

void esphome::esp32_camera::ESP32Camera::set_frame_buffer_mode ( camera_grab_mode_t mode)

Definition at line 486 of file esp32_camera.cpp.

◆ set_frame_size()

void esphome::esp32_camera::ESP32Camera::set_frame_size ( ESP32CameraFrameSize size)

Definition at line 384 of file esp32_camera.cpp.

◆ set_horizontal_mirror()

void esphome::esp32_camera::ESP32Camera::set_horizontal_mirror ( bool horizontal_mirror)
inline

Definition at line 153 of file esp32_camera.h.

◆ set_href_pin()

void esphome::esp32_camera::ESP32Camera::set_href_pin ( uint8_t pin)

Definition at line 363 of file esp32_camera.cpp.

◆ set_i2c_id()

void esphome::esp32_camera::ESP32Camera::set_i2c_id ( i2c::InternalI2CBus * i2c_bus)

Definition at line 374 of file esp32_camera.cpp.

◆ set_i2c_pins()

void esphome::esp32_camera::ESP32Camera::set_i2c_pins ( uint8_t sda,
uint8_t scl )

Definition at line 369 of file esp32_camera.cpp.

◆ set_idle_update_interval()

void esphome::esp32_camera::ESP32Camera::set_idle_update_interval ( uint32_t idle_update_interval)

Definition at line 482 of file esp32_camera.cpp.

◆ set_initial_window()

void esphome::esp32_camera::ESP32Camera::set_initial_window ( int offset_x,
int offset_y,
int width,
int height )
inline

Window to apply at the end of setup(), in frame pixels.

Definition at line 222 of file esp32_camera.h.

◆ set_jpeg_quality()

void esphome::esp32_camera::ESP32Camera::set_jpeg_quality ( uint8_t quality)

Definition at line 473 of file esp32_camera.cpp.

◆ set_max_update_interval()

void esphome::esp32_camera::ESP32Camera::set_max_update_interval ( uint32_t max_update_interval)

Definition at line 479 of file esp32_camera.cpp.

◆ set_pixel_clock_pin()

void esphome::esp32_camera::ESP32Camera::set_pixel_clock_pin ( uint8_t pin)

Definition at line 364 of file esp32_camera.cpp.

◆ set_pixel_format()

void esphome::esp32_camera::ESP32Camera::set_pixel_format ( ESP32CameraPixelFormat format)

Definition at line 442 of file esp32_camera.cpp.

◆ set_power_down_pin()

void esphome::esp32_camera::ESP32Camera::set_power_down_pin ( uint8_t pin)

Definition at line 381 of file esp32_camera.cpp.

◆ set_reset_pin()

void esphome::esp32_camera::ESP32Camera::set_reset_pin ( uint8_t pin)

Definition at line 380 of file esp32_camera.cpp.

◆ set_saturation()

void esphome::esp32_camera::ESP32Camera::set_saturation ( int saturation)
inline

Definition at line 156 of file esp32_camera.h.

◆ set_special_effect()

void esphome::esp32_camera::ESP32Camera::set_special_effect ( ESP32SpecialEffect effect)
inline

Definition at line 157 of file esp32_camera.h.

◆ set_test_pattern()

void esphome::esp32_camera::ESP32Camera::set_test_pattern ( bool test_pattern)
inline

Definition at line 170 of file esp32_camera.h.

◆ set_vertical_flip()

void esphome::esp32_camera::ESP32Camera::set_vertical_flip ( bool vertical_flip)
inline

Definition at line 152 of file esp32_camera.h.

◆ set_vsync_pin()

void esphome::esp32_camera::ESP32Camera::set_vsync_pin ( uint8_t pin)

Definition at line 362 of file esp32_camera.cpp.

◆ set_wb_mode()

void esphome::esp32_camera::ESP32Camera::set_wb_mode ( ESP32WhiteBalanceMode mode)
inline

Definition at line 168 of file esp32_camera.h.

◆ set_window()

bool esphome::esp32_camera::ESP32Camera::set_window ( int offset_x,
int offset_y,
int width,
int height )

Read out the given rectangle of the frame, replacing any previous window.

Only the OV2640, OV3660, OV5640, SC101IOT and SC030IOT take a window. The window is clamped to the frame. Returns false when the sensor takes no window or rejects the settings.

Definition at line 384 of file esp32_camera_window.cpp.

◆ setup()

void esphome::esp32_camera::ESP32Camera::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 91 of file esp32_camera.cpp.

◆ start_stream()

void esphome::esp32_camera::ESP32Camera::start_stream ( camera::CameraRequester requester)
overridevirtual

Implements esphome::camera::Camera.

Definition at line 496 of file esp32_camera.cpp.

◆ stop_stream()

void esphome::esp32_camera::ESP32Camera::stop_stream ( camera::CameraRequester requester)
overridevirtual

Implements esphome::camera::Camera.

Definition at line 502 of file esp32_camera.cpp.

◆ supports_window()

bool esphome::esp32_camera::ESP32Camera::supports_window ( ) const

True when the sensor takes a window in the configured pixel format; meant for lambdas.

Definition at line 429 of file esp32_camera_window.cpp.

◆ update_camera_parameters()

void esphome::esp32_camera::ESP32Camera::update_camera_parameters ( )

Definition at line 510 of file esp32_camera.cpp.

◆ window_sensor_()

sensor_t * esphome::esp32_camera::ESP32Camera::window_sensor_ ( ) const
protected

Definition at line 434 of file esp32_camera_window.cpp.

Field Documentation

◆ ae_level_

int esphome::esp32_camera::ESP32Camera::ae_level_ {0}
protected

Definition at line 267 of file esp32_camera.h.

◆ aec2_

bool esphome::esp32_camera::ESP32Camera::aec2_ {false}
protected

Definition at line 266 of file esp32_camera.h.

◆ aec_mode_

ESP32GainControlMode esphome::esp32_camera::ESP32Camera::aec_mode_ {ESP32_GC_MODE_AUTO}
protected

Definition at line 265 of file esp32_camera.h.

◆ aec_value_

uint32_t esphome::esp32_camera::ESP32Camera::aec_value_ {300}
protected

Definition at line 268 of file esp32_camera.h.

◆ agc_gain_ceiling_

ESP32AgcGainCeiling esphome::esp32_camera::ESP32Camera::agc_gain_ceiling_ {ESP32_GAINCEILING_2X}
protected

Definition at line 272 of file esp32_camera.h.

◆ agc_mode_

ESP32GainControlMode esphome::esp32_camera::ESP32Camera::agc_mode_ {ESP32_GC_MODE_AUTO}
protected

Definition at line 270 of file esp32_camera.h.

◆ agc_value_

uint8_t esphome::esp32_camera::ESP32Camera::agc_value_ {0}
protected

Definition at line 271 of file esp32_camera.h.

◆ brightness_

int esphome::esp32_camera::ESP32Camera::brightness_ {0}
protected

Definition at line 261 of file esp32_camera.h.

◆ capture_callback_

LazyCallbackManager<void(bool)> esphome::esp32_camera::ESP32Camera::capture_callback_ {}
protected

Definition at line 299 of file esp32_camera.h.

◆ capture_delay_

uint16_t esphome::esp32_camera::ESP32Camera::capture_delay_ {0}
protected

Definition at line 302 of file esp32_camera.h.

◆ capture_ready_ms_

uint32_t esphome::esp32_camera::ESP32Camera::capture_ready_ms_ {0}
protected

Definition at line 301 of file esp32_camera.h.

◆ capture_started_

uint32_t esphome::esp32_camera::ESP32Camera::capture_started_ {0}
protected

Definition at line 300 of file esp32_camera.h.

◆ capture_state_

CaptureState esphome::esp32_camera::ESP32Camera::capture_state_ {CaptureState::CAPTURE_STATE_IDLE}
protected

Definition at line 303 of file esp32_camera.h.

◆ config_

camera_config_t esphome::esp32_camera::ESP32Camera::config_ {}
protected

Definition at line 256 of file esp32_camera.h.

◆ contrast_

int esphome::esp32_camera::ESP32Camera::contrast_ {0}
protected

Definition at line 260 of file esp32_camera.h.

◆ current_image_

std::shared_ptr<ESP32CameraImage> esphome::esp32_camera::ESP32Camera::current_image_
protected

Definition at line 282 of file esp32_camera.h.

◆ fb_allocator_

RAMAllocator<camera_fb_t> esphome::esp32_camera::ESP32Camera::fb_allocator_ {RAMAllocator<camera_fb_t>::ALLOC_INTERNAL}
protected

Definition at line 305 of file esp32_camera.h.

◆ frame_count_

uint16_t esphome::esp32_camera::ESP32Camera::frame_count_ {0}
protected

Definition at line 293 of file esp32_camera.h.

◆ framebuffer_get_queue_

QueueHandle_t esphome::esp32_camera::ESP32Camera::framebuffer_get_queue_
protected

Definition at line 285 of file esp32_camera.h.

◆ framebuffer_return_queue_

QueueHandle_t esphome::esp32_camera::ESP32Camera::framebuffer_return_queue_
protected

Definition at line 286 of file esp32_camera.h.

◆ horizontal_mirror_

bool esphome::esp32_camera::ESP32Camera::horizontal_mirror_ {true}
protected

Definition at line 259 of file esp32_camera.h.

◆ i2c_bus_

i2c::InternalI2CBus* esphome::esp32_camera::ESP32Camera::i2c_bus_ {nullptr}
protected

Definition at line 296 of file esp32_camera.h.

◆ idle_update_interval_

uint32_t esphome::esp32_camera::ESP32Camera::idle_update_interval_ {15000}
protected

Definition at line 279 of file esp32_camera.h.

◆ init_error_

esp_err_t esphome::esp32_camera::ESP32Camera::init_error_ {ESP_OK}
protected

Definition at line 281 of file esp32_camera.h.

◆ last_idle_request_

uint32_t esphome::esp32_camera::ESP32Camera::last_idle_request_ {0}
protected

Definition at line 289 of file esp32_camera.h.

◆ last_log_time_

uint32_t esphome::esp32_camera::ESP32Camera::last_log_time_ {0}
protected

Definition at line 292 of file esp32_camera.h.

◆ last_update_

uint32_t esphome::esp32_camera::ESP32Camera::last_update_ {0}
protected

Definition at line 290 of file esp32_camera.h.

◆ listeners_

std::vector<camera::CameraListener *> esphome::esp32_camera::ESP32Camera::listeners_
protected

Definition at line 287 of file esp32_camera.h.

◆ max_update_interval_

uint32_t esphome::esp32_camera::ESP32Camera::max_update_interval_ {1000}
protected

Definition at line 278 of file esp32_camera.h.

◆ saturation_

int esphome::esp32_camera::ESP32Camera::saturation_ {0}
protected

Definition at line 262 of file esp32_camera.h.

◆ single_requesters_

std::atomic<uint8_t> esphome::esp32_camera::ESP32Camera::single_requesters_ {0}
protected

Definition at line 283 of file esp32_camera.h.

◆ special_effect_

ESP32SpecialEffect esphome::esp32_camera::ESP32Camera::special_effect_ {ESP32_SPECIAL_EFFECT_NONE}
protected

Definition at line 263 of file esp32_camera.h.

◆ stream_requesters_

std::atomic<uint8_t> esphome::esp32_camera::ESP32Camera::stream_requesters_ {0}
protected

Definition at line 284 of file esp32_camera.h.

◆ test_pattern_

bool esphome::esp32_camera::ESP32Camera::test_pattern_ {false}
protected

Definition at line 276 of file esp32_camera.h.

◆ vertical_flip_

bool esphome::esp32_camera::ESP32Camera::vertical_flip_ {true}
protected

Definition at line 258 of file esp32_camera.h.

◆ wb_mode_

ESP32WhiteBalanceMode esphome::esp32_camera::ESP32Camera::wb_mode_ {ESP32_WB_MODE_AUTO}
protected

Definition at line 274 of file esp32_camera.h.

◆ window_

Window esphome::esp32_camera::ESP32Camera::window_ {}
protected

Definition at line 251 of file esp32_camera.h.


The documentation for this class was generated from the following files: