Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions

PVideoInputDevice_V4L2 Class Reference

Inheritance diagram for PVideoInputDevice_V4L2:
Inheritance graph
Collaboration diagram for PVideoInputDevice_V4L2:
Collaboration graph

List of all members.

Public Types

enum  StandardSizes {
  CIF16Width = 1408, CIF16Height = 1152, CIF4Width = 704, CIF4Height = 576,
  CIFWidth = 352, CIFHeight = 288, QCIFWidth = 176, QCIFHeight = 144,
  SQCIFWidth = 144, SQCIFHeight = 96
enum  VideoFormat {

Public Member Functions

virtual BOOL CanCaptureVideo () const
void ClearMapping ()
BOOL Close ()
int GetBrightness ()
virtual int GetChannel () const
int GetColour ()
const PStringGetColourFormat () const
int GetContrast ()
int GetControlCommon (unsigned int control, int *value)
const PStringGetDeviceName () const
PStringList GetDeviceNames () const
virtual BOOL GetFrame (PBYTEArray &frame)
BOOL GetFrameData (BYTE *, PINDEX *)
BOOL GetFrameDataNoDelay (BYTE *, PINDEX *)
virtual unsigned GetFrameHeight () const
virtual unsigned GetFrameRate () const
virtual BOOL GetFrameSize (unsigned &width, unsigned &height)
virtual BOOL GetFrameSizeLimits (unsigned &minWidth, unsigned &minHeight, unsigned &maxWidth, unsigned &maxHeight)
BOOL GetFrameSizeLimits (unsigned int &, unsigned int &, unsigned int &, unsigned int &)
virtual unsigned GetFrameWidth () const
int GetHue ()
int GetLastError () const
PINDEX GetMaxFrameBytes ()
int GetNumChannels ()
BOOL GetParameters (int *, int *, int *, int *, int *)
const PStringGetPreferredColourFormat ()
virtual BOOL GetVFlipState ()
virtual VideoFormat GetVideoFormat () const
int GetWhiteness ()
BOOL IsCapturing ()
BOOL IsOpen ()
BOOL NormalReadProcess (BYTE *, PINDEX *)
BOOL Open (const PString &deviceName, BOOL startImmediate)
virtual BOOL OpenFull (const OpenArgs &args, BOOL startImmediate=TRUE)
void ReadDeviceDirectory (PDirectory, POrdinalToString &)
BOOL SetBrightness (unsigned int)
BOOL SetChannel (int)
BOOL SetColour (unsigned int)
BOOL SetColourFormat (const PString &)
virtual BOOL SetColourFormatConverter (const PString &colourFormat)
BOOL SetContrast (unsigned int)
BOOL SetControlCommon (unsigned int control, int newValue)
BOOL SetFrameRate (unsigned int)
BOOL SetFrameSize (unsigned int, unsigned int)
virtual BOOL SetFrameSizeConverter (unsigned width, unsigned height, BOOL bScaleNotCrop)
BOOL SetHue (unsigned int)
BOOL SetMapping ()
void SetPreferredColourFormat (const PString &colourFmt)
virtual BOOL SetVFlipState (BOOL newVFlipState)
BOOL SetVideoChannelFormat (int, PVideoDevice::VideoFormat)
BOOL SetVideoFormat (PVideoDevice::VideoFormat)
BOOL SetWhiteness (unsigned int)
BOOL Start ()
BOOL Stop ()
BOOL TestAllFormats ()
BOOL VerifyHardwareFrameSize (unsigned int, unsigned int)
Miscellaneous functions
virtual PObjectClone () const
virtual PINDEX HashFunction () const

Static Public Member Functions

static unsigned CalculateFrameBytes (unsigned width, unsigned height, const PString &colourFormat)
static PVideoInputDeviceCreateDevice (const PString &driverName, PPluginManager *pluginMgr=NULL)
static PVideoInputDeviceCreateDeviceByName (const PString &deviceName, PPluginManager *pluginMgr=NULL)
static PVideoInputDeviceCreateOpenedDevice (const PString &driverName, const PString &deviceName, BOOL startImmediate=TRUE, PPluginManager *pluginMgr=NULL)
static PStringList GetDriverNames (PPluginManager *pluginMgr=NULL)
static PStringList GetDriversDeviceNames (const PString &driverName, PPluginManager *pluginMgr=NULL)
static PStringList GetInputDeviceNames ()

Public Attributes

BOOL canRead
BOOL canSelect
BOOL canSetFrameRate
BOOL canStream
uint currentvideoBuffer
int frameBytes
BOOL isMapped
BOOL started
BYTE * videoBuffer [NUM_VIDBUF]
uint videoBufferCount
struct v4l2_capability videoCapability
int videoFd
struct v4l2_streamparm videoStreamParm

Protected Member Functions

PINDEX GetMaxFrameBytesConverted (PINDEX rawFrameBytes) const

Protected Attributes

int channelNumber
PString colourFormat
PString deviceName
int frameBrightness
int frameColour
int frameContrast
unsigned frameHeight
int frameHue
unsigned frameRate
int frameTimeError
int frameWhiteness
unsigned frameWidth
int lastError
int msBetweenFrames
BOOL nativeVerticalFlip
PString preferredColourFormat
PTime previousFrameTime
VideoFormat videoFormat

Private Member Functions

 PCLASSINFO (PVideoInputDevice_V4L2, PVideoInputDevice)

Run Time Type functions

virtual const char * GetClass (unsigned=0) const
BOOL IsClass (const char *cls) const
virtual BOOL InternalIsDescendant (const char *clsName) const
static const char * Class ()

Comparison functions

virtual Comparison Compare (const PObject &obj) const
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
bool operator== (const PObject &obj) const
bool operator!= (const PObject &obj) const
bool operator< (const PObject &obj) const
bool operator> (const PObject &obj) const
bool operator<= (const PObject &obj) const
bool operator>= (const PObject &obj) const
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }

I/O functions

virtual void PrintOn (ostream &strm) const
virtual void ReadFrom (istream &strm)
ostream & operator<< (ostream &strm, const PObject &obj)
istream & operator>> (istream &strm, PObject &obj)

Detailed Description

Definition at line 79 of file vidinput_v4l2.h.

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

Generated by  Doxygen 1.6.0   Back to index