Mode Retrieval Example Code.
Each camera comes with a built in set of modes. A mode is in turn a set of predefined register settings to produce a given type of image. See your user documentation for the modes defined by your camera.
To facilitate user interface programming, each mode has a human readable name that can be displayed on a GUI or console. Modes are set by index on the camera. This example shows the use of retreieving the set of modes and their names and how to set a specific mode by its index.
#include "stdafx.h"
#include "stdint.h"
#include "stdlib.h"
#define FLI_TEST_MAX_SUPPORTED_CAMERAS (4)
static int32_t s_iDeviceHandle;
uint32_t uiNumDetectedDevices;
static FPRODEVICEINFO s_camDeviceInfo[FLI_TEST_MAX_SUPPORTED_CAMERAS];
int main()
{
int32_t iResult;
uint32_t uiModeCount;
uint32_t uiCurrentMode;
uint32_t i;
uiNumDetectedDevices = FLI_TEST_MAX_SUPPORTED_CAMERAS;
if ((iResult >= 0) && (uiNumDetectedDevices > 0))
{
s_iDeviceHandle = -1;
iResult =
FPROCam_Open(&s_camDeviceInfo[0], &s_iDeviceHandle);
if ((iResult >= 0) && (s_iDeviceHandle >= 0))
{
for (i = 0; (i < uiModeCount) && (iResult >= 0); ++i)
{
if (iResult >= 0)
{
}
}
if (uiModeCount >= 2)
}
}
return 0;
}