class PVideoInputDevice: public PVideoDevice

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 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.

Protected Methods

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


Inherited from PVideoDevice:

Public Methods

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 CanCaptureVideo(void)

Protected Fields

o

Protected Methods

ovirtual void SetCanCaptureVideo(BOOL newState)


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous 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 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.
Parameters:
buffer - Buffer to receive frame
bytesReturned - OPtional bytes returned.

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++.