SphereDriver Class Reference
Inheritance diagram for SphereDriver:Detailed Description
Definition at line 37 of file sphere_mixed.h.
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 | |||
) |
Definition at line 202 of file sphere_mixed.cc.
References Driver::AddInterface(), mAutomaticGain, mAutomaticWb, mBacklight, mCameraAddr, mCompressionPreference, mDebug, mDevice, mDumpSettings, mFlicker, mFrameRate, mHeight, mNoiseReduction, mPalette, mPtzAddr, mSave, mSharpness, mShutterSpeed, mSleep, mWidth, PLAYER_CAMERA_CODE, PLAYER_ERROR, PLAYER_PTZ_CODE, ConfigFile::ReadDeviceAddr(), ConfigFile::ReadInt(), ConfigFile::ReadString(), ConfigFile::ReadTupleInt(), and Driver::SetError().
Here is the call graph for this function:
Member Function Documentation
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.
Definition at line 278 of file sphere_mixed.cc.
References FRAMEGRABBER::fd, player_camera_data::format, mAutomaticGain, mAutomaticWb, PlayerCc::max(), mBacklight, mCameraData, mCompressionPreference, mDebug, mDepth, mDevice, mDumpSettings, mFg, mFlicker, mFrame, mFrameRate, mHeight, PlayerCc::min(), mNoiseReduction, mPalette, mPanMax, mPanMin, mRGBFrame, mSharpness, mShutterSpeed, mTiltMax, mTiltMin, mWidth, PLAYER_CAMERA_FORMAT_MONO8, PLAYER_CAMERA_FORMAT_RGB888, and PLAYER_ERROR.
Here is the call graph for this function:
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.
Definition at line 368 of file sphere_mixed.cc.
References FRAMEGRABBER::fd, mFg, mFrame, mRGBFrame, and Driver::StopThread().
Here is the call graph for this function:
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.
Definition at line 396 of file sphere_mixed.cc.
References Driver::ProcessMessages(), and RefreshData().
Here is the call graph for this function:
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.
Definition at line 419 of file sphere_mixed.cc.
References Driver::device_addr, FRAMEGRABBER::fd, Message::MatchMessage(), mFg, mPtzAddr, PLAYER_ERROR1, PLAYER_MSGTYPE_CMD, PLAYER_MSGTYPE_REQ, PLAYER_MSGTYPE_RESP_ACK, PLAYER_PTZ_CMD_STATE, PLAYER_PTZ_REQ_STATUS, ProcessCommand(), Driver::Publish(), and player_ptz_req_status::status.
Here is the call graph for this function:
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
Definition at line 686 of file sphere_mixed.cc.
References mDebug, mDepth, mHeight, mPalette, and mWidth.
Referenced by RefreshData().
The documentation for this class was generated from the following files: