Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

CameraV4L2Proxy Class Reference
[Core functionality]

#include <playerv4l2.h>

Inheritance diagram for CameraV4L2Proxy:

List of all members.

Detailed Description

The CameraV4L2Proxy class can be used to get images from a player_interface_camera device. It adds additional metods to CameraProxy that use camerav4l2 driver capabilities

Definition at line 123 of file playerv4l2.h.

Public Member Functions

 CameraV4L2Proxy (PlayerClient *pc, unsigned short index, unsigned char access='c')
virtual ~CameraV4L2Proxy ()
void FillData (player_msghdr_t hdr, const char *buffer)
int selectSourceI (int src_id)
 Selects input source by id.
int selectSourceS (const char *src_name)
 Selects input source by name.
int setFrameSize (int w, int h)
 Sets new capture frame size.
int setNormI (int normID)
 Selects norm (pal, ntsc, secam),.
int setNormS (const char *normID)
 Selects norm (pal, ntsc, secam),.
int setFieldTypeI (int fielsType)
 Selects field interleaving method.
int setFieldTypeS (const char *fielsType)
 Selects field interleaving method.
int setPixelFormatI (int pixFormat)
 Selects pixel format (RGB, Gray, ...).
int setPixelFormatS (const char *pixFormat)
 Selects pixel format (RGB, Gray, ...).
int setSwapRB (int swap)
 for RGB/BGR formats, if swap!=0, then swap Red and Blue
int setControlValueI (int id, double value)
 set new value for control. Value is range 0.0 - 1.0. Controll is identified by internal number in table of availabel controls for selected source. It should be in range 0..countControls()-1
int setControlValueS (const char *name, double value)
 set new value for control. Value is range 0.0 - 1.0. Controll is identified by name ("brighteness", "exposure"). Available controls depends on v4l2 device capabilities (refer to driver documentation or logs in player server)
double getControlValueI (int id)
 returns current control value in range 0-1. values below 0, means error while querying driver
double getControlValueS (const char *name)
 returns current control value in range 0-1. values below 0, means error while querying driver
const char * getControlName (int id)
 get name of given control id. id is 0..countControls()-1
int setBrighteness (double value)
 set brighteness value
double getBrighteness ()
 get actual brighteness (if changed externally)
int setSaturation (double value)
double getSaturation ()
 get actual saturation (if changed externally)
int setContrast (double value)
double getContrast ()
 get actual contrast (if changed externally)
int setHue (double value)
double getHue ()
 get actual hue (if changed externally)

Public Attributes

PixelFormats pixelFormat
 PLAYER_V4L2_FMT_RGB*, PLAYER_V4L2_FMT_BGR*, ...
char pixelFormatS [64]
 "RGB*", "BGR*", "GREY", ...
int swapRBFlag
 !=0 means swap R and B in RGB/BGR 24/32 formats
int noOfControls
 no of avaible controls
NormStandards norm
 tv norm (pal/secam/ntsc)
char normS [64]
 tv norm in char * form (usefull for some specific norms, like pal_dk)
FieldTypes field
 field interleaving type
char fieldS [64]
 field interleaving type
char name [64]
 name of capture card
char inputName [64]
 name of current input
double brighteness
 common controls proxy values
double contrast
double saturation
double hue

Private Member Functions

void refreshState ()
 refresh public attributes except controls (Hue/Brighteness/..)
const char * getInputName ()
 retrieves current input name
const char * getName ()
 retrieves device name
const char * getFieldS ()
 get current field settings
const char * getPixelFormatS ()
 get current pixel format
const char * getNormS ()
 get norm setting (pal etc.)
int countControls ()
 number of avaible controls


The documentation for this class was generated from the following files:
Generated on Thu Jun 29 22:04:43 2006 for Camerav4l2 by  doxygen 1.4.4