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

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

PVideoDevice Class Reference

#include <videoio.h>

Inheritance diagram for PVideoDevice:
Inheritance graph
Collaboration diagram for PVideoDevice:
Collaboration graph

List of all members.


struct  OpenArgs

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 =0
virtual BOOL Close ()=0
virtual int GetBrightness ()
virtual int GetChannel () const
virtual int GetColour ()
const PStringGetColourFormat () const
virtual int GetContrast ()
const PStringGetDeviceName () const
virtual PStringList GetDeviceNames () const =0
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)
virtual unsigned GetFrameWidth () const
virtual int GetHue ()
int GetLastError () const
virtual PINDEX GetMaxFrameBytes ()=0
virtual int GetNumChannels ()
virtual BOOL GetParameters (int *whiteness, int *brightness, int *colour, int *contrast, int *hue)
const PStringGetPreferredColourFormat ()
virtual BOOL GetVFlipState ()
virtual VideoFormat GetVideoFormat () const
virtual int GetWhiteness ()
virtual BOOL IsOpen ()=0
virtual BOOL Open (const PString &deviceName, BOOL startImmediate=TRUE)=0
virtual BOOL OpenFull (const OpenArgs &args, BOOL startImmediate=TRUE)
virtual BOOL SetBrightness (unsigned newBrightness)
virtual BOOL SetChannel (int channelNumber)
virtual BOOL SetColour (unsigned newColour)
virtual BOOL SetColourFormat (const PString &colourFormat)
virtual BOOL SetColourFormatConverter (const PString &colourFormat)
virtual BOOL SetContrast (unsigned newContrast)
virtual BOOL SetFrameRate (unsigned rate)
virtual BOOL SetFrameSize (unsigned width, unsigned height)
virtual BOOL SetFrameSizeConverter (unsigned width, unsigned height, BOOL bScaleNotCrop)
virtual BOOL SetHue (unsigned newHue)
void SetPreferredColourFormat (const PString &colourFmt)
virtual BOOL SetVFlipState (BOOL newVFlipState)
virtual BOOL SetVideoChannelFormat (int channelNumber, VideoFormat videoFormat)
virtual BOOL SetVideoFormat (VideoFormat videoFormat)
virtual BOOL SetWhiteness (unsigned newWhiteness)
virtual BOOL Start ()=0
virtual BOOL Stop ()=0
virtual ~PVideoDevice ()
Miscellaneous functions
virtual PObjectClone () const
virtual PINDEX HashFunction () const

Static Public Member Functions

static unsigned CalculateFrameBytes (unsigned width, unsigned height, const PString &colourFormat)

Protected Member Functions

PINDEX GetMaxFrameBytesConverted (PINDEX rawFrameBytes) const
 PVideoDevice ()

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 (PVideoDevice, PObject)

Comparison functions

enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
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

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 ()

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

This class defines a video device. This class is used to abstract the few parameters that are common to both\ input and output devices.

Example colour formats are:

"Grey" Simple 8 bit linear grey scale "Gray" Synonym for Grey "RGB32" 32 bit RGB "RGB24" 24 bit RGB "RGB565" 16 bit RGB (6 bit green) "RGB555" 15 bit RGB "YUV422" YUV 4:2:2 packed "YUV422P" YUV 4:2:2 planar "YUV411" YUV 4:1:1 packed "YUV411P" YUV 4:1:1 planar "YUV420" YUV 4:2:0 packed "YUV420P" YUV 4:2:0 planar "YUV410" YUV 4:1:0 packed "YUV410P" YUV 4:1:0 planar "MJPEG" Motion JPEG "UYVY422" YUV 4:2:2 packed as U Y V Y U Y V Y ... "UYV444 YUV 4:4:4 packed as U Y V U Y V ... They are used in IEEE 1394 digital cameras. The specification is found at http://www.1394ta.org/Download/Technology/Specifications/2000/IIDC_Spec_v1_30.pdf

Definition at line 231 of file videoio.h.

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

Generated by  Doxygen 1.6.0   Back to index