ESPHome 2025.9.0-dev
Loading...
Searching...
No Matches
buffer_impl.cpp
Go to the documentation of this file.
1#include "buffer_impl.h"
2
3namespace esphome::camera {
4
6 this->data_ = this->allocator_.allocate(size);
7 this->size_ = size;
8}
9
11 this->data_ = this->allocator_.allocate(spec->bytes_per_image());
12 this->size_ = spec->bytes_per_image();
13}
14
16 if (this->data_ != nullptr)
17 this->allocator_.deallocate(this->data_, this->size_);
18}
19
20} // namespace esphome::camera
void deallocate(T *p, size_t n)
Definition helpers.h:877
T * allocate(size_t n)
Definition helpers.h:839
RAMAllocator< uint8_t > allocator_
Definition buffer_impl.h:21
Specification of a caputured camera image.
Definition camera.h:69