Network camera. More...
#include <>>
Public Member Functions | |
NetworkCamera (const char *host, unsigned short port, bool jpeg=false) | |
Constructor. | |
NetworkCamera (const char *host, unsigned short port, const char *image_id, bool jpeg=false) | |
Constructor. | |
NetworkCamera (const CameraArgumentParser *cap) | |
Constructor. | |
virtual | ~NetworkCamera () |
Destructor. | |
virtual void | open () |
virtual void | start () |
virtual void | stop () |
virtual void | close () |
virtual void | flush () |
virtual void | capture () |
virtual void | print_info () |
virtual bool | ready () |
virtual unsigned char * | buffer () |
virtual unsigned int | buffer_size () |
virtual void | dispose_buffer () |
virtual unsigned int | pixel_width () |
virtual unsigned int | pixel_height () |
virtual colorspace_t | colorspace () |
virtual void | set_image_id (const char *image_id) |
Select the image that is opened. | |
virtual void | set_image_number (unsigned int n) |
virtual fawkes::Time * | capture_time () |
virtual std::vector < FUSE_imageinfo_t > & | image_list () |
List the available images. | |
virtual void | fuse_invalid_server_version (uint32_t local_version, uint32_t remote_version) throw () |
Invalid version string received. | |
virtual void | fuse_connection_established () throw () |
Connection has been established. | |
virtual void | fuse_connection_died () throw () |
Connection died. | |
virtual void | fuse_inbound_received (FuseNetworkMessage *m) throw () |
Message received. |
Network camera.
Retrieve images via network (FUSE).
Definition at line 42 of file net.h.
firevision::NetworkCamera::NetworkCamera | ( | const char * | host, | |
unsigned short | port, | |||
bool | jpeg = false | |||
) |
Constructor.
Allows to initiate a NetworkCamera w/o specifying an image id. This can be done later with the set_image_id() method.
host | host to connect to | |
port | port to connect to | |
jpeg | if true jpeg images will be transferred and automatically be decompressed, otherwise raw images are transferred |
firevision::NetworkCamera::NetworkCamera | ( | const char * | host, | |
unsigned short | port, | |||
const char * | image_id, | |||
bool | jpeg = false | |||
) |
firevision::NetworkCamera::NetworkCamera | ( | const CameraArgumentParser * | cap | ) |
Constructor.
Initialize with parameters from camera argument parser, supported values are:
cap | camera argument parser |
Definition at line 140 of file net.cpp.
References firevision::CameraArgumentParser::get(), and firevision::CameraArgumentParser::has().
firevision::NetworkCamera::~NetworkCamera | ( | ) | [virtual] |
void firevision::NetworkCamera::fuse_connection_died | ( | ) | throw () [virtual] |
void firevision::NetworkCamera::fuse_connection_established | ( | ) | throw () [virtual] |
Connection has been established.
Implements firevision::FuseClientHandler.
void firevision::NetworkCamera::fuse_inbound_received | ( | FuseNetworkMessage * | m | ) | throw () [virtual] |
Message received.
An incoming message has been received and can now be processed. Note that if you want to work on the message after this method has finished you have to reference the message by calling FuseMessage::ref()!
m | message to handle |
Implements firevision::FuseClientHandler.
Definition at line 467 of file net.cpp.
References firevision::FUSE_imageinfo_t::buffer_size, firevision::FUSE_imageinfo_t::colorspace, firevision::FuseImageListContent::has_next(), firevision::FUSE_imageinfo_t::height, firevision::FUSE_imageinfo_t::image_id, firevision::FuseImageListContent::next(), and firevision::FUSE_imageinfo_t::width.
void firevision::NetworkCamera::fuse_invalid_server_version | ( | uint32_t | local_version, | |
uint32_t | remote_version | |||
) | throw () [virtual] |
Invalid version string received.
The remote end has a different incompatible FUSE version.
local_version | version that the FuseClient speaks | |
remote_version | version that the remote FUSE server speaks. |
Implements firevision::FuseClientHandler.
std::vector< FUSE_imageinfo_t > & firevision::NetworkCamera::image_list | ( | ) | [virtual] |
List the available images.
Definition at line 429 of file net.cpp.
References firevision::FuseClient::enqueue_and_wait().
void firevision::NetworkCamera::set_image_id | ( | const char * | image_id | ) | [virtual] |
Select the image that is opened.
image_id | the image id |
Definition at line 389 of file net.cpp.
References firevision::FuseClient::enqueue_and_wait(), and firevision::FUSE_imagedesc_message_t::image_id.