#include <videoio.h>
Inheritance diagram for PVideoInputDevice:
Public Member Functions | |
~PVideoInputDevice () | |
Close the video input device on destruction. | |
virtual bool | GetDeviceCapabilities (Capabilities *capabilities) const |
Retrieve a list of Device Capabilities. | |
virtual PVideoInputControl * | GetVideoInputControls () |
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 PVideoInputDevice * | CreateDevice (const PString &driverName, PPluginManager *pluginMgr=NULL) |
Create the video input device that corresponds to the specified driver name. | |
static PVideoInputDevice * | CreateDeviceByName (const PString &deviceName, const PString &driverName=PString::Empty(), PPluginManager *pluginMgr=NULL) |
static PVideoInputDevice * | CreateOpenedDevice (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 PVideoInputDevice * | CreateOpenedDevice (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 |
PVideoInputDevice::~PVideoInputDevice | ( | ) | [inline] |
Close the video input device on destruction.
virtual PBoolean PVideoInputDevice::CanCaptureVideo | ( | ) | const [virtual] |
virtual PBoolean PVideoInputDevice::Close | ( | ) | [inline, virtual] |
static PVideoInputDevice* PVideoInputDevice::CreateDevice | ( | const PString & | driverName, | |
PPluginManager * | pluginMgr = NULL | |||
) | [static] |
Create the video input device that corresponds to the specified driver name.
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] |
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.
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().
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.
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.
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] |
static PStringArray PVideoInputDevice::GetDriverNames | ( | PPluginManager * | pluginMgr = NULL |
) | [static] |
Get the list of available video input drivers (plug-ins).
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.
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] |
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.
buffer | Buffer to receive frame |
bytesReturned | Optional bytes returned. |
flags | optional flags returned |
virtual PBoolean PVideoInputDevice::GetFrameDataNoDelay | ( | BYTE * | buffer, | |
PINDEX * | bytesReturned = NULL | |||
) | [pure virtual] |
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.
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] |
virtual PBoolean PVideoInputDevice::Open | ( | const PString & | deviceName, | |
PBoolean | startImmediate = true | |||
) | [pure virtual] |
Open the device given the device name.
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.