#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <process.h>
#include <windows.h>
#include <rcAPI.h>
#include <libjpeg/jpeglib.h>
#include "VideoWrapperLibAdapter.h"
#include "VideoWrapperTime.h"
#include "../include/MyStream.h"
Functions | |
| void | setPrintFunction (VWAPrintFcn *func) |
| Sets a callback function to be used for printing messages. | |
| VWResult | openVideo (char *lpCmdLine, VWHCamera *phCam) |
| Intializes a video camera. | |
| VWResult | startVideo (VWHCamera hCam) |
| Starts aquiring frames from the camera. | |
| VWResult | stopVideo (VWHCamera hCam) |
| Stops aquiring frames from the camera. | |
| VWResult | resetVideo (VWHCamera hCam, VWBool bAutomatic) |
| Resets all the camera parameters to defaults. | |
| VWResult | getFrame (VWHCamera hCam, unsigned char **im, timeval *timestamp) |
| Captures a video frame. | |
| VWResult | releaseFrame (VWHCamera hCam) |
| Releases the frame so that the space can be freed. | |
| VWResult | closeVideo (VWHCamera hCam) |
| Close the video camera. | |
| VWResult | getVideoWidth (VWHCamera hCam, int *pnWidth) |
| Gets the video width. | |
| VWResult | getVideoHeight (VWHCamera hCam, int *pnHeight) |
| Gets the video height. | |
| VWResult | getVideoPixelFormat (VWHCamera hCam, VWPixelFormat *pPixelFormat) |
| Gets the pixel format of the video frame buffer. | |
| int | getVideoDepth (VWHCamera hCam, int *pnDepth) |
| Gets color depth as bits ber pixel. | |
| VWResult | getFrameRate (VWHCamera hCam, double *pdFrameRate) |
| Gets the frame rate of the camera as frames per second. | |
| VWResult | setPropertyLong (VWHCamera hCam, VWCamProp propId, long lValue1, long lValue2, VWBool bAuto) |
| Sets a long-typed camera property such as white balance, gain, etc. | |
| VWResult | getPropertyLong (VWHCamera hCam, VWCamProp propId, long *plValue1, long *plValue2, VWBool *pbAuto) |
| Gets a long-typed camera property such as white balance, gain, etc. | |
| VWResult | getPropertyRangeLong (VWHCamera hCam, VWCamProp propId, long *plMinValue, long *plMaxValue, VWBool *pbAuto) |
| Gets the valid range for a long-typed camera property such as white balance, gain, etc. | |
| VWResult | setPropertyString (VWHCamera hCam, VWCamProp propId, char *szValue) |
| Sets a string-typed camera property. | |
| VWResult | getPropertyString (VWHCamera hCam, VWCamProp propId, char *szValue, int nSize) |
| Gets a string-typed camera property. | |
This is an rough first implementation, not intended to serve as a model for good software design. This version writes the frame to a temporary file. While undesirable, this shouldn't make much of a difference in performance as it takes multiple seconds to transfer a frame over USB 1.0.
If you get cryptic errors bubbled up from the RDSDK, try power cycling the camera.
For use by VideoWrapper.
|
|
Close the video camera.
|
|
||||||||||||||||
|
Captures a video frame.
|
|
||||||||||||
|
Gets the frame rate of the camera as frames per second.
|
|
||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||||||
|
Gets a string-typed camera property.
|
|
||||||||||||
|
Gets color depth as bits ber pixel. Always returns 24.
|
|
||||||||||||
|
Gets the video height.
|
|
||||||||||||
|
Gets the pixel format of the video frame buffer.
|
|
||||||||||||
|
Gets the video width.
|
|
||||||||||||
|
Intializes a video camera.
|
|
|
Releases the frame so that the space can be freed.
|
|
||||||||||||
|
Resets all the camera parameters to defaults.
|
|
|
Sets a callback function to be used for printing messages.
|
|
||||||||||||||||||||||||
|
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.
|
|
||||||||||||||||
|
Sets a string-typed camera property.
|
|
|
Starts aquiring frames from the camera.
|
|
|
Stops aquiring frames from the camera.
|
1.4.1