class PVideoInputDevice

This class defines a video input device

Inheritance:


Public Methods

[more] PVideoInputDevice ()
Create a new video input device
[more] ~PVideoInputDevice ()
Close the video input device on destruction
[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 IsOpen ()
Determine of the device is currently open
[more]virtual BOOL Close ()
Close the device
[more]virtual BOOL Start ()
Start the video device I/O
[more]virtual BOOL Stop ()
Stop the video device I/O capture
[more]virtual BOOL IsCapturing ()
Determine if the video device I/O capture is in progress
[more]virtual PStringList GetDeviceNames () const
Get a list of all of the drivers available
[more]static PStringList GetInputDeviceNames ()
Get a list of all of the drivers available
[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

Protected Methods

[more]virtual BOOL VerifyHardwareFrameSize (unsigned width, unsigned height)
Check the hardware can do the asked for size.


Inherited from PVideoDevice:

Public Methods

ovirtual BOOL OpenFull( const OpenArgs & args, BOOL startImmediate = TRUE )
oconst PString& GetDeviceName() 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

Miscellaneous functions

Public Members

Comparison functions


Documentation

This class defines a video input device
o PVideoInputDevice()
Create a new video input device

o ~PVideoInputDevice()
Close the video input device on destruction

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

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

ovirtual BOOL IsOpen()
Determine of the device is currently open

ovirtual BOOL Close()
Close the device

ovirtual BOOL Start()
Start the video device I/O

ovirtual BOOL Stop()
Stop the video device I/O capture

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

ovirtual PStringList GetDeviceNames() const
Get a list of all of the drivers available

ostatic PStringList GetInputDeviceNames()
Get a list of all of the drivers available

ovirtual PINDEX GetMaxFrameBytes()
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 )
Grab a frame

ovirtual BOOL GetFrameData( BYTE* buffer, PINDEX* bytesReturned = NULL )
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 )
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()
Try all known video formats & see which ones are accepted by the video driver

ovirtual BOOL VerifyHardwareFrameSize(unsigned width, unsigned height)
Check the hardware can do the asked for size.

Note that not all cameras can provide all frame sizes.


Direct child classes:
PFakeVideoInputDevice

Alphabetic index HTML hierarchy of classes or Java



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