AURobotServers  4
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
UCamPwc Class Reference

#include <ucampwc.h>

Inheritance diagram for UCamPwc:
Inheritance graph

Public Member Functions

virtual void closeDevice ()
 
bool deviceExist ()
 
virtual int getBrightness (bool probe)
 
virtual int getColour (bool probe)
 
virtual int getCompPref (bool probe)
 
virtual int getContour (bool probe)
 
virtual int getContrast (bool probe)
 
virtual int getDataChannel ()
 
virtual const char * getDataChannelName ()
 
virtual int getGain (bool probe, bool *dataValid=NULL, bool *isOnAuto=NULL)
 
virtual int getGamma (bool probe)
 
bool getLed (bool probe, int *onTime, int *offTime)
 
virtual int getShutter (bool probe=false, bool *dataValid=NULL, bool *isOnAuto=NULL)
 
bool getWhiteBalance (bool probe, int *red=NULL, int *blue=NULL, int *mode=NULL)
 Get white balance values. More...
 
bool isCameraOpen ()
 
bool isInfoValid ()
 
bool isLedOn (bool probe)
 
bool isValidDevice ()
 
virtual bool openDevice ()
 
virtual bool openDeviceDefault ()
 
void readFramesThread (void)
 
virtual bool setBrightness (int brightness)
 
virtual bool setColour (int colour)
 
virtual bool setCompPref (int value)
 
virtual bool setContour (int value=0x1000)
 
virtual bool setContrast (int contrast)
 
virtual bool setDataChannel (int channel)
 
virtual bool setDevice (const int width, const int height, const int newFrameRate)
 
virtual bool setGain (int agc)
 
virtual bool setGamma (int gamma)
 
bool setLed (int onTime, int offTime)
 
void setLedFrameRate ()
 
void setLedOn (bool toOn)
 
virtual bool setShutter (int shut)
 
virtual bool setVideoCap (int brightness, int contrast, int gamma, int colour)
 
bool setWhiteBalance (int mode, int red, int blue)
 Set white balance correction values. More...
 
 UCamPwc ()
 
virtual void waitAFrame (float frames=1.0)
 
virtual ~UCamPwc ()
 
- Public Member Functions inherited from UCamDevBase
virtual void callGotNewDataWithObject ()
 
virtual void createVars ()
 
char * getCameraName ()
 
int getCamFd ()
 
int getDeviceNumber ()
 
virtual bool getExternalTrigger (bool *supported)
 
virtual int getFrameRate ()
 
unsigned int getHeight ()
 
unsigned long getImageNumber ()
 
virtual bool getImageSnapshot (UImage *image)
 
bool getLockedNewImage (UImage **raw)
 
char * getName ()
 
double getPixelSize ()
 
int getWBModeFromString (const char *mode)
 
unsigned int getWidth ()
 
void gotNewImage (UImage *rgb)
 
void imageSizeChanged (double iResFactor)
 
void imgUpdated ()
 
bool isCameraOpen ()
 
bool isLog ()
 
bool isReplay ()
 
virtual bool isThisA (USupportedCamTypes thisType)
 
virtual bool makeTriggerPulse ()
 
bool needNewPushData ()
 
void setCam (UCamBase *camRef)
 
void setDeviceNumber (int deviceNum)
 
virtual bool setExternalTrigger (bool, bool *supported)
 
void setImageNumber (unsigned long serial)
 
void setInitialized (bool value)
 
void setLog (bool value)
 
virtual void setPushBuffer (UImage *)
 
void setReplay (bool value)
 
void setTypeName (const char *newName)
 
void setVarPool (UVarPool *vpd)
 
 UCamDevBase ()
 
virtual ~UCamDevBase ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 

Protected Member Functions

bool getDeviceInfo ()
 
void info (const char *s, const int type, const int num)
 
void ioctlError (int err, const char *prestring)
 
bool protCloseDevice ()
 
bool protGetLockedNewImage (UImage **prgb)
 
bool protOpenDevice (bool vcapOnly=false)
 
bool protOpenDevice (const int height, const int width, const int framesPerSec)
 
