Public Member Functions | |
CameraUvc (ConfigFile *cf, int section) | |
int | MainSetup () |
Sets up the resources needed by the driver thread. | |
void | MainQuit () |
Cleanup method for driver thread (called when main exits) | |
int | ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data) |
Message handler. | |
Private Member Functions | |
virtual void | Main () |
Main method for driver thread. | |
Private Attributes | |
UvcInterface * | ui |
player_camera_data_t | data |
void CameraUvc::Main | ( | ) | [private, virtual] |
Main method for driver thread.
drivers have their own thread of execution, created using StartThread(); this is the entry point for the driver thread, and must be overloaded by all threaded drivers.
Implements ThreadedDriver.
References Driver::ProcessMessages(), player_camera_data::width, player_camera_data::height, player_camera_data::bpp, player_camera_data::format, PLAYER_CAMERA_FORMAT_RGB888, player_camera_data::fdiv, player_camera_data::compression, PLAYER_CAMERA_COMPRESS_JPEG, player_camera_data::image_count, player_camera_data::image, Driver::Publish(), Driver::device_addr, PLAYER_MSGTYPE_DATA, and PLAYER_CAMERA_DATA_STATE.
void CameraUvc::MainQuit | ( | void | ) | [virtual] |
Cleanup method for driver thread (called when main exits)
Overload this method and to do additional cleanup when the driver thread exits.
Reimplemented from ThreadedDriver.
int CameraUvc::ProcessMessage | ( | QueuePointer & | resp_queue, |
player_msghdr * | hdr, | ||
void * | data | ||
) | [virtual] |
Message handler.
This function is called once for each message in the incoming queue. Reimplement it to provide message handling. Return 0 if you handled the message and -1 otherwise
resp_queue | The queue to which any response should go. |
hdr | The message header |
data | The message body |
Reimplemented from Driver.