mirror of
https://github.com/esphome/esphome.git
synced 2025-10-24 04:33:49 +01:00
Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: J. Nick Koston <nick@home-assistant.io> Co-authored-by: J. Nick Koston <nick+github@koston.org>
19 lines
411 B
C++
19 lines
411 B
C++
#pragma once
|
|
|
|
#include <cinttypes>
|
|
#include <cstddef>
|
|
|
|
namespace esphome::camera {
|
|
|
|
/// Interface for a generic buffer that stores image data.
|
|
class Buffer {
|
|
public:
|
|
/// Returns a pointer to the buffer's data.
|
|
virtual uint8_t *get_data_buffer() = 0;
|
|
/// Returns the length of the buffer in bytes.
|
|
virtual size_t get_data_length() = 0;
|
|
virtual ~Buffer() = default;
|
|
};
|
|
|
|
} // namespace esphome::camera
|