bool protSetDeviceSizeAndSpeed (int toWidth, int toHeight, int toFramesPerSec)
 
bool startReadThread ()
 
void stopReadThread (bool andWait)
 

Protected Attributes

bool devInfoValid
 
bool stopFrameRead
 
pthread_t thRead
 
bool threadRunning
 
struct video_capability vcap
 
struct video_channel vch
 
struct pwc_leds vled
 
struct video_mbuf vmbuf
 
struct video_picture vpic
 
struct video_picture vpicSet
 
bool vpicValid
 
char * vsharedmem
 
struct pwc_whitebalance vwhite
 
struct video_window vwin
 
- Protected Attributes inherited from UCamDevBase
UCamBasecam
 
int cam_fd
 
bool cameraOpen
 
char camName [MAX_CAM_DEV_NAME_LENGTH]
 
USupportedCamTypes camType
 
int devNum
 file descriptor for camera device More...
 
int frameHeight
 
int frameRate
 
int frameWidth
 
unsigned long imageNumber
 
int imCnt
 
UImageimgBuff [RAW_IMAGEBUFFER_MAX_CNT]
 
int imgBuffNext
 
bool initialized
 
UVariablevarCamName
 camera name from camera More...
 
UVariablevarLog
 Variable for log flag. More...
 
UVariablevarReplay
 Variable for replay. More...
 
UVarPoolvars
 
int vbrightness
 
int vcolour
 
int vcompressionPref
 
int vcontour
 
int vcontrast
 
int vgain
 
int vgamma
 
int vshutter
 

Private Attributes

int oldWidth
 

Additional Inherited Members

- Public Types inherited from UCamDevBase
enum  camTypes {
  CAM_DEV_REPLAY, CAM_DEV_PWC, CAM_DEV_IEEE1394, CAM_DEV_GRAPPER,
  CAM_DEV_GIGE
}
 
typedef enum UCamDevBase::camTypes USupportedCamTypes
 
- Static Public Member Functions inherited from UCamDevBase
static char * getWBModeAsString (int mode, char *strBuff)
 
- Static Public Attributes inherited from UCamDevBase
static const int MAX_CAM_DEV_NAME_LENGTH = 100
 
static const int MAX_IMAGE_WIDTH = 640
 
- Static Protected Attributes inherited from UCamDevBase
static const int RAW_IMAGEBUFFER_MAX_CNT = 5
 

Detailed Description

Implement camera device using the PWC USB camera driver

    @author Christian Andersen <jca@oersted.dtu.dk>

Constructor & Destructor Documentation

UCamPwc::UCamPwc ( )
UCamPwc::~UCamPwc ( )
virtual

Destructor

References closeDevice(), and stopReadThread().

Member Function Documentation

void UCamPwc::closeDevice ( )
virtual

Global function to close the connection to the video device. Returns true if successful.

Reimplemented from UCamDevBase.

References ULock::lock(), protCloseDevice(), and ULock::unlock().

Referenced by isValidDevice(), and ~UCamPwc().

bool UCamPwc::deviceExist ( )
virtual

Test if souch device exist and can be opened. Returns true if device can be opened (a device exists).

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, UCamDevBase::devNum, ULock::lock(), ULock::unlock(), and vcap.

Referenced by getDataChannelName().

int UCamPwc::getBrightness ( bool  probe)
virtual

Get brightness in camera - a value of 0xFFFF probably means 'not supported'. These values are probed together: Contrast, brightness, colour and gamma, so probe for one of them only.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpic, and vpicValid.

Referenced by setLedFrameRate().

int UCamPwc::getColour ( bool  probe)
virtual

Get colour saturation in camera - a value of 0xFFFF probably means 'not supported'. These values are probed together: Contrast, brightness, colour and gamma, so probe for one of them only.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpic, and vpicValid.

Referenced by setLedFrameRate().

int UCamPwc::getCompPref ( bool  probe)
virtual

Get current setting of compression preference. 0 = no compression 3 = highest compression. If 'probe' = true the a fresh value is requested from camera, otherwise tha last obtained value is returned. If a requested value is unavailable, then en error is issued.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), and UCamDevBase::vcompressionPref.

