PVideoInputDevice Class Reference

This class defines a video input device. More...

#include <videoio.h>

Inheritance diagram for PVideoInputDevice:

PVideoDevice PVideoFrameInfo PObject PVideoInput1394DcDevice List of all members.

Public Member Functions

 ~PVideoInputDevice ()
 Close the video input device on destruction.
virtual bool GetDeviceCapabilities (Capabilities *capabilities) const
 Retrieve a list of Device Capabilities.
virtual PVideoInputControlGetVideoInputControls ()
 Get the devices video Input controls By Default return NULL;.
virtual PBoolean Open (const PString &deviceName, PBoolean startImmediate=true)=0
 Open the device given the device name.
virtual PBoolean Close ()
 Close the device.
virtual PBoolean CanCaptureVideo () const
 Is the device a camera, and obtain video.
virtual PBoolean IsCapturing ()=0
 Determine if the video device I/O capture is in progress.
virtual PBoolean GetFrame (PBYTEArray &frame)
 Grab a frame.
virtual PBoolean GetFrameData (BYTE *buffer, PINDEX *bytesReturned, unsigned int &flags)
 Grab a frame, after a delay as specified by the frame rate.
virtual PBoolean GetFrameData (BYTE *buffer, PINDEX *bytesReturned=NULL)=0
virtual PBoolean GetFrameDataNoDelay (BYTE *buffer, PINDEX *bytesReturned, unsigned int &flags)
 Grab a frame.
virtual PBoolean GetFrameDataNoDelay (BYTE *buffer, PINDEX *bytesReturned=NULL)=0
virtual bool FlowControl (const void *flowData)
 Pass data to the inputdevice for flowControl determination.
virtual bool SetCaptureMode (unsigned mode)
 Set the capture modes for implementations that support them.
virtual int GetCaptureMode () const
 Returns the current capture mode.

Static Public Member Functions

static PStringArray GetDriverNames (PPluginManager *pluginMgr=NULL)
 Get the list of available video input drivers (plug-ins).
static PStringArray GetDriversDeviceNames (const PString &driverName, PPluginManager *pluginMgr=NULL)
 Get video input devices that correspond to the specified driver name.
static PVideoInputDeviceCreateDevice (const PString &driverName, PPluginManager *pluginMgr=NULL)
 Create the video input device that corresponds to the specified driver name.
static PVideoInputDeviceCreateDeviceByName (const PString &deviceName, const PString &driverName=PString::Empty(), PPluginManager *pluginMgr=NULL)
static PVideoInputDeviceCreateOpenedDevice (const PString &driverName, const PString &deviceName, PBoolean startImmediate=true, PPluginManager *pluginMgr=NULL)
 Create an opened video input device that corresponds to the specified names.
static PVideoInputDeviceCreateOpenedDevice (const OpenArgs &args, PBoolean startImmediate=true)
 Create an opened video output device that corresponds to the specified arguments.
static PBoolean GetDeviceCapabilities (const PString &deviceName, Capabilities *capabilities, PPluginManager *pluginMgr=NULL)
 Retrieve a list of Device Capabilities for particular device.
static PBoolean GetDeviceCapabilities (const PString &deviceName, const PString &driverName, Capabilities *caps, PPluginManager *pluginMgr=NULL)
 Retrieve a list of Device Capabilities for a particular driver.

Classes

struct  Capabilities

Detailed Description

This class defines a video input device.


Constructor & Destructor Documentation

PVideoInputDevice::~PVideoInputDevice (  )  [inline]

Close the video input device on destruction.


Member Function Documentation

virtual PBoolean PVideoInputDevice::CanCaptureVideo (  )  const [virtual]

Is the device a camera, and obtain video.

Implements PVideoDevice.

virtual PBoolean PVideoInputDevice::Close (  )  [inline, virtual]

Close the device.

Implements PVideoDevice.

Reimplemented in PVideoInput1394DcDevice.

static PVideoInputDevice* PVideoInputDevice::CreateDevice ( const PString driverName,
PPluginManager pluginMgr = NULL 
) [static]

Create the video input device that corresponds to the specified driver name.

Parameters:
driverName  Name of driver
pluginMgr  Plug in manager, use default if NULL

static PVideoInputDevice* PVideoInputDevice::CreateDeviceByName ( const PString deviceName,
const PString driverName = PString::Empty(),
PPluginManager pluginMgr = NULL 
) [static]

Parameters:
deviceName  Name of device
driverName  Name of driver (if any)
pluginMgr  Plug in manager, use default if NULL

static PVideoInputDevice* PVideoInputDevice::CreateOpenedDevice ( const OpenArgs &  args,
PBoolean  startImmediate = true 
) [static]

Create an opened video output device that corresponds to the specified arguments.

Parameters:
args  Parameters to set on opened device
startImmediate  Immediately start display

static PVideoInputDevice* PVideoInputDevice::CreateOpenedDevice ( const PString driverName,
const PString deviceName,
PBoolean  startImmediate = true,
PPluginManager pluginMgr = NULL 
) [static]

Create an opened video input device that corresponds to the specified names.

If the driverName parameter is an empty string or "*" then CreateDeviceByName is used with the deviceName parameter which is assumed to be a value returned from GetDriversDeviceNames().

Parameters:
driverName  Name of driver
deviceName  Name of device
startImmediate  Immediately start grabbing
pluginMgr  Plug in manager, use default if NULL

virtual bool PVideoInputDevice::FlowControl ( const void *  flowData  )  [virtual]

Pass data to the inputdevice for flowControl determination.

virtual int PVideoInputDevice::GetCaptureMode (  )  const [virtual]

Returns the current capture mode.

See SetCaptureMode() for more details. A return value of -1 indicates an error or the mode is not supported.

static PBoolean PVideoInputDevice::GetDeviceCapabilities ( const PString deviceName,
const PString driverName,
Capabilities caps,
PPluginManager pluginMgr = NULL 
) [static]

Retrieve a list of Device Capabilities for a particular driver.

Parameters:
deviceName  Name of device
driverName  Device Driver
caps  List of supported capabilities
pluginMgr  Plug in manager, use default if NULL

static PBoolean PVideoInputDevice::GetDeviceCapabilities ( const PString deviceName,
Capabilities capabilities,
PPluginManager pluginMgr = NULL 
) [static]

Retrieve a list of Device Capabilities for particular device.

Parameters:
deviceName  Name of device
capabilities  List of supported capabilities
pluginMgr  Plug in manager, use default if NULL

virtual bool PVideoInputDevice::GetDeviceCapabilities ( Capabilities capabilities  )  const [inline, virtual]

Retrieve a list of Device Capabilities.

Parameters:
capabilities  List of supported capabilities

static PStringArray PVideoInputDevice::GetDriverNames ( PPluginManager pluginMgr = NULL  )  [static]

Get the list of available video input drivers (plug-ins).

Parameters:
pluginMgr  Plug in manager, use default if NULL

static PStringArray PVideoInputDevice::GetDriversDeviceNames ( const PString driverName,
PPluginManager pluginMgr = NULL 
) [static]

Get video input devices that correspond to the specified driver name.

If driverName is an empty string or the value "*" then this will return a list of unique device names across all of the available drivers. If two drivers have identical names for devices, then the string returned will be of the form driver+'\t'+device.

Parameters:
driverName  Name of driver
pluginMgr  Plug in manager, use default if NULL

virtual PBoolean PVideoInputDevice::GetFrame ( PBYTEArray frame  )  [virtual]

Grab a frame.

virtual PBoolean PVideoInputDevice::GetFrameData ( BYTE *  buffer,
PINDEX *  bytesReturned = NULL 
) [pure virtual]

Parameters:
buffer  Buffer to receive frame
bytesReturned  Optional bytes returned.

Implemented in PVideoInput1394DcDevice.

virtual PBoolean PVideoInputDevice::GetFrameData ( BYTE *  buffer,
PINDEX *  bytesReturned,
unsigned int &  flags 
) [virtual]

Grab a frame, after a delay as specified by the frame rate.

Parameters:
buffer  Buffer to receive frame
bytesReturned  Optional bytes returned.
flags  optional flags returned

virtual PBoolean PVideoInputDevice::GetFrameDataNoDelay ( BYTE *  buffer,
PINDEX *  bytesReturned = NULL 
) [pure virtual]

Parameters:
buffer  Buffer to receive frame
bytesReturned  Optional bytes returned.

Implemented in PVideoInput1394DcDevice.

virtual PBoolean PVideoInputDevice::GetFrameDataNoDelay ( BYTE *  buffer,
PINDEX *  bytesReturned,
unsigned int &  flags 
) [virtual]

Grab a frame.

Do not delay according to the current frame rate parameter.

Parameters:
buffer  Buffer to receive frame
bytesReturned  Optional bytes returned.
flags  optional flags returned

virtual PVideoInputControl* PVideoInputDevice::GetVideoInputControls (  )  [virtual]

Get the devices video Input controls By Default return NULL;.

virtual PBoolean PVideoInputDevice::IsCapturing (  )  [pure virtual]

Determine if the video device I/O capture is in progress.

Implemented in PVideoInput1394DcDevice.

virtual PBoolean PVideoInputDevice::Open ( const PString deviceName,
PBoolean  startImmediate = true 
) [pure virtual]

Open the device given the device name.

Parameters:
deviceName  Device name to open
startImmediate  Immediately start device

Implements PVideoDevice.

Implemented in PVideoInput1394DcDevice.

virtual bool PVideoInputDevice::SetCaptureMode ( unsigned  mode  )  [virtual]

Set the capture modes for implementations that support them.

For example with Video For Windows, this is used to select picture (0) or video (1) modes.

In picture-mode the implementation requests a single frame from the connected camera device. The camera device then does nothing until the frame has been processed and the next is requested.

In video-mode the camera continuously sends new frames.

The default implementation does nothing but returns PFalse.


The documentation for this class was generated from the following file:
Generated on Fri Oct 14 01:44:14 2011 for PTLib by  doxygen 1.4.7