24 #ifndef __FIREVISION_UTILS_COMPRESSION_JPEG_COMPRESSOR_MMAL_H_ 25 #define __FIREVISION_UTILS_COMPRESSION_JPEG_COMPRESSOR_MMAL_H_ 27 #ifndef __FIREVISION_UTILS_COMPRESSION_JPEG_COMPRESSOR_H_ 28 # error Do not include jpeg_compressor_mmal.h directly, use jpeg_compressor.h 32 # error Cannot use MMAL JPEG Encoder without MMAL 35 #include <fvutils/compression/imagecompressor.h> 64 void create_encoder_component();
65 void destroy_encoder_component();
68 unsigned char *buffer_;
70 unsigned int quality_;
75 const char *filename_;
virtual void set_image_buffer(colorspace_t cspace, unsigned char *buffer)
Set image buffer to compress.
virtual void set_destination_buffer(unsigned char *buf, unsigned int buf_size)
Set destination buffer (if compressing to memory).
CompressionDestination
Where to put the compressed image.
virtual void compress()
Compress image.
virtual void set_image_dimensions(unsigned int width, unsigned int height)
Set dimensions of image to compress.
virtual size_t recommended_compressed_buffer_size()
Get the recommended size for the compressed buffer.
virtual ~JpegImageCompressorMMAL()
Destructor.
virtual bool supports_vflip()
Check if image compressor can do vflip during compress.
virtual size_t compressed_size()
Get compressed size.
virtual bool supports_compression_destination(ImageCompressor::CompressionDestination cd)
Check if compressor supports desired compression destination.
Image compressor interface.
virtual void set_filename(const char *filename)
Set file name.
JpegImageCompressorMMAL(unsigned int quality=80)
Constructor.
virtual void set_vflip(bool enable)
Enable or disable vflipping.
virtual void set_compression_destination(ImageCompressor::CompressionDestination cd)
Set compression destination.