class PFakeVideoInputDevice: public PVideoInputDevice

This class defines a video input device that generates fictitous image data

Inheritance:


Public Methods

[more] PFakeVideoInputDevice ()
Create a new (fake) video input device
[more]BOOL Open ( const PString & deviceName, BOOL startImmediate = TRUE )
Open the device given the device name.
[more]BOOL IsOpen ()
Determine of the device is currently open
[more]BOOL Close ()
Close the device
[more]BOOL Start ()
Start the video device I/O
[more]BOOL Stop ()
Stop the video device I/O capture
[more]BOOL IsCapturing ()
Determine if the video device I/O capture is in progress
[more]PStringList GetDeviceNames () const
Get a list of all of the drivers available
[more]virtual PINDEX GetMaxFrameBytes ()
Get the maximum frame size in bytes.
[more]BOOL GetFrameData ( BYTE * buffer, PINDEX * bytesReturned = NULL )
Grab a frame.
[more]void FillFrameWithData (BYTE * buffer)
Called when this class has to generate a fictitous image
[more]void GrabMovingBlocksTestFrame (BYTE *resFrame)
A test image that contains area of low and high resolution.
[more]void GrabMovingLineTestFrame (BYTE *resFrame)
a test image consisting of a horizontal line moving down the image, with a constantly varying background.
[more]void GrabNTSCTestFrame (BYTE *resFrame)
Generate a constant image, which contains the colours for a NTSC test frame
[more]void GrabBouncingBoxes (BYTE *resFrame)
Generate three bouncing boxes, which bounce from a different height
[more]void FillRect (BYTE * frame, unsigned width, unsigned height, int x, int y, int rectWidth, int rectHeight, int r, int g, int b)
Fills a region of the image with a constant colour
[more]virtual void WaitFinishPreviousFrame ()
Given a preset interval of n milliseconds, this function returns n msecs after the previous frame capture was initiated
[more]virtual BOOL SetVideoFormat ( VideoFormat videoFormat )
Set the video format to be used.
[more]virtual int GetNumChannels ()
Get the number of video channels available on the device.
[more]virtual BOOL SetChannel ( int channelNumber )
Set the video channel to be used on the device.
[more]virtual BOOL SetColourFormat ( const PString & colourFormat )
Set the colour format to be used.
[more]virtual BOOL SetFrameRate ( unsigned rate )
Set the video frame rate to be used on the device.
[more]virtual BOOL GetFrameSizeLimits ( unsigned & minWidth, unsigned & minHeight, unsigned & maxWidth, unsigned & maxHeight )
Get the minimum & maximum size of a frame on the device.
[more]virtual BOOL SetFrameSize ( unsigned width, unsigned height )
Set the frame size to be used.


Inherited from PVideoInputDevice:

Public Methods

ostatic PStringList GetInputDeviceNames()
ovirtual BOOL GetFrame( PBYTEArray & frame )

Protected Methods

ovirtual BOOL VerifyHardwareFrameSize(unsigned width, unsigned height)


Inherited from PVideoDevice:

Public Methods

oconst PString& GetDeviceName() const
ovirtual VideoFormat GetVideoFormat() const
ovirtual int GetChannel() const
ovirtual BOOL SetColourFormatConverter( const PString & colourFormat )
oconst PString& GetColourFormat() const
ovirtual unsigned GetFrameRate() const
ovirtual BOOL SetFrameSizeConverter( unsigned width, unsigned height, BOOL bScaleNotCrop )
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 that generates fictitous image data
o PFakeVideoInputDevice()
Create a new (fake) video input device

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

oBOOL IsOpen()
Determine of the device is currently open

oBOOL Close()
Close the device

oBOOL Start()
Start the video device I/O

oBOOL Stop()
Stop the video device I/O capture

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

oPStringList GetDeviceNames() const
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.

oBOOL GetFrameData( BYTE * buffer, PINDEX * bytesReturned = NULL )
Grab a frame.
Parameters:
buffer - Buffer to receive frame
bytesReturned - Optional bytes returned.

ovoid FillFrameWithData(BYTE * buffer)
Called when this class has to generate a fictitous image

ovoid GrabMovingBlocksTestFrame(BYTE *resFrame)
A test image that contains area of low and high resolution. The picture changes every second

ovoid GrabMovingLineTestFrame(BYTE *resFrame)
a test image consisting of a horizontal line moving down the image, with a constantly varying background.

ovoid GrabNTSCTestFrame(BYTE *resFrame)
Generate a constant image, which contains the colours for a NTSC test frame

ovoid GrabBouncingBoxes(BYTE *resFrame)
Generate three bouncing boxes, which bounce from a different height

ovoid FillRect(BYTE * frame, unsigned width, unsigned height, int x, int y, int rectWidth, int rectHeight, int r, int g, int b)
Fills a region of the image with a constant colour

ovirtual void WaitFinishPreviousFrame()
Given a preset interval of n milliseconds, this function returns n msecs after the previous frame capture was initiated

ovirtual BOOL SetVideoFormat( VideoFormat videoFormat )
Set the video format to be used.

Default behaviour sets the value of the videoFormat variable and then returns the IsOpen() status.

Parameters:
videoFormat - New video format

ovirtual int GetNumChannels()
Get the number of video channels available on the device.

Default behaviour returns 1.

ovirtual BOOL SetChannel( int channelNumber )
Set the video channel to be used on the device.

Default behaviour sets the value of the channelNumber variable and then returns the IsOpen() status.

Parameters:
channelNumber - New channel number for device.

ovirtual BOOL SetColourFormat( const PString & colourFormat )
Set the colour format to be used.

Default behaviour sets the value of the colourFormat variable and then returns the IsOpen() status.

ovirtual BOOL SetFrameRate( unsigned rate )
Set the video frame rate to be used on the device.

Default behaviour sets the value of the frameRate variable and then return the IsOpen() status.

Parameters:
rate - Frames per second

ovirtual BOOL GetFrameSizeLimits( unsigned & minWidth, unsigned & minHeight, unsigned & maxWidth, unsigned & maxHeight )
Get the minimum & maximum size of a frame on the device.

Default behaviour returns the value 1 to UINT_MAX for both and returns FALSE.

Parameters:
minWidth - Variable to receive minimum width
minHeight - Variable to receive minimum height
maxWidth - Variable to receive maximum width
maxHeight - Variable to receive maximum height

ovirtual BOOL SetFrameSize( unsigned width, unsigned height )
Set the frame size to be used.

Default behaviour sets the frameWidth and frameHeight variables and returns the IsOpen() status.

Parameters:
width - New width of frame
height - New height of frame


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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