22 #ifndef _PLUGINS_WEBVIEW_JPEG_STREAM_PRODUCER_H_ 23 #define _PLUGINS_WEBVIEW_JPEG_STREAM_PRODUCER_H_ 25 #include <aspect/clock.h> 26 #include <core/threading/thread.h> 27 #include <core/utils/lock_list.h> 32 namespace firevision {
33 class SharedMemoryCamera;
34 class JpegImageCompressor;
77 virtual void handle_buffer(std::shared_ptr<Buffer> buffer) = 0;
96 std::string image_id_;
97 unsigned int quality_;
100 unsigned char *in_buffer_;
108 std::shared_ptr<Buffer> last_buf_;
virtual void handle_buffer(std::shared_ptr< Buffer > buffer)=0
Notification if a new buffer is available.
virtual ~Subscriber()
Destructor.
Wait until a given condition holds.
Thread aspect that allows to obtain the current time from the clock.
WebviewJpegStreamProducer(const std::string &image_id, unsigned int quality, float fps, bool vflip)
Constructor.
Buffer(unsigned char *data, size_t size)
Constructor.
virtual void finalize()
Finalize the thread.
Fawkes library namespace.
virtual void loop()
Code to execute in the thread.
Thread class encapsulation of pthreads.
Image buffer passed to stream subscribers.
const unsigned char * data() const
Get data buffer.
size_t size() const
Get buffer size.
void remove_subscriber(Subscriber *subscriber)
Remove a subscriber.
virtual ~WebviewJpegStreamProducer()
Destructor.
std::shared_ptr< Buffer > wait_for_next_frame()
Blocks caller until new thread is available.
virtual void init()
Initialize the thread.
Mutex mutual exclusion lock.
void add_subscriber(Subscriber *subscriber)
Add a subscriber.