Referenced by setLedFrameRate().

int UCamPwc::getContour ( bool  probe)
virtual

Get contour value. if 'probe' then a value from camera requested is loaded. if this fails, an error is issued. The function returnes the retreived value (if requested and available) otherwise it returns the last fetched value. NB! if contour is set to automatic the returned value is not related to the implemented value.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), and UCamDevBase::vcontour.

Referenced by setLedFrameRate().

int UCamPwc::getContrast ( bool  probe)
virtual

Get contrast in camera - a value of 0xFFFF probably means 'not supported'. This value is probed together with brightness, colour and gamma, so probe for one of these only.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpic, and vpicValid.

Referenced by setLedFrameRate().

int UCamPwc::getDataChannel ( )
virtual

Get current data channel setting. Returns -1 if channel setting is not supported.

Reimplemented from UCamDevBase.

References vch.

Referenced by setLedFrameRate().

virtual const char* UCamPwc::getDataChannelName ( )
inlinevirtual

Get current data channel name - e.g. Television or s-video on a TV card. Channel is set using setDataChannel().

Reimplemented from UCamDevBase.

References deviceExist(), protCloseDevice(), protGetLockedNewImage(), protOpenDevice(), protSetDeviceSizeAndSpeed(), startReadThread(), stopReadThread(), and vch.

bool UCamPwc::getDeviceInfo ( )
protected
int UCamPwc::getGain ( bool  probe,
bool *  dataValid = NULL,
bool *  isOnAuto = NULL 
)
virtual

Get actual gain value. if 'probe' is false, then existing vaue is returned. if 'probe' is true, then the camera is asked for the most recent value. if this is not possible, then en error is reported and last value returned. If dataValid is set, then this is set false on error

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), and UCamDevBase::vgain.

Referenced by isValidDevice().

int UCamPwc::getGamma ( bool  probe)
virtual

Get the current gamma correction value. The value is an integer in 16 bit range, where 0x8000 is default.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpic, and vpicValid.

Referenced by setLedFrameRate().

bool UCamPwc::getLed ( bool  probe,
int *  onTime,
int *  offTime 
)

Get setting or last setting

Referenced by isLedOn(), and isValidDevice().

int UCamPwc::getShutter ( bool  probe = false,
bool *  dataValid = NULL,
bool *  isOnAuto = NULL 
)
virtual

Get actual shutter value. if 'probe' is false, then existing vaue is returned. if 'probe' is true, then the camera is asked for the most recent value. if this is not possible, then en error is reported and last value returned. This value can not be read from camera, so last commanded value is returned. if not available then *dataValid is set to false.

Reimplemented from UCamDevBase.

References vsharedmem, and UCamDevBase::vshutter.

Referenced by isValidDevice().

bool UCamPwc::getWhiteBalance ( bool  probe,
int *  red = NULL,
int *  blue = NULL,
int *  mode = NULL 
)
virtual

Get white balance values.

Parameters
probethe the camera is asked, otherwise previous value is returned unchecked. If one or more of the following pointers are non-zero the integer value is returned.
Returns
true if probed succesfull or probe=false.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), and vwhite.

Referenced by isValidDevice().

void UCamPwc::info ( const char *  s,
const int  type,
const int  num 
)
inlineprotected

Error messages that may be generated from class

References getDeviceInfo(), and ioctlError().

Referenced by protSetDeviceSizeAndSpeed().

void UCamPwc::ioctlError ( int  err,
const char *  prestring 
)
protected
bool UCamPwc::isCameraOpen ( )
inline

Is camera open in streaming mode.

References UCamDevBase::cameraOpen.

bool UCamPwc::isInfoValid ( )
inline

If camera has been open and device number is unchanged, then the camera information is regarded valid.

References devInfoValid.

bool UCamPwc::isLedOn ( bool  probe)

Is led on - sometime

References getLed(), and vled.

Referenced by setLedOn().

bool UCamPwc::isValidDevice ( )
inline

Is the vodeo device valid - is it possible to open. Returns true if a valid device

