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;
96 std::string image_id_;
97 unsigned int quality_;
100 unsigned char *in_buffer_;
108 std::shared_ptr<Buffer> last_buf_;
Thread aspect that allows to obtain the current time from the clock.
Mutex mutual exclusion lock.
Thread class encapsulation of pthreads.
Wait until a given condition holds.
Image buffer passed to stream subscribers.
Buffer(unsigned char *data, size_t size)
Constructor.
size_t size() const
Get buffer size.
const unsigned char * data() const
Get data buffer.
virtual ~Subscriber()
Destructor.
virtual void handle_buffer(std::shared_ptr< Buffer > buffer)=0
Notification if a new buffer is available.
void add_subscriber(Subscriber *subscriber)
Add a subscriber.
virtual void loop()
Code to execute in the thread.
std::shared_ptr< Buffer > wait_for_next_frame()
Blocks caller until new thread is available.
virtual ~WebviewJpegStreamProducer()
Destructor.
virtual void finalize()
Finalize the thread.
virtual void init()
Initialize the thread.
void remove_subscriber(Subscriber *subscriber)
Remove a subscriber.
WebviewJpegStreamProducer(const std::string &image_id, unsigned int quality, float fps, bool vflip)
Constructor.
Fawkes library namespace.