24 #ifndef CAMERA_ARAVIS_CAMERA_BUFFER_POOL
25 #define CAMERA_ARAVIS_CAMERA_BUFFER_POOL
32 #include <boost/weak_ptr.hpp>
33 #include <boost/enable_shared_from_this.hpp>
34 #include <boost/bind.hpp>
35 #include <boost/bind/placeholders.hpp>
37 #include <sensor_msgs/Image.h>
46 class CameraBufferPool :
public boost::enable_shared_from_this<CameraBufferPool>
50 typedef boost::weak_ptr<CameraBufferPool>
WPtr;
58 CameraBufferPool(ArvStream *stream,
size_t payload_size_bytes,
size_t n_preallocated_buffers = 2);
69 sensor_msgs::ImagePtr
operator[](ArvBuffer *buffer);
73 std::lock_guard<std::mutex> lock(
mutex_);
79 std::lock_guard<std::mutex> lock(
mutex_);
96 static void reclaim(
const WPtr &
self, sensor_msgs::Image *p_img);
100 void push(sensor_msgs::Image *p_img);
109 mutable std::mutex
mutex_;