SphereDriver Class Reference


Public Member Functions | |
| SphereDriver (ConfigFile *cf, int section) | |
| int | Setup () |
| Initialize the driver. | |
| int | Shutdown () |
| Finalize the driver. | |
| virtual void | Main () |
| Main method for driver thread. | |
| virtual int | ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data) |
| Message handler. | |
| void | ProcessCommand (player_msghdr_t *hdr, player_ptz_cmd_t &data) |
| void | RefreshData () |
Private Member Functions | |
| void | YUV422toRGB (uint8_t *argInputData, uint8_t *argOutputData) |
| Conversion of YUV422 pixel data into RGB ( CCIR 601 ). | |
| double | LimitPan (double argP) |
| double | LimitTilt (double argT) |
Private Attributes | |
| player_devaddr_t | mCameraAddr |
| player_camera_data_t | mCameraData |
| player_devaddr_t | mPtzAddr |
| player_ptz_data_t | mPtzData |
| player_ptz_cmd_t | mPtzCmd |
| int32_t | mSleep |
| int32_t | mFrameRate |
| int32_t | mShutterSpeed |
| int32_t | mCompressionPreference |
| int32_t | mAutomaticGain |
| int32_t | mSharpness |
| int32_t | mBacklight |
| int32_t | mFlicker |
| int32_t | mNoiseReduction |
| int32_t | mDumpSettings |
| int32_t | mDebug |
| const char * | mAutomaticWb |
| double | mPanMin |
| double | mPanMax |
| double | mTiltMin |
| double | mTiltMax |
| const char * | mDevice |
| int32_t | mSource |
| const char * | mPalette |
| FRAMEGRABBER * | mFg |
| FRAME * | mFrame |
| FRAME * | mRGBFrame |
| int32_t | mFrameNumber |
| int32_t | mWidth |
| int32_t | mHeight |
| int32_t | mDepth |
| int32_t | mSave |
Constructor & Destructor Documentation
| SphereDriver::SphereDriver | ( | ConfigFile * | cf, | |
| int | section | |||
| ) |
- Todo:
- is there a replacement clear command?
References Driver::AddInterface(), PLAYER_CAMERA_CODE, PLAYER_ERROR, PLAYER_PTZ_CODE, ConfigFile::ReadDeviceAddr(), ConfigFile::ReadInt(), ConfigFile::ReadString(), ConfigFile::ReadTupleInt(), and Driver::SetError().

Member Function Documentation
| void SphereDriver::Main | ( | ) | [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.
Reimplemented from Driver.
References Driver::ProcessMessages().

| int SphereDriver::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
- Parameters:
-
resp_queue The queue to which any response should go. hdr The message header data The message body
Reimplemented from Driver.
References Driver::device_addr, Message::MatchMessage(), PLAYER_ERROR1, PLAYER_MSGTYPE_CMD, PLAYER_MSGTYPE_REQ, PLAYER_MSGTYPE_RESP_ACK, PLAYER_PTZ_CMD_STATE, PLAYER_PTZ_REQ_STATUS, Driver::Publish(), player_msghdr::size, and player_msghdr::type.

| int SphereDriver::Setup | ( | ) | [virtual] |
Initialize the driver.
This function is called with the first client subscribes; it MUST be implemented by the driver.
- Returns:
- Returns 0 on success.
Implements Driver.
References player_camera_data::format, PlayerCc::max(), PlayerCc::min(), PLAYER_CAMERA_FORMAT_MONO8, PLAYER_CAMERA_FORMAT_RGB888, and PLAYER_ERROR.

| int SphereDriver::Shutdown | ( | ) | [virtual] |
Finalize the driver.
This function is called with the last client unsubscribes; it MUST be implemented by the driver.
- Returns:
- Returns 0 on success.
Implements Driver.
References Driver::StopThread().

| void SphereDriver::YUV422toRGB | ( | uint8_t * | argInputData, | |
| uint8_t * | argOutputData | |||
| ) | [private] |
Conversion of YUV422 pixel data into RGB ( CCIR 601 ).
R = (Y - 16) * 1.164 + (V-128) * 1.596 G = (Y - 16) * 1.164 - (U-128) * 0.391 - (V-128) * 0.813 B = (Y - 16) * 1.164 + (U-128) * 2.018
The formulas are approximated by
R = Y * (291/250) + V * (399/250) - 223 G = Y * (291/250) + U * (319/1000) - V * (813/1000) + 35 B = Y * (291/250) + U * (1009/500) - 277
The documentation for this class was generated from the following files:
- sphere_mixed.h
- sphere_mixed.cc
