ESPHome 2025.9.0-dev
Loading...
Searching...
No Matches
buffer_impl.h
Go to the documentation of this file.
1#pragma once
2
3#include "buffer.h"
4#include "camera.h"
5
6namespace esphome::camera {
7
10class BufferImpl : public Buffer {
11 public:
12 explicit BufferImpl(size_t size);
13 explicit BufferImpl(CameraImageSpec *spec);
14 // -------- Buffer --------
15 uint8_t *get_data_buffer() override { return data_; }
16 size_t get_data_length() override { return size_; }
17 // ------------------------
18 ~BufferImpl() override;
19
20 protected:
22 size_t size_{};
23 uint8_t *data_{};
24};
25
26} // namespace esphome::camera
An STL allocator that uses SPI or internal RAM.
Definition helpers.h:819
Interface for a generic buffer that stores image data.
Definition buffer.h:9
Default implementation of Buffer Interface.
Definition buffer_impl.h:10
uint8_t * get_data_buffer() override
Definition buffer_impl.h:15
size_t get_data_length() override
Definition buffer_impl.h:16
RAMAllocator< uint8_t > allocator_
Definition buffer_impl.h:21
Specification of a caputured camera image.
Definition camera.h:69