References UCamDevBase::cam_fd, closeDevice(), getGain(), getLed(), getShutter(), getWhiteBalance(), openDevice(), openDeviceDefault(), readFramesThread(), setDevice(), setGain(), setLed(), setShutter(), and setWhiteBalance().

bool UCamPwc::openDevice ( )
virtual

Open device and set size and framerate as set in frameHeight, frameWidth and frameRate variables. If 'readThreadNormal' = false, no read thread is started. and image capturing and timestamp is disabled. (captureImage will fail)

Reimplemented from UCamDevBase.

References UCamDevBase::frameHeight, UCamDevBase::frameRate, UCamDevBase::frameWidth, ULock::lock(), protOpenDevice(), and ULock::unlock().

Referenced by isValidDevice().

bool UCamPwc::openDeviceDefault ( )
virtual

Open and close devise to get default camera parameters. Returns 0 iff sucessfull.

Reimplemented from UCamDevBase.

References ULock::lock(), protOpenDevice(), and ULock::unlock().

Referenced by isValidDevice().

bool UCamPwc::protCloseDevice ( )
protected
bool UCamPwc::protGetLockedNewImage ( UImage **  prgb)
protected

Get a buffer with a locked image from the queue the read thread has processed. The image must be unlocked by a call to unlock() after use, and should not be kept locked, as this will reduce the number of available buffers for the read thread. Returns NULL if no images were available within a reasonable time.

Referenced by getDataChannelName().

bool UCamPwc::protOpenDevice ( bool  vcapOnly = false)
protected
bool UCamPwc::protOpenDevice ( const int  height,
const int  width,
const int  framesPerSec 
)
protected

Open device and set resolution to 'width' and 'height'. If with and height is both 0, then default resolution is maintained.
NB! Bandwith may limits the number of simultanious open devices in high resolution
Returns true if all is OK and as requested, in this case all parameters of the camera device is filled. e.g. vwin with height and width. Returns false if any error occured or the image could not be taken with the required resolution.

References UCamDevBase::cameraOpen, protOpenDevice(), protSetDeviceSizeAndSpeed(), startReadThread(), stopFrameRead, and threadRunning.

bool UCamPwc::protSetDeviceSizeAndSpeed ( int  toWidth,
int  toHeight,
int  toFramesPerSec 
)
protected

Assume that the camera is locked and open and implement these device settings. Returns true if camera can be controlled and is open. New camera settings are in frameHeight, frameWidth and frameRate. valid is true if camera can be controled.

References UCamDevBase::cam_fd, UCamDevBase::cameraOpen, devInfoValid, UCamDevBase::devNum, einfo, UCamDevBase::frameHeight, UCamDevBase::frameRate, UCamDevBase::frameWidth, UCamDevBase::imageSizeChanged(), info(), UCamDevBase::MAX_IMAGE_WIDTH, MAX_VINFO_SIZE, oldWidth, vpic, and vwin.

Referenced by getDataChannelName(), and protOpenDevice().

void UCamPwc::readFramesThread ( void  )
bool UCamPwc::setBrightness ( int  brightness)
virtual

Set brightness in camera - normal value is 0x8000 and range is 0..0xFFF0

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpicSet, and vpicValid.

Referenced by setLedFrameRate().

bool UCamPwc::setColour ( int  colour)
virtual

Set colour saturation in camera - normal value is 0x8000 and range is 0..0xFFF0

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpicSet, and vpicValid.

Referenced by setLedFrameRate().

bool UCamPwc::setCompPref ( int  value)
virtual

Set compression preference. This tells the camera the preferred compression ratio. If framerate and image size is too high for the selected compression ratio, then a higher compression is used. 0 = no compression 1 = small 2 = more 3 = highest compression. resolution 640x480 always uses some compression (USB1.1) Compression is visible as blocks of 4x4 pixels get a bit too similar. Returns true if setting is send to camera.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::unlock(), and UCamDevBase::vcompressionPref.

Referenced by setLedFrameRate().

bool UCamPwc::setContour ( int  value = 0x1000)
virtual

Set the contour function in camera. This is an edge sharpener to compensate for lack of bandwidth (horizontal lines only. The range is 0 to 0xFFFF. The value 0x0 is no contour correction. If set negative (e.g. -1) the camera selects an appropriate value. Returns true if command issued.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), and UCamDevBase::vcontour.

