Class ImageBufferPool
Defined in File image_buffer_pool.h
Inheritance Relationships
Base Type
public std::enable_shared_from_this< ImageBufferPool >
Class Documentation
-
class ImageBufferPool : public std::enable_shared_from_this<ImageBufferPool>
-
Public Functions
-
ImageBufferPool(const rclcpp::Logger &logger, ArvStream *stream, size_t payload_size_bytes, size_t n_preallocated_buffers = 2)
-
virtual ~ImageBufferPool()
-
sensor_msgs::msg::Image::SharedPtr getRecyclableImg()
-
sensor_msgs::msg::Image::SharedPtr operator[](ArvBuffer *buffer)
-
inline size_t getAllocatedSize() const
-
inline size_t getUsedSize() const
-
inline size_t getPayloadSize() const
-
void allocateBuffers(size_t n = 1)
Protected Functions
-
void push(sensor_msgs::msg::Image *p_img)
Protected Attributes
-
ArvStream *stream_ = NULL
-
size_t payload_size_bytes_ = 0
-
size_t n_buffers_ = 0
-
std::map<const uint8_t*, sensor_msgs::msg::Image::SharedPtr> available_img_buffers_
-
std::map<sensor_msgs::msg::Image*, ArvBuffer*> used_buffers_
-
std::stack<sensor_msgs::msg::Image::SharedPtr> dangling_imgs_
-
mutable std::mutex mutex_
-
rclcpp::Logger logger_
-
ImageBufferPool(const rclcpp::Logger &logger, ArvStream *stream, size_t payload_size_bytes, size_t n_preallocated_buffers = 2)