#include <videoio.h>
Public Member Functions | |
~PVideoInputDevice () | |
virtual BOOL | Open (const PString &deviceName, BOOL startImmediate=TRUE)=0 |
virtual BOOL | Close () |
virtual BOOL | CanCaptureVideo () const |
virtual BOOL | IsCapturing ()=0 |
virtual BOOL | GetFrame (PBYTEArray &frame) |
virtual BOOL | GetFrameData (BYTE *buffer, PINDEX *bytesReturned=NULL)=0 |
virtual BOOL | GetFrameDataNoDelay (BYTE *buffer, PINDEX *bytesReturned=NULL)=0 |
virtual BOOL | TestAllFormats ()=0 |
Static Public Member Functions | |
static PStringList | GetDriverNames (PPluginManager *pluginMgr=NULL) |
static PStringList | GetDriversDeviceNames (const PString &driverName, PPluginManager *pluginMgr=NULL) |
static PVideoInputDevice * | CreateDevice (const PString &driverName, PPluginManager *pluginMgr=NULL) |
static PVideoInputDevice * | CreateDeviceByName (const PString &deviceName, PPluginManager *pluginMgr=NULL) |
static PVideoInputDevice * | CreateOpenedDevice (const PString &driverName, const PString &deviceName, BOOL startImmediate=TRUE, PPluginManager *pluginMgr=NULL) |
PVideoInputDevice::~PVideoInputDevice | ( | ) | [inline] |
Create a new video input device.Close the video input device on destruction.
static PStringList 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 PStringList 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+''+device.
driverName | Name of driver |
pluginMgr | Plug in manager, use default if NULL |
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, | |
PPluginManager * | pluginMgr = NULL | |||
) | [static] |
deviceName | Name of device |
pluginMgr | Plug in manager, use default if NULL |
static PVideoInputDevice* PVideoInputDevice::CreateOpenedDevice | ( | const PString & | driverName, | |
const PString & | deviceName, | |||
BOOL | 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::Open | ( | const PString & | deviceName, | |
BOOL | 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::Close | ( | ) | [inline, virtual] |
virtual BOOL PVideoInputDevice::CanCaptureVideo | ( | ) | const [virtual] |
Is the device a camera, and obtain video
Implements PVideoDevice.
virtual BOOL PVideoInputDevice::IsCapturing | ( | ) | [pure virtual] |
Determine if the video device I/O capture is in progress.
Implemented in PVideoInput1394DcDevice.
virtual BOOL PVideoInputDevice::GetFrame | ( | PBYTEArray & | frame | ) | [virtual] |
Grab a frame.
virtual BOOL PVideoInputDevice::GetFrameData | ( | BYTE * | buffer, | |
PINDEX * | bytesReturned = NULL | |||
) | [pure virtual] |
Grab a frame, after a delay as specified by the frame rate.
buffer | Buffer to receive frame |
bytesReturned | OPtional bytes returned. |
Implemented in PVideoInput1394DcDevice.
virtual BOOL PVideoInputDevice::GetFrameDataNoDelay | ( | BYTE * | buffer, | |
PINDEX * | bytesReturned = NULL | |||
) | [pure virtual] |
Grab a frame. Do not delay according to the current frame rate parameter.
buffer | Buffer to receive frame |
bytesReturned | OPtional bytes returned. |
Implemented in PVideoInput1394DcDevice.
virtual BOOL PVideoInputDevice::TestAllFormats | ( | ) | [pure virtual] |
Try all known video formats & see which ones are accepted by the video driver
Implemented in PVideoInput1394DcDevice.