Fawkes API  Fawkes Development Version

FUSE image content. More...

#include <>>

Inheritance diagram for firevision::FuseImageContent:

List of all members.

Public Member Functions

 FuseImageContent (SharedMemoryImageBuffer *b)
 Constructor.
 FuseImageContent (uint32_t type, void *payload, size_t payload_size)
 Constructor.
 FuseImageContent (FUSE_image_format_t image_format, const char *image_id, unsigned char *buffer, size_t buffer_size, colorspace_t colorspace, unsigned int width, unsigned int height, long int capture_time_sec=0, long int capture_time_usec=0)
 Constructor.
 ~FuseImageContent ()
 Destructor.
unsigned char * buffer () const
 Image buffer.
size_t buffer_size () const
 Get size of buffer.
unsigned int pixel_width () const
 Get image width.
unsigned int pixel_height () const
 Get image height.
unsigned int colorspace () const
 Get colorspace.
unsigned int format () const
 Get image format.
void decompress (unsigned char *yuv422_planar_buffer, size_t buffer_size)
 Decompress image data.
fawkes::Timecapture_time () const
 Get capture time.
virtual void serialize ()
 Serialize message content.

Detailed Description

FUSE image content.

Author:
Tim Niemueller

Constructor & Destructor Documentation

firevision::FuseImageContent::FuseImageContent ( uint32_t  type,
void *  payload,
size_t  payload_size 
)

Constructor.

Parameters:
typemessage type
payloadpayload
payload_sizesize of payload

Definition at line 53 of file fuse_image_content.cpp.

firevision::FuseImageContent::FuseImageContent ( FUSE_image_format_t  image_format,
const char *  image_id,
unsigned char *  buffer,
size_t  buffer_size,
colorspace_t  colorspace,
unsigned int  width,
unsigned int  height,
long int  capture_time_sec = 0,
long int  capture_time_usec = 0 
)

Constructor.

Copies data from given buffer.

Parameters:
image_formatimage format
image_idimage ID
bufferimage buffer, encoded according to image_format
buffer_sizesize of buffer in bytes
colorspacecolor space
widthwidth of image in pixels
heightheight of image in pixels
capture_time_secoptional seconds part of the capture time
capture_time_usecoptional microseconds part of the capture time

Definition at line 122 of file fuse_image_content.cpp.

firevision::FuseImageContent::~FuseImageContent ( )

Destructor.

Definition at line 157 of file fuse_image_content.cpp.


Member Function Documentation

unsigned char * firevision::FuseImageContent::buffer ( ) const

Image buffer.

Returns:
image buffer

Definition at line 166 of file fuse_image_content.cpp.

Referenced by FireVisionNetworkTool::fuse_inbound_received().

size_t firevision::FuseImageContent::buffer_size ( ) const

Get size of buffer.

Returns:
size of buffer returned by buffer()

Definition at line 176 of file fuse_image_content.cpp.

Referenced by FireVisionNetworkTool::fuse_inbound_received().

fawkes::Time * firevision::FuseImageContent::capture_time ( ) const

Get capture time.

Returns:
capture time

Definition at line 226 of file fuse_image_content.cpp.

unsigned int firevision::FuseImageContent::colorspace ( ) const

Get colorspace.

Returns:
colorspace

Definition at line 206 of file fuse_image_content.cpp.

Referenced by FireVisionNetworkTool::fuse_inbound_received().

void firevision::FuseImageContent::decompress ( unsigned char *  yuv422_planar_buffer,
size_t  buffer_size 
)

Decompress image data.

This is a utility method which can be used on clients to decompress compressed image payload. Since every time a new decompressor is created and deleted this method can be slower compared to decompressing the data directly in your application so use with care.

Parameters:
yuv422_planar_bufferan already allocated buffer where the decompressed image will be stored.
buffer_sizesize of yuv422_planar_buffer in bytes. Must be big enough to store a YUV422_PLANAR image of the image dimensions of the compressed data.

Definition at line 253 of file fuse_image_content.cpp.

References firevision::ImageDecompressor::set_compressed_buffer(), firevision::ImageDecompressor::set_decompressed_buffer(), and firevision::JpegImageDecompressor::decompress().

unsigned int firevision::FuseImageContent::format ( ) const

Get image format.

Returns:
format

Definition at line 216 of file fuse_image_content.cpp.

Referenced by FireVisionNetworkTool::fuse_inbound_received().

unsigned int firevision::FuseImageContent::pixel_height ( ) const

Get image height.

Returns:
height of image in pixels

Definition at line 196 of file fuse_image_content.cpp.

Referenced by FireVisionNetworkTool::fuse_inbound_received().

unsigned int firevision::FuseImageContent::pixel_width ( ) const

Get image width.

Returns:
width of image in pixels

Definition at line 186 of file fuse_image_content.cpp.

Referenced by FireVisionNetworkTool::fuse_inbound_received().

void firevision::FuseImageContent::serialize ( ) [virtual]

Serialize message content.

Generate a single contiguous buffer. Make _payload point to this buffer and _payload_size contain the size of the buffer.

Implements firevision::FuseMessageContent.

Definition at line 236 of file fuse_image_content.cpp.


The documentation for this class was generated from the following files: