Main Page | Directories | File List | Globals | Related Pages

VideoWrapperLibAdapter.h File Reference

Declares a standard interface that should be implemented camera library adapters intended to operate with VideoWrapper. More...

#include "VideoWrapperTypes.h"

Go to the source code of this file.

Functions

typedef void (VWA_API_ENTRY VWAPrintFcn)(char *)
 Type definition for print callback functions.
void VWA_API VWA_API_ENTRY setPrintFunction (VWAPrintFcn *function)
 Sets a callback function to be used for printing messages.
VWResult VWA_API VWA_API_ENTRY openVideo (char *szInit, VWHCamera *phCam)
 Intializes a video camera.
VWResult VWA_API VWA_API_ENTRY closeVideo (VWHCamera hCam)
 Close the video camera.
VWResult VWA_API VWA_API_ENTRY startVideo (VWHCamera hCam)
 Starts aquiring frames from the camera.
VWResult VWA_API VWA_API_ENTRY stopVideo (VWHCamera hCam)
 Stops aquiring frames from the camera.
VWResult VWA_API VWA_API_ENTRY resetVideo (VWHCamera hCam, VWBool bAutomatic)
 Resets all the camera parameters to defaults.
VWResult VWA_API VWA_API_ENTRY getFrame (VWHCamera hCam, unsigned char **ppbFrame, timeval *pTimestamp=NULL)
 Captures a video frame.
VWResult VWA_API VWA_API_ENTRY releaseFrame (VWHCamera hCam)
 Releases the frame so that the space can be freed.
VWResult VWA_API VWA_API_ENTRY getFrameRate (VWHCamera hCam, double *pdFrameRate)
 Gets the frame rate of the camera as frames per second.
VWResult VWA_API VWA_API_ENTRY getVideoWidth (VWHCamera hCam, int *pnWidth)
 Gets the video width.
VWResult VWA_API VWA_API_ENTRY getVideoHeight (VWHCamera hCam, int *pnHeight)
 Gets the video height.
VWResult VWA_API VWA_API_ENTRY getVideoPixelFormat (VWHCamera hCam, VWPixelFormat *pPixelFormat)
 Gets the pixel format of the video frame buffer.
VWResult VWA_API VWA_API_ENTRY getVideoDepth (VWHCamera hCam, int *pnDepth)
 Gets color depth as bits ber pixel.
VWResult VWA_API VWA_API_ENTRY showPropertiesDialog (VWHCamera hCam)
 Pops up the properties screen associated with this device.
VWResult VWA_API VWA_API_ENTRY setPropertyLong (VWHCamera hCam, VWCamProp propId, long lValue1, long lValue2=0L, VWBool bAuto=FALSE)
 Sets a long-typed camera property such as white balance, gain, etc.
VWResult VWA_API VWA_API_ENTRY getPropertyLong (VWHCamera hCam, VWCamProp propId, long *plValue1=NULL, long *plValue2=NULL, VWBool *pbAuto=NULL)
 Gets a long-typed camera property such as white balance, gain, etc.
VWResult VWA_API VWA_API_ENTRY getPropertyRangeLong (VWHCamera hCam, VWCamProp propId, long *plMinValue=NULL, long *plMaxValue=NULL, VWBool *pbAuto=NULL)
 Gets the valid range for a long-typed camera property such as white balance, gain, etc.
VWResult VWA_API VWA_API_ENTRY setPropertyString (VWHCamera hCam, VWCamProp propId, char *szValue)
 Sets a string-typed camera property.
VWResult VWA_API VWA_API_ENTRY getPropertyString (VWHCamera hCam, VWCamProp propId, char *szValue, int nSize)
 Gets a string-typed camera property.


Detailed Description

Declares a standard interface that should be implemented camera library adapters intended to operate with VideoWrapper.

These are the functions exposed by VideoWrapper_xxx dynamic libraries.

See also:
VideoWrapper.h
Copyright 2004-5, Georgia Tech Research Corporation, Atlanta, Georgia 30332-0415 All Rights Reserved

Function Documentation

VWResult VWA_API VWA_API_ENTRY closeVideo VWHCamera  hCam  ) 
 

Close the video camera.

Parameters:
hCam Handle to video camera.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY getFrame VWHCamera  hCam,
unsigned char **  ppbFrame,
timeval *  pTimestamp = NULL
 

Captures a video frame.

Parameters:
hCam Handle to video camera.
[out] ppbFrame Pointer returning the captured video frame. Memory is alocated by the camera library.
[out] pTimestamp Pointer returning the timestamp of the captured video frame.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY getFrameRate VWHCamera  hCam,
double *  pdFrameRate
 

Gets the frame rate of the camera as frames per second.

Parameters:
hCam Handle to video camera.
[out] pdFrameRate Pointer returning the frame rate of the camera.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY getPropertyLong VWHCamera  hCam,
VWCamProp  propId,
long *  plValue1 = NULL,
long *  plValue2 = NULL,
VWBool pbAuto = NULL
 

Gets a long-typed camera property such as white balance, gain, etc.

Some properties are composed of two values. Symbols for camera properties are defined in VideoWrapperTypes.h.