Referenced by setLedFrameRate().

bool UCamPwc::setContrast ( int  contrast)
virtual

Set contrast in camera - normal value is 0x8000 and range is 0..0xFFF0

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpicSet, and vpicValid.

Referenced by setLedFrameRate().

bool UCamPwc::setDataChannel ( int  channel)
virtual

Set data source channel on a source device, where it is supported. Returns true if successful. On successful return the name of the channel is available by getDataChannelName().

Reimplemented from UCamDevBase.

References UCamDevBase::getCamFd(), ULock::lock(), ULock::unlock(), and vch.

Referenced by setLedFrameRate().

bool UCamPwc::setDevice ( const int  width,
const int  height,
const int  newFrameRate 
)
virtual

implement these settings and leave the device open.

Reimplemented from UCamDevBase.

References UCamDevBase::frameRate, ULock::lock(), protOpenDevice(), and ULock::unlock().

Referenced by isValidDevice().

bool UCamPwc::setGain ( int  agc)
virtual

Set noise reduction value in camera. A value of 0 is no filter and 3 is maximum filter. Returns true if set successful - i.e. camera could be locked and the function is supported by camera. Get actual noise reduction value. if 'probe' is false, then existing vaue is returned. if 'probe' is true, then the camera is asked for the most recent value. if this is not possible, then en error is reported and last value returned. Set gain value. A negative value (-1) sets automatic gain. A positive value in range 0..0xFFFF is video gain in camera. 0 is low gain (but not zero). Returns true if set successful - i.e. camera could be locked and the function is supported by camera.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, UCamDevBase::cameraOpen, ioctlError(), ULock::lock(), ULock::unlock(), and UCamDevBase::vgain.

Referenced by isValidDevice().

bool UCamPwc::setGamma ( int  gamma)
virtual

Set gamma correction value. The default setting is 0x8000 (32768), Value 0 is assumed to be linear. So gamma > 1.0 is possible only.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpicSet, and vpicValid.

Referenced by setLedFrameRate().

bool UCamPwc::setLed ( int  onTime,
int  offTime 
)

Set led speed time is in miliseconds. (on,off): (0,0) = OFF, (100,0) = ON, (200,800) = 1 sec blink with 20% on. Returns true if set.

Referenced by isValidDevice(), setLedFrameRate(), and setLedOn().

void UCamPwc::setLedFrameRate ( )
inline
void UCamPwc::setLedOn ( bool  toOn)
inline

Set led on

References isLedOn(), and setLed().

bool UCamPwc::setShutter ( int  shut)
virtual

Manual control with camera intensity gain and shutter speed. NB! This routine does not work - it just sets shutter and AGC to automatic. Just kept for future enhancements. Returns true if no error occured.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, UCamDevBase::cameraOpen, ioctlError(), ULock::lock(), ULock::unlock(), and UCamDevBase::vshutter.

Referenced by isValidDevice().

bool UCamPwc::setVideoCap ( int  brightness,
int  contrast,
int  gamma,
int  colour 
)
virtual

Set all 4 video control values in one call - normal value is 0x8000 and range is 0..0xFFF0.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, ioctlError(), ULock::lock(), ULock::unlock(), vpicSet, and vpicValid.

Referenced by setLedFrameRate().

bool UCamPwc::setWhiteBalance ( int  mode,
int  red,
int  blue 
)
virtual

Set white balance correction values.

Parameters
modecan have one of the following values: 4: PWC_WB_AUTO, 3: PWC_WB_MANUAL, 2: PWC_WB_INDOOR, 1: PWC_WB_OUTDOOR, 0: PWC_WB_FL (flurocent).
redand
blueis used in MANUAL mode only and in a range from 0 to 0x7FFF, where 0x4000 are assumed to be neutral (equal to gain in green channel) true if successful.

Reimplemented from UCamDevBase.

References UCamDevBase::cam_fd, UCamDevBase::cameraOpen, ioctlError(), ULock::tryLock(), ULock::unlock(), and vwhite.

Referenced by isValidDevice().

bool UCamPwc::startReadThread ( )
protected

Start read hread. Should be done, when images are neded only

References UCamDevBase::devNum, runPwcCamThread(), stopFrameRead, thRead, threadRunning, vcap, and Wait().

Referenced by getDataChannelName(), and protOpenDevice().

void UCamPwc::stopReadThread ( bool  andWait)
protected

Stop read thread - should be done on exit only

References stopFrameRead, thRead, and threadRunning.

Referenced by getDataChannelName(), and ~UCamPwc().

void UCamPwc::waitAFrame ( float  frames = 1.0)
virtual

Wait a frame is a function, that calls Wait for the time it takes to get a frame. If a parameter is provided it waits a fraction of a frametime.

References UCamDevBase::frameRate, and Wait().

Referenced by setLedFrameRate().

Member Data Documentation

bool UCamPwc::devInfoValid
protected
int UCamPwc::oldWidth
private
bool UCamPwc::stopFrameRead
protected

Terminate the frame read thread

Referenced by protOpenDevice(), readFramesThread(), startReadThread(), stopReadThread(), and UCamPwc().

pthread_t UCamPwc::thRead
protected

Thread handle for frame read thread.

Referenced by startReadThread(), and stopReadThread().

bool UCamPwc::threadRunning
protected

Flag that is set by the read thread on entry and reset by the thread on exit

Referenced by protOpenDevice(), readFramesThread(), startReadThread(), stopReadThread(), and UCamPwc().

struct video_capability UCamPwc::vcap
protected

Video capabilities - name, max-size etc

Referenced by deviceExist(), getDeviceInfo(), protCloseDevice(), protOpenDevice(), and startReadThread().

struct video_channel UCamPwc::vch
protected

Structure with allowed channel information

Referenced by getDataChannel(), getDataChannelName(), getDeviceInfo(), setDataChannel(), and UCamPwc().

struct pwc_leds UCamPwc::vled
protected

Some cameras has a led attached, and some can be controlled. this structure holds the on and off timing values for the led.

Referenced by isLedOn().

struct video_mbuf UCamPwc::vmbuf
protected

Structure with shared memory buffers capabilities.

Referenced by getDeviceInfo(), protCloseDevice(), and readFramesThread().

struct video_picture UCamPwc::vpic
protected

Camera picture settings, this include brightness, color, contrast, whiteness (gamma), depth and palette. is a Video4Linux feature. This is the last value read from the camera. A value of 0xFFFF indicates a non-supported feature.

Referenced by getBrightness(), getColour(), getContrast(), getDeviceInfo(), getGamma(), protSetDeviceSizeAndSpeed(), readFramesThread(), and UCamPwc().

struct video_picture UCamPwc::vpicSet
protected

Camera picture settings, this include brightness, color, contrast, whiteness (gamma), depth and palette. is a Video4Linux feature. This value is the last value send to the camera.

Referenced by setBrightness(), setColour(), setContrast(), setGamma(), setVideoCap(), and UCamPwc().

bool UCamPwc::vpicValid
protected

Is values in vpic valid (not valid after a set)

Referenced by getBrightness(), getColour(), getContrast(), getGamma(), setBrightness(), setColour(), setContrast(), setGamma(), setVideoCap(), and UCamPwc().

char* UCamPwc::vsharedmem
protected

Pointer to start of shared memory with image buffers. Should be set to NULL if invalid (or closed)

Referenced by getDeviceInfo(), getShutter(), protCloseDevice(), readFramesThread(), and UCamPwc().

struct pwc_whitebalance UCamPwc::vwhite
protected

White ballance, with: int mode = 'PWC_WB_' + AUTO, MANUAL, INDOOR, OUTDOOR, FL (flurocent). int manual_red, manual_blue; gain in range 0..0xFFFF, green is assumed to be 0xF000. int read_red, read_blue: actual gain in auto mode.

Referenced by getWhiteBalance(), and setWhiteBalance().

struct video_window UCamPwc::vwin
protected

Image size and framerate

Referenced by getDeviceInfo(), and protSetDeviceSizeAndSpeed().


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