#include <videoio1394dc.h>
Inheritance diagram for PVideoInput1394DcDevice:
Public Member Functions | |
PVideoInput1394DcDevice () | |
Create a new video input device. | |
~PVideoInput1394DcDevice () | |
Close the video input device on destruction. | |
PBoolean | Open (const PString &deviceName, PBoolean startImmediate=true) |
Open the device given the device name. | |
PBoolean | IsOpen () |
Determine of the device is currently open. | |
PBoolean | Close () |
Close the device. | |
PBoolean | Start () |
Start the video device I/O. | |
PBoolean | Stop () |
Stop the video device I/O capture. | |
PBoolean | IsCapturing () |
Determine if the video device I/O capture is in progress. | |
PINDEX | GetMaxFrameBytes () |
Get the maximum frame size in bytes. | |
PBoolean | GetFrameData (BYTE *buffer, PINDEX *bytesReturned=NULL) |
Grab a frame, after a delay as specified by the frame rate. | |
PBoolean | GetFrameDataNoDelay (BYTE *buffer, PINDEX *bytesReturned=NULL) |
Grab a frame. | |
int | GetBrightness () |
Get the brightness of the image. | |
PBoolean | SetBrightness (unsigned newBrightness) |
Set brightness of the image. | |
int | GetWhiteness () |
Get the whiteness of the image. | |
PBoolean | SetWhiteness (unsigned newWhiteness) |
Set whiteness of the image. | |
int | GetColour () |
Get the colour of the image. | |
PBoolean | SetColour (unsigned newColour) |
Set colour of the image. | |
int | GetContrast () |
Get the contrast of the image. | |
PBoolean | SetContrast (unsigned newContrast) |
Set contrast of the image. | |
int | GetHue () |
Get the hue of the image. | |
PBoolean | SetHue (unsigned newHue) |
Set hue of the image. | |
PBoolean | GetParameters (int *whiteness, int *brightness, int *colour, int *contrast, int *hue) |
Return whiteness, brightness, colour, contrast and hue in one call. | |
PBoolean | GetFrameSizeLimits (unsigned &minWidth, unsigned &minHeight, unsigned &maxWidth, unsigned &maxHeight) |
Get the minimum & maximum size of a frame on the device. | |
void | ClearMapping () |
int | GetNumChannels () |
Get the number of video channels available on the device. | |
PBoolean | SetChannel (int channelNumber) |
Set the video channel to be used on the device. | |
PBoolean | SetFrameRate (unsigned rate) |
Set the video frame rate to be used on the device. | |
PBoolean | SetVideoFormat (VideoFormat videoFormat) |
PBoolean | SetFrameSize (unsigned width, unsigned height) |
Set the frame size to be used. | |
PBoolean | SetColourFormat (const PString &colourFormat) |
Set the colour format to be used. | |
PBoolean | TestAllFormats () |
Try all known video formats & see which ones are accepted by the video driver. | |
PBoolean | SetFrameSizeConverter (unsigned width, unsigned height, PBoolean bScaleNotCrop) |
Set the frame size to be used, trying converters if available. | |
PBoolean | SetColourFormatConverter (const PString &colourFormat) |
Set the colour format to be used, trying converters if available. | |
Static Public Member Functions | |
static PStringList | GetInputDeviceNames () |
Get a list of all of the drivers available. | |
Protected Attributes | |
raw1394handle_t | handle |
PBoolean | is_capturing |
PBoolean | UseDMA |
nodeid_t * | camera_nodes |
int | numCameras |
dc1394_cameracapture | camera |
int | capturing_duration |
PString | desiredColourFormat |
unsigned | desiredFrameWidth |
unsigned | desiredFrameHeight |
PVideoInput1394DcDevice::PVideoInput1394DcDevice | ( | ) |
Create a new video input device.
PVideoInput1394DcDevice::~PVideoInput1394DcDevice | ( | ) |
Close the video input device on destruction.
void PVideoInput1394DcDevice::ClearMapping | ( | ) |
PBoolean PVideoInput1394DcDevice::Close | ( | ) | [virtual] |
int PVideoInput1394DcDevice::GetBrightness | ( | ) | [virtual] |
int PVideoInput1394DcDevice::GetColour | ( | ) | [virtual] |
int PVideoInput1394DcDevice::GetContrast | ( | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::GetFrameData | ( | BYTE * | buffer, | |
PINDEX * | bytesReturned = NULL | |||
) | [virtual] |
Grab a frame, after a delay as specified by the frame rate.
bytesReturned | Buffer to receive frame OPtional bytes returned. |
Implements PVideoInputDevice.
PBoolean PVideoInput1394DcDevice::GetFrameDataNoDelay | ( | BYTE * | buffer, | |
PINDEX * | bytesReturned = NULL | |||
) | [virtual] |
Grab a frame.
Do not delay according to the current frame rate parameter.
bytesReturned | Buffer to receive frame OPtional bytes returned. |
Implements PVideoInputDevice.
PBoolean PVideoInput1394DcDevice::GetFrameSizeLimits | ( | unsigned & | minWidth, | |
unsigned & | minHeight, | |||
unsigned & | maxWidth, | |||
unsigned & | maxHeight | |||
) | [virtual] |
Get the minimum & maximum size of a frame on the device.
minHeight | Variable to receive minimum width |
maxWidth | Variable to receive minimum height |
maxHeight | Variable to receive maximum width Variable to receive maximum height |
Reimplemented from PVideoDevice.
int PVideoInput1394DcDevice::GetHue | ( | ) | [virtual] |
static PStringList PVideoInput1394DcDevice::GetInputDeviceNames | ( | ) | [static] |
Get a list of all of the drivers available.
PINDEX PVideoInput1394DcDevice::GetMaxFrameBytes | ( | ) | [virtual] |
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.
Implements PVideoDevice.
int PVideoInput1394DcDevice::GetNumChannels | ( | ) | [virtual] |
Get the number of video channels available on the device.
Default behaviour returns 1.
Reimplemented from PVideoDevice.
PBoolean PVideoInput1394DcDevice::GetParameters | ( | int * | whiteness, | |
int * | brightness, | |||
int * | colour, | |||
int * | contrast, | |||
int * | hue | |||
) | [virtual] |
Return whiteness, brightness, colour, contrast and hue in one call.
Reimplemented from PVideoDevice.
int PVideoInput1394DcDevice::GetWhiteness | ( | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::IsCapturing | ( | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::IsOpen | ( | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::Open | ( | const PString & | deviceName, | |
PBoolean | startImmediate = true | |||
) | [virtual] |
Open the device given the device name.
startImmediate | Device name to open Immediately start device |
Implements PVideoInputDevice.
PBoolean PVideoInput1394DcDevice::SetBrightness | ( | unsigned | newBrightness | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::SetChannel | ( | int | channelNumber | ) | [virtual] |
Set the video channel to be used on the device.
The channel number is an integer from 0 to GetNumChannels()-1. The special value of -1 will find the first working channel number.
Default behaviour sets the value of the channelNumber variable and then returns true.
channelNumber | New channel number for device. |
Reimplemented from PVideoDevice.
PBoolean PVideoInput1394DcDevice::SetColour | ( | unsigned | newColour | ) | [virtual] |
Set the colour format to be used.
Default behaviour sets the value of the colourFormat variable and then returns true if not an empty string.
Reimplemented from PVideoFrameInfo.
PBoolean PVideoInput1394DcDevice::SetColourFormatConverter | ( | const PString & | colourFormat | ) | [virtual] |
Set the colour format to be used, trying converters if available.
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.
Reimplemented from PVideoDevice.
PBoolean PVideoInput1394DcDevice::SetContrast | ( | unsigned | newContrast | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::SetFrameRate | ( | unsigned | rate | ) | [virtual] |
Set the video frame rate to be used on the device.
Default behaviour sets the value of the frameRate variable and then returns true.
rate | Frames per second |
Reimplemented from PVideoFrameInfo.
PBoolean PVideoInput1394DcDevice::SetFrameSize | ( | unsigned | width, | |
unsigned | height | |||
) | [virtual] |
Set the frame size to be used.
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.
height | New width of frame New height of frame |
Reimplemented from PVideoDevice.
PBoolean PVideoInput1394DcDevice::SetFrameSizeConverter | ( | unsigned | width, | |
unsigned | height, | |||
PBoolean | bScaleNotCrop | |||
) | [virtual] |
Set the frame size to be used, trying converters if available.
If the device does not support the size, a set of alternate resolutions are attempted. A converter is setup if possible.
height | New width of frame |
bScaleNotCrop | New height of frame Scale or crop/pad preference |
Reimplemented from PVideoDevice.
PBoolean PVideoInput1394DcDevice::SetHue | ( | unsigned | newHue | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::SetVideoFormat | ( | VideoFormat | videoFormat | ) |
videoFormat | New video format |
PBoolean PVideoInput1394DcDevice::SetWhiteness | ( | unsigned | newWhiteness | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::Start | ( | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::Stop | ( | ) | [virtual] |
PBoolean PVideoInput1394DcDevice::TestAllFormats | ( | ) |
Try all known video formats & see which ones are accepted by the video driver.
dc1394_cameracapture PVideoInput1394DcDevice::camera [protected] |
nodeid_t* PVideoInput1394DcDevice::camera_nodes [protected] |
int PVideoInput1394DcDevice::capturing_duration [protected] |
PString PVideoInput1394DcDevice::desiredColourFormat [protected] |
unsigned PVideoInput1394DcDevice::desiredFrameHeight [protected] |
unsigned PVideoInput1394DcDevice::desiredFrameWidth [protected] |
raw1394handle_t PVideoInput1394DcDevice::handle [protected] |
PBoolean PVideoInput1394DcDevice::is_capturing [protected] |
int PVideoInput1394DcDevice::numCameras [protected] |
PBoolean PVideoInput1394DcDevice::UseDMA [protected] |