Parameters:
propId Identifier of the property.
[out] plValue1 Pointer returning first property value.
[out] plValue2 Pointer returning second property value. Not used with most properties.
Returns:
VWResult indicating success or failure.
See also:
VWCamProp

VWResult VWA_API VWA_API_ENTRY getPropertyRangeLong VWHCamera  hCam,
VWCamProp  propId,
long *  plMinValue = NULL,
long *  plMaxValue = NULL,
VWBool pbAuto = NULL
 

Gets the valid range for a long-typed camera property such as white balance, gain, etc.

Symbols for camera properties are defined in VideoWrapperTypes.h.

Parameters:
propId Identifier of the property.
lValue1 First property value.
lValue2 Second property value. Not used with most properties.
Returns:
VWResult indicating success or failure.
See also:
VWCamProp

VWResult VWA_API VWA_API_ENTRY getPropertyString VWHCamera  hCam,
VWCamProp  propId,
char *  szValue,
int  nSize
 

Gets a string-typed camera property.

Parameters:
propId Identifier of the property.
[in] szValue Property value.
Returns:
VWResult indicating success or failure.
See also:
VWCamProp

VWResult VWA_API VWA_API_ENTRY getVideoDepth VWHCamera  hCam,
int *  pnDepth
 

Gets color depth as bits ber pixel.

Always returns 24.

Parameters:
hCam Handle to video camera.
[out] pnDepth Pointer returning the bits per pixel.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY getVideoHeight VWHCamera  hCam,
int *  pnHeight
 

Gets the video height.

Parameters:
hCam Handle to video camera.
[out] pnHeight Pointer returning the height of the video.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY getVideoPixelFormat VWHCamera  hCam,
VWPixelFormat pPixelFormat
 

Gets the pixel format of the video frame buffer.

Parameters:
hCam Handle to video camera.
[out] pnFormat Pointer returning an integer expressing the pixel format.
Returns:
VWResult indicating success or failure.
See also:
VWPixelFormat

VWResult VWA_API VWA_API_ENTRY getVideoWidth VWHCamera  hCam,
int *  pnWidth
 

Gets the video width.

Parameters:
hCam Handle to video camera.
[out] pnWidth Pointer returning the width of the video.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY openVideo char *  szInit,
VWHCamera phCam
 

Intializes a video camera.

Parameters:
[in] szInit An implementation-dependent string used to configure the camera. Consult the 'VideoWrapper_xxx Details' page for the API adapter you are instantiating for the string format. Generally, however, the string is formatted as follows: "libId: camNum width frameRate colorMode scale outputMode" where
  • libId is the identifier for the API adapter library.
  • camNum is a number (starting at 0) representing the camera to open.
  • width is the desired frame width.
  • frameRate is the desired frame rate
  • colorMode is a string specifying the format of the desired color mode (e.g. rgb, yuv).
  • scale is 0 or 1. 1 means a mode of 2x or 4x the size can be used, and scaled to the correct size.
[out] phVideo Pointer to the handle for opened camera.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY releaseFrame VWHCamera  hCam  ) 
 

Releases the frame so that the space can be freed.

Parameters:
hCam Handle to video camera.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY resetVideo VWHCamera  hCam,
VWBool  bAutomatic
 

Resets all the camera parameters to defaults.

Parameters:
hCam Handle to video camera.
bAutomatic If true, allow the camera to auto-adust.
Returns:
VWResult indicating success or failure.

void VWA_API VWA_API_ENTRY setPrintFunction VWAPrintFcn *  function  ) 
 

Sets a callback function to be used for printing messages.

Parameters:
function: ptr to print function

VWResult VWA_API VWA_API_ENTRY setPropertyLong VWHCamera  hCam,
VWCamProp  propId,
long  lValue1,
long  lValue2 = 0L,
VWBool  bAuto = FALSE
 

Sets a long-typed camera property such as white balance, gain, etc.

Some properties are composed of two values. Symbols for camera properties are defined in VideoWrapperTypes.h.

Parameters:
propId Identifier of the property.
lValue1 First property value.
lValue2 Second property value. Not used with most properties.
Returns:
VWResult indicating success or failure.
See also:
VWCamProp

VWResult VWA_API VWA_API_ENTRY setPropertyString VWHCamera  hCam,
VWCamProp  propId,
char *  szValue
 

Sets a string-typed camera property.

Parameters:
propId Identifier of the property.
[in] szValue Property value.
Returns:
VWResult indicating success or failure.
See also:
VWCamProp

VWResult VWA_API VWA_API_ENTRY showPropertiesDialog VWHCamera  hCam  ) 
 

Pops up the properties screen associated with this device.

Not supported by all camera libraries.

Parameters:
hCam Handle to video camera.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY startVideo VWHCamera  hCam  ) 
 

Starts aquiring frames from the camera.

Parameters:
hCam Handle to video camera.
Returns:
VWResult indicating success or failure.

VWResult VWA_API VWA_API_ENTRY stopVideo VWHCamera  hCam  ) 
 

Stops aquiring frames from the camera.

Parameters:
hCam Handle to video camera.
Returns:
VWResult indicating success or failure.


Generated on Tue Oct 18 12:18:51 2005 for VideoWrapper API by  doxygen 1.4.1