class PVideoInputDevice

This class defines a video input device

Inheritance:


Public Methods

[more]static PStringList GetDriverNames (PPluginManager* pluginMgr = NULL)
Return the list of available video input drivers
[more]static PStringList GetDriversDeviceNames ( const PString &driverName, PPluginManager* pluginMgr = NULL )
Return video devices that correspond to the specified name
[more]static PVideoInputDevice* CreateDevice ( const PString &driverName, PPluginManager* pluginMgr = NULL )
Return the video input device that corresponds to the specified name
[more]static PVideoInputDevice* CreateOpenedDevice ( const PString & driverName, const PString & deviceName, BOOL startImmediate = TRUE, PPluginManager* pluginMgr = NULL )
Return opened video input device that corresponds to the specified name
[more]virtual BOOL CanCaptureVideo () const
Is the device a camera, and obtain video
[more]virtual BOOL Open ( const PString & deviceName, BOOL startImmediate = TRUE )
Open the device given the device name.
[more]virtual BOOL IsCapturing ()
Determine if the video device I/O capture is in progress
[more]virtual PINDEX GetMaxFrameBytes ()
Get the maximum frame size in bytes.
[more]virtual BOOL GetFrame ( PBYTEArray & frame )
Grab a frame
[more]virtual BOOL GetFrameData ( BYTE* buffer, PINDEX* bytesReturned = NULL )
Grab a frame, after a delay as specified by the frame rate.
[more]virtual BOOL GetFrameDataNoDelay ( BYTE* buffer, PINDEX* bytesReturned = NULL )
Grab a frame.
[more]virtual BOOL TestAllFormats ()
Try all known video formats & see which ones are accepted by the video driver

Public Members

[more] Create a new video input device


Inherited from PVideoDevice:

Public Methods

ovirtual BOOL OpenFull( const OpenArgs & args, BOOL startImmediate = TRUE )
ovirtual BOOL IsOpen()
ovirtual BOOL Close()
ovirtual BOOL Start()
ovirtual BOOL Stop()
oconst PString& GetDeviceName() const
ovirtual PStringList GetDeviceNames() const
ovirtual BOOL SetVideoFormat( VideoFormat videoFormat )
ovirtual VideoFormat GetVideoFormat() const
ovirtual int GetNumChannels()
ovirtual BOOL SetChannel( int channelNumber )
ovirtual int GetChannel() const
ovirtual BOOL SetColourFormatConverter( const PString & colourFormat )
ovirtual BOOL SetColourFormat( const PString & colourFormat )
oconst PString& GetColourFormat() const
ovirtual BOOL SetFrameRate( unsigned rate )
ovirtual unsigned GetFrameRate() const
ovirtual BOOL GetFrameSizeLimits( unsigned & minWidth, unsigned & minHeight, unsigned & maxWidth, unsigned & maxHeight )
ovirtual BOOL SetFrameSizeConverter( unsigned width, unsigned height, BOOL bScaleNotCrop )
ovirtual BOOL SetFrameSize( unsigned width, unsigned height )
ovirtual BOOL GetFrameSize( unsigned & width, unsigned & height )
ovirtual unsigned GetFrameWidth() const
ovirtual unsigned GetFrameHeight() const
ostatic unsigned CalculateFrameBytes( unsigned width, unsigned height, const PString & colourFormat )
oint GetLastError() const
ovirtual int GetBrightness()
ovirtual BOOL SetBrightness(unsigned newBrightness)
ovirtual int GetWhiteness()
ovirtual BOOL SetWhiteness(unsigned newWhiteness)
ovirtual int GetColour()
ovirtual BOOL SetColour(unsigned newColour)
ovirtual int GetContrast()
ovirtual BOOL SetContrast(unsigned newContrast)
ovirtual int GetHue()
ovirtual BOOL SetHue(unsigned newHue)
ovirtual BOOL GetParameters( int* whiteness, int* brightness, int* colour, int* contrast, int* hue )
ovirtual BOOL SetVideoChannelFormat( int channelNumber, VideoFormat videoFormat )
ovirtual BOOL GetVFlipState()
ovirtual BOOL SetVFlipState( BOOL newVFlipState )
ovoid SetPreferredColourFormat(const PString & colourFmt)
oconst PString& GetPreferredColourFormat()


Inherited from PObject:

Public Methods

Run Time Type functions

I/O functions

Public Members

Comparison functions


Documentation

This class defines a video input device
o Create a new video input device
Create a new video input device

ostatic PStringList GetDriverNames(PPluginManager* pluginMgr = NULL)
Return the list of available video input drivers

ostatic PStringList GetDriversDeviceNames( const PString &driverName, PPluginManager* pluginMgr = NULL )
Return video devices that correspond to the specified name

ostatic PVideoInputDevice* CreateDevice( const PString &driverName, PPluginManager* pluginMgr = NULL )
Return the video input device that corresponds to the specified name

ostatic PVideoInputDevice* CreateOpenedDevice( const PString & driverName, const PString & deviceName, BOOL startImmediate = TRUE, PPluginManager* pluginMgr = NULL )
Return opened video input device that corresponds to the specified name

ovirtual BOOL CanCaptureVideo() const
Is the device a camera, and obtain video

ovirtual BOOL Open( const PString & deviceName, BOOL startImmediate = TRUE ) = 0
Open the device given the device name.
Parameters:
deviceName - Device name to open
startImmediate - Immediately start device

ovirtual BOOL IsCapturing() = 0
Determine if the video device I/O capture is in progress

ovirtual PINDEX GetMaxFrameBytes() = 0
Get the maximum frame size in bytes.

Note a particular device may be able to provide variable length frames (eg motion JPEG) so will be the maximum size of all frames.

ovirtual BOOL GetFrame( PBYTEArray & frame ) = 0
Grab a frame

ovirtual BOOL GetFrameData( BYTE* buffer, PINDEX* bytesReturned = NULL ) = 0
Grab a frame, after a delay as specified by the frame rate.
Parameters:
- buffer Buffer to receive frame
bytesReturned - OPtional bytes returned.

ovirtual BOOL GetFrameDataNoDelay( BYTE* buffer, PINDEX* bytesReturned = NULL ) = 0
Grab a frame. Do not delay according to the current frame rate parameter.
Parameters:
- buffer Buffer to receive frame
bytesReturned - OPtional bytes returned.

ovirtual BOOL TestAllFormats() = 0
Try all known video formats & see which ones are accepted by the video driver


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.