class PVideoDevice |
This class defines a video device.
![]() | ~PVideoDevice () Delete structures created by PVideoDevice(); |
![]() | OpenFull ( const OpenArgs & args, BOOL startImmediate = TRUE ) Open the device given the device name. |
![]() | Open ( const PString & deviceName, BOOL startImmediate = TRUE ) Open the device given the device name. |
![]() | IsOpen () Determine if the device is currently open |
![]() | Close () Close the device |
![]() | Start () Start the video device I/O capture |
![]() | Stop () Stop the video device I/O capture |
![]() | GetDeviceName () const Get the device name of the open device |
![]() | GetDeviceNames () const Get a list of all of the drivers available |
![]() | SetVideoFormat ( VideoFormat videoFormat ) Set the video format to be used. |
![]() | GetVideoFormat () const Get the video format being used. |
![]() | GetNumChannels () Get the number of video channels available on the device. |
![]() | SetChannel ( int channelNumber ) Set the video channel to be used on the device. |
![]() | GetChannel () const Get the video channel to be used on the device. |
![]() | SetColourFormatConverter ( const PString & colourFormat ) Set the colour format to be used, trying converters if available. |
![]() | SetColourFormat ( const PString & colourFormat ) Set the colour format to be used. |
![]() | GetColourFormat () const Get the colour format to be used. |
![]() | SetFrameRate ( unsigned rate ) Set the video frame rate to be used on the device. |
![]() | GetFrameRate () const Get the video frame rate used on the device. |
![]() | GetFrameSizeLimits ( unsigned & minWidth, unsigned & minHeight, unsigned & maxWidth, unsigned & maxHeight ) Get the minimum & maximum size of a frame on the device. |
![]() | SetFrameSizeConverter ( unsigned width, unsigned height, BOOL bScaleNotCrop ) Set the frame size to be used, trying converters if available. |
![]() | SetFrameSize ( unsigned width, unsigned height ) Set the frame size to be used. |
![]() | GetFrameSize ( unsigned & width, unsigned & height ) Get the frame size being used. |
![]() | GetFrameWidth () const Get the width of the frame being used. |
![]() | GetFrameHeight () const Get the height of the frame being used. |
![]() | GetMaxFrameBytes () Get the maximum frame size in bytes. |
![]() | CalculateFrameBytes ( unsigned width, unsigned height, const PString & colourFormat ) Get the number of bytes of an image, given a particular width, height and colour format |
![]() | GetLastError () const Get the last error code. |
![]() | CanCaptureVideo () const Is the device a camera, and obtain video |
![]() | GetBrightness () Get the brightness of the image. |
![]() | SetBrightness (unsigned newBrightness) Set brightness of the image. |
![]() | GetWhiteness () Get the whiteness of the image. |
![]() | SetWhiteness (unsigned newWhiteness) Set whiteness of the image. |
![]() | GetColour () Get the colour of the image. |
![]() | SetColour (unsigned newColour) Set colour of the image. |
![]() | GetContrast () Get the contrast of the image. |
![]() | SetContrast (unsigned newContrast) Set contrast of the image. |
![]() | GetHue () Get the hue of the image. |
![]() | SetHue (unsigned newHue) Set hue of the image. |
![]() | GetParameters ( int* whiteness, int* brightness, int* colour, int* contrast, int* hue ) Return whiteness, brightness, colour, contrast and hue in one call |
![]() | SetVideoChannelFormat ( int channelNumber, VideoFormat videoFormat ) Set VideoFormat and VideoChannel in one ioctl |
![]() | GetVFlipState () Get the video conversion vertical flip state. |
![]() | SetVFlipState ( BOOL newVFlipState ) Set the video conversion vertical flip state. |
![]() | SetPreferredColourFormat (const PString & colourFmt) Set preferred native colour format from video capture device. |
![]() | GetPreferredColourFormat () Get preferred native colour format from video capture device. |
![]() | PVideoDevice () Create a new video device (input or output) |
Run Time Type functions
I/O functions
Comparison functions
This class defines a video device. This class is used to abstract the few parameters that are common to both\ input and output devices.Example colour formats are:
"Grey" Simple 8 bit linear grey scale "Gray" Synonym for Grey "RGB32" 32 bit RGB "RGB24" 24 bit RGB "RGB565" 16 bit RGB (6 bit green) "RGB555" 15 bit RGB "YUV422" YUV 4:2:2 packed "YUV422P" YUV 4:2:2 planar "YUV411" YUV 4:1:1 packed "YUV411P" YUV 4:1:1 planar "YUV420" YUV 4:2:0 packed "YUV420P" YUV 4:2:0 planar "YUV410" YUV 4:1:0 packed "YUV410P" YUV 4:1:0 planar "MJPEG" Motion JPEG "UYVY422" YUV 4:2:2 packed as U Y V Y U Y V Y ... "UYV444 YUV 4:4:4 packed as U Y V U Y V ... They are used in IEEE 1394 digital cameras. The specification is found at http://www.1394ta.org/Download/Technology/Specifications/2000/IIDC_Spec_v1_30.pdf
Default behaviour sets the value of the videoFormat variable and then returns TRUE.
Default behaviour returns the value of the videoFormat variable.
Default behaviour returns 1.
Default behaviour sets the value of the channelNumber variable and then returns TRUE.
Default behaviour returns the value of the channelNumber variable.
This function will set the colour format on the device to one that is compatible with a registered converter, and install that converter so that the correct format is used.
To utilise an internal converter use the SetColourFormatConverter() function.
Default behaviour sets the value of the colourFormat variable and then returns TRUE.
Default behaviour returns the value of the colourFormat variable.
Default behaviour sets the value of the frameRate variable and then returns TRUE.
Default behaviour returns the value of the frameRate variable.
Default behaviour returns the value 1 to UINT_MAX for both and returns FALSE.
If the device does not support the size, a set of alternate resolutions are attempted. A converter is setup if possible.
Note that devices may not be able to produce the requested size, and this function will fail. See SetFrameSizeConverter().
Default behaviour sets the frameWidth and frameHeight variables and returns TRUE.
Default behaviour returns the value of the frameWidth and frameHeight variable and returns TRUE.
Default behaviour returns the value of the frameWidth variable
Default behaviour returns the value of the frameHeight variable
Note a particular device may be able to provide variable length frames (eg motion JPEG) so will be the maximum size of all frames.
Alphabetic index HTML hierarchy of classes or Java