PUCLIB 1.6.0.0
PHOTRON USB Control Library
PUCLIB.h
Go to the documentation of this file.
1#ifndef __PUCLIB_H
2#define __PUCLIB_H
3
4#include "PUCCONST.h"
5#include "PUCUTIL.h"
6
20#ifdef __cplusplus
21extern "C" {
22#endif
23
29typedef struct
30{
36 UINT32 nDeviceNoList[PUC_MAX_DEVICE];
38
44typedef struct
45{
48 UINT32 nMaxWidth;
51 UINT32 nMaxHeight;
54 UINT32 nMinWidth;
57 UINT32 nMinHeight;
60 UINT32 nUnitWidth;
65
71typedef struct
72{
76
81
87typedef struct
88{
91 PUINT8 pData;
94 UINT32 nDataSize;
99
100
104
105
119
137
156PUCRESULT WINAPI PUC_OpenDevice(UINT32 nDeviceNo, PPUC_HANDLE pDeviceHandle);
157
175
191
206PUCRESULT WINAPI PUC_GetDeviceName(PUC_HANDLE hDevice, UINT32* pName);
207
222PUCRESULT WINAPI PUC_GetDeviceType(PUC_HANDLE hDevice, UINT32* pType);
223
238PUCRESULT WINAPI PUC_GetDeviceVersion(PUC_HANDLE hDevice, UINT32* pVersion);
239
256PUCRESULT WINAPI PUC_GetSerialNo(PUC_HANDLE hDevice, UINT64* pSerialNo);
257
280PUCRESULT WINAPI PUC_GetResolution(PUC_HANDLE hDevice, UINT32* pWidth, UINT32* pHeight);
281
304PUCRESULT WINAPI PUC_GetMaxResolution(PUC_HANDLE hDevice, UINT32* pCurMaxWidth, UINT32* pCurMaxHeight);
305
327
352PUCRESULT WINAPI PUC_SetResolution(PUC_HANDLE hDevice, UINT32 nWidth, UINT32 nHeight);
353
374PUCRESULT WINAPI PUC_GetQuantization(PUC_HANDLE hDevice, UINT32 nPoint, USHORT* pVal);
375
396PUCRESULT WINAPI PUC_SetQuantization(PUC_HANDLE hDevice, UINT32 nPoint, USHORT nVal);
397
415
435
456
481
499
519
538PUCRESULT WINAPI PUC_GetSyncOutDelay(PUC_HANDLE hDevice, UINT32* pDelay);
539
560PUCRESULT WINAPI PUC_SetSyncOutDelay(PUC_HANDLE hDevice, UINT32 nDelay);
561
580PUCRESULT WINAPI PUC_GetSyncOutWidth(PUC_HANDLE hDevice, UINT32* pWidth);
581
604PUCRESULT WINAPI PUC_SetSyncOutWidth(PUC_HANDLE hDevice, UINT32 nWidth);
605
626PUCRESULT WINAPI PUC_GetSyncOutMagnification(PUC_HANDLE hDevice, UINT32* pMagnification);
627
650PUCRESULT WINAPI PUC_SetSyncOutMagnification(PUC_HANDLE hDevice, UINT32 nMagnification);
651
669
689
704PUCRESULT WINAPI PUC_GetSensorTemperature(PUC_HANDLE hDevice, UINT32* pTemp);
705
724PUCRESULT WINAPI PUC_GetXferDataSize(PUC_HANDLE hDevice, UINT32* pDataSize);
725
744PUCRESULT WINAPI PUC_GetMaxXferDataSize(PUC_HANDLE hDevice, UINT32* pDataSize);
745
773
802PUCRESULT WINAPI PUC_BeginXferData(PUC_HANDLE hDevice, RECIEVE_CALLBACK callback, void* arg);
803
821
840PUCRESULT WINAPI PUC_IsXferring(PUC_HANDLE hDevice, BOOL* pIsXferring);
841
860PUCRESULT WINAPI PUC_ExtractSequenceNo(const PUCHAR pData, UINT32 nWidth, UINT32 nHeight, PUSHORT pSeqNo);
861
892PUCRESULT WINAPI PUC_DecodeData(PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals);
893
928PUCRESULT WINAPI PUC_DecodeDataMultiThread(PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals, UINT32 nThreadCount);
929
960PUCRESULT WINAPI PUC_DecodeDCTData(PINT16 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals);
961
988PUCRESULT WINAPI PUC_DecodeDCData(PUINT8 pDst, UINT32 nBlockX, UINT32 nBlockY, UINT32 nBlockCountX, UINT32 nBlockCountY, const PUINT8 pSrc);
989
990
1007PUCRESULT WINAPI PUC_GetRingBufferCount(PUC_HANDLE hDevice, UINT32* pCount);
1008
1027PUCRESULT WINAPI PUC_SetRingBufferCount(PUC_HANDLE hDevice, UINT32 nCount);
1028
1047PUCRESULT WINAPI PUC_GetXferTimeOut(PUC_HANDLE hDevice, UINT32* pSingleXferTimeOut, UINT32* pContinuousXferTimeOut);
1048
1073PUCRESULT WINAPI PUC_SetXferTimeOut(PUC_HANDLE hDevice, UINT32 nSingleXferTimeOut, UINT32 nContinuousXferTimeOut);
1074
1091PUCRESULT WINAPI PUC_GetMaxFramerate(PUC_HANDLE hDevice, UINT32* pFramerate);
1092
1110
1133PUCRESULT WINAPI PUC_GetFramerateShutter(PUC_HANDLE hDevice, UINT32* pFramerate, UINT32* pShutterSpeedFps);
1134
1157PUCRESULT WINAPI PUC_SetFramerateShutter(PUC_HANDLE hDevice, UINT32 nFramerate, UINT32 nShutterSpeedFps);
1158
1185PUCRESULT WINAPI PUC_GetExposeTime(PUC_HANDLE hDevice, UINT32* pExpOnTime, UINT32* pExpOffTime);
1186
1207PUCRESULT WINAPI PUC_GetMinExposeTime(PUC_HANDLE hDevice, UINT32* pMinExpOnTime, UINT32* pMinExpOffTime);
1208
1235PUCRESULT WINAPI PUC_SetExposeTime(PUC_HANDLE hDevice, UINT32 nExpOnTime, UINT32 nExpOffTime);
1236
1253PUCRESULT WINAPI PUC_ResetDevice(UINT32 nDeviceNo);
1254
1268
1278
1290
1302
1326PUCRESULT WINAPI PUC_DecodeGPU(bool download, unsigned char* pSrc, unsigned char** pDst, UINT32 lineBytes);
1327
1338PUCRESULT WINAPI PUC_GetGPULastError(int& errorCode);
1339
1350PUCRESULT WINAPI PUC_IsSetupGPUDecode(bool& status);
1351
1352#ifdef __cplusplus
1353}
1354#endif
1355
1356#endif /* __PUCLIB_H */
void * PUC_HANDLE
Device handle.
Definition: PUCCONST.h:94
#define PUC_MAX_DEVICE
Maximum number of connectable devices.
Definition: PUCCONST.h:17
PUCRESULT
Error code.
Definition: PUCCONST.h:102
PUC_MODE
Enumeration for ON/OFF setting.
Definition: PUCCONST.h:47
PUC_COLOR_TYPE
Enumeration for device color/monochrome setting.
Definition: PUCCONST.h:83
PUC_SYNC_MODE
Enumeration for synchronization.
Definition: PUCCONST.h:71
PUC_HANDLE * PPUC_HANDLE
Pointer for the device handle.
Definition: PUCCONST.h:97
PUC_SIGNAL
Enumeration for signal polarity.
Definition: PUCCONST.h:59
PUCRESULT WINAPI PUC_ResetSequenceNo(PUC_HANDLE hDevice)
This resets the sequence number.
PUCRESULT WINAPI PUC_GetSyncOutMagnification(PUC_HANDLE hDevice, UINT32 *pMagnification)
This retrieves the output magnification rate for the synchronization signal.
PUCRESULT WINAPI PUC_GetResolutionLimit(PUC_HANDLE hDevice, PPUC_RESO_LIMIT_INFO pLimitInfo)
This retrieves the resolution limit for the device, and minimum unit for altering the resolution.
PUCRESULT WINAPI PUC_SetSyncInMode(PUC_HANDLE hDevice, PUC_SYNC_MODE nMode, PUC_SIGNAL nSignal)
This sets the synchronous signal input mode for the device.
PUCRESULT WINAPI PUC_IsXferring(PUC_HANDLE hDevice, BOOL *pIsXferring)
This checks whether a continuous transfer is in progress.
PUCRESULT WINAPI PUC_DetectDevice(PPUC_DETECT_INFO pDetectInfo)
This searches for the device.
PUCRESULT WINAPI PUC_DecodeData(PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals)
This unpacks the compressed image data to luminance data.
PUCRESULT WINAPI PUC_GetRingBufferCount(PUC_HANDLE hDevice, UINT32 *pCount)
This retrieves the ring buffer count for continuous transfer.
PUCRESULT WINAPI PUC_GetMaxResolution(PUC_HANDLE hDevice, UINT32 *pCurMaxWidth, UINT32 *pCurMaxHeight)
This retrieves the maximum resolution setting allowed for the current frame rate of the device.
PUCRESULT WINAPI PUC_GetColorType(PUC_HANDLE hDevice, PUC_COLOR_TYPE *pType)
This retrieves color/monochrome information of the device.
PUCRESULT WINAPI PUC_GetQuantization(PUC_HANDLE hDevice, UINT32 nPoint, USHORT *pVal)
This retrieves one set of quantization table data stored to the device.
PUCRESULT WINAPI PUC_GetSyncOutDelay(PUC_HANDLE hDevice, UINT32 *pDelay)
This retrieves the delay value of device's synchronization signal output in nsec. The value less th...
struct PUC_XFER_DATA_INFO * PPUC_XFER_DATA_INFO
PUCRESULT WINAPI PUC_SetupGPUDecode(PUC_GPU_SETUP_PARAM param)
Allocates memory for GPU processing.
PUCRESULT WINAPI PUC_ExtractSequenceNo(const PUCHAR pData, UINT32 nWidth, UINT32 nHeight, PUSHORT pSeqNo)
This extracts the sequence number from the compressed image data.
PUCRESULT WINAPI PUC_GetFanState(PUC_HANDLE hDevice, PUC_MODE *pState)
This retrieves the state of the device fan.
struct PUC_DETECT_INFO * PPUC_DETECT_INFO
PUCRESULT WINAPI PUC_SetFramerateShutter(PUC_HANDLE hDevice, UINT32 nFramerate, UINT32 nShutterSpeedFps)
This sets the framerate and the shutter speed (1/fps) for the device.
PUCRESULT WINAPI PUC_GetSyncOutWidth(PUC_HANDLE hDevice, UINT32 *pWidth)
This retrieves the output width of synchronization signal for the device. If it is less than 100nse...
PUCRESULT WINAPI PUC_CloseDevice(PUC_HANDLE hDevice)
This closes the device.
PUCRESULT WINAPI PUC_SetRingBufferCount(PUC_HANDLE hDevice, UINT32 nCount)
This sets the ring buffer count for continuous transfer.
PUCRESULT WINAPI PUC_GetSensorTemperature(PUC_HANDLE hDevice, UINT32 *pTemp)
This retrieves the device sensor temperature.
PUCRESULT WINAPI PUC_IsSetupGPUDecode(bool &status)
This retrieves whether GPU decode memory is allocated.
PUCRESULT WINAPI PUC_GetXferTimeOut(PUC_HANDLE hDevice, UINT32 *pSingleXferTimeOut, UINT32 *pContinuousXferTimeOut)
This retrieves the timeout duration (ms) for data transfer from the device.
PUCRESULT WINAPI PUC_GetXferDataSize(PUC_HANDLE hDevice, UINT32 *pDataSize)
This retrieves the size of transfer data from the device.
PUCRESULT WINAPI PUC_SetQuantization(PUC_HANDLE hDevice, UINT32 nPoint, USHORT nVal)
This overwrites one set of quantization table data stored to the device.
PUCRESULT WINAPI PUC_GetResolution(PUC_HANDLE hDevice, UINT32 *pWidth, UINT32 *pHeight)
This retrieves the device resolution.
PUCRESULT WINAPI PUC_DecodeGPU(bool download, unsigned char *pSrc, unsigned char **pDst, UINT32 lineBytes)
This unpacks the compressed image data to luminance data.(GPU processing)
PUCRESULT WINAPI PUC_SetLEDMode(PUC_HANDLE hDevice, PUC_MODE nMode)
This sets the LED state of the device.
PUCRESULT WINAPI PUC_GetAvailableGPUProcess()
This retrieves whether the PC is capable of GPU processing.
PUCRESULT WINAPI PUC_SetExposeTime(PUC_HANDLE hDevice, UINT32 nExpOnTime, UINT32 nExpOffTime)
This sets the exposure/non-exposure time of the device.
PUCRESULT WINAPI PUC_SetResolution(PUC_HANDLE hDevice, UINT32 nWidth, UINT32 nHeight)
This sets the device resolution.
PUCRESULT WINAPI PUC_DecodeDataMultiThread(PUINT8 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals, UINT32 nThreadCount)
This unpacks the compressed image data to luminance data. This process is multithreaded.
PUCRESULT WINAPI PUC_SetSyncOutWidth(PUC_HANDLE hDevice, UINT32 nWidth)
This sets the output width of synchronization signal for the device.
PUCRESULT WINAPI PUC_GetSyncInMode(PUC_HANDLE hDevice, PUC_SYNC_MODE *pMode, PUC_SIGNAL *pSignal)
This retrieves the synchronous signal input mode for the device.
PUCRESULT WINAPI PUC_GetSyncOutSignal(PUC_HANDLE hDevice, PUC_SIGNAL *pSignal)
This retrieves the synchronization signal output polarity for the device.
PUCRESULT WINAPI PUC_TeardownGPUDecode()
Releases memory used by GPU processing.
PUCRESULT WINAPI PUC_GetGPULastError(int &errorCode)
This retrieves the error code from the last GPU processing.
PUCRESULT WINAPI PUC_SetSyncOutMagnification(PUC_HANDLE hDevice, UINT32 nMagnification)
This sets the output magnification rate for the synchronization signal.
PUCRESULT WINAPI PUC_GetLEDMode(PUC_HANDLE hDevice, PUC_MODE *pMode)
This retrieves the LED state of the device.
PUCRESULT WINAPI PUC_GetDeviceVersion(PUC_HANDLE hDevice, UINT32 *pVersion)
This retrieves device version information.
PUCRESULT WINAPI PUC_GetDeviceName(PUC_HANDLE hDevice, UINT32 *pName)
This retrieves the device name.
PUCRESULT WINAPI PUC_SetFanState(PUC_HANDLE hDevice, PUC_MODE nState)
This sets the state of the device fan.
PUCRESULT WINAPI PUC_GetDeviceType(PUC_HANDLE hDevice, UINT32 *pType)
This retrieves the device type.
PUCRESULT WINAPI PUC_DecodeDCData(PUINT8 pDst, UINT32 nBlockX, UINT32 nBlockY, UINT32 nBlockCountX, UINT32 nBlockCountY, const PUINT8 pSrc)
Decodes the DC component of compressed image data.
PUCRESULT WINAPI PUC_GetMaxFramerate(PUC_HANDLE hDevice, UINT32 *pFramerate)
This retrieves the maximum framerate for the current resolution.
PUCRESULT WINAPI PUC_GetExposeTime(PUC_HANDLE hDevice, UINT32 *pExpOnTime, UINT32 *pExpOffTime)
This retrieves the exposure/non-exposure time of the device.
PUCRESULT WINAPI PUC_GetFramerateLimit(PUC_HANDLE hDevice, PPUC_FRAMERATE_LIMIT_INFO pLimitInfo)
This retrieves the framerate limit information.
struct PUC_FRAMERATE_LIMIT_INFO * PPUC_FRAMERATE_LIMIT_INFO
PUCRESULT WINAPI PUC_GetMaxXferDataSize(PUC_HANDLE hDevice, UINT32 *pDataSize)
This retrieves the maximum size of transfer data from the device.
PUCRESULT WINAPI PUC_OpenDevice(UINT32 nDeviceNo, PPUC_HANDLE pDeviceHandle)
This opens the device.
PUCRESULT WINAPI PUC_SetSyncOutDelay(PUC_HANDLE hDevice, UINT32 nDelay)
This sets the delay value of device's synchronization signal output in nsec.
PUCRESULT WINAPI PUC_SetSyncOutSignal(PUC_HANDLE hDevice, PUC_SIGNAL nSignal)
This sets the synchronous signal output polarity for the device.
void(* RECIEVE_CALLBACK)(PPUC_XFER_DATA_INFO, void *)
The callback function type called during continuous transfer.
Definition: PUCLIB.h:103
PUCRESULT WINAPI PUC_SetXferTimeOut(PUC_HANDLE hDevice, UINT32 nSingleXferTimeOut, UINT32 nContinuousXferTimeOut)
This sets the timeout duration (ms) for data transfer from the device.
PUCRESULT WINAPI PUC_GetSingleXferData(PUC_HANDLE hDevice, PPUC_XFER_DATA_INFO pXferData)
This retrieves the current live image from the device.
PUCRESULT WINAPI PUC_BeginXferData(PUC_HANDLE hDevice, RECIEVE_CALLBACK callback, void *arg)
This starts continuous transfer.
PUCRESULT WINAPI PUC_GetFramerateShutter(PUC_HANDLE hDevice, UINT32 *pFramerate, UINT32 *pShutterSpeedFps)
This retrieves the framerate and the shutter speed (1/fps) for the device.
PUCRESULT WINAPI PUC_DecodeDCTData(PINT16 pDst, UINT32 nX, UINT32 nY, UINT32 nWidth, UINT32 nHeight, UINT32 nLineBytes, const PUINT8 pSrc, const PUSHORT pQVals)
This unpacks the compressed image data to DCT coefficients.
PUCRESULT WINAPI PUC_Initialize()
This initializes the library.
PUCRESULT WINAPI PUC_GetSerialNo(PUC_HANDLE hDevice, UINT64 *pSerialNo)
This retrieves the device serial number.
PUCRESULT WINAPI PUC_ResetDevice(UINT32 nDeviceNo)
This resets the device.
struct PUC_RESO_LIMIT_INFO * PPUC_RESO_LIMIT_INFO
PUCRESULT WINAPI PUC_EndXferData(PUC_HANDLE hDevice)
This finishes continuous transfer.
PUCRESULT WINAPI PUC_GetMinExposeTime(PUC_HANDLE hDevice, UINT32 *pMinExpOnTime, UINT32 *pMinExpOffTime)
This retrieves the minimum exposure/non-exposure time of the device. If it is less than 100nsec,...
Structure for storing device search results.
Definition: PUCLIB.h:30
UINT32 nDeviceCount
Number of detected devices.
Definition: PUCLIB.h:33
Structure for storing framerate limit values.
Definition: PUCLIB.h:72
UINT32 nMaxFrameRate
Maximum Framerate.
Definition: PUCLIB.h:79
UINT32 nMinFrameRate
Minimum Framerate.
Definition: PUCLIB.h:75
A structure that stores parameters used in GPU decoding.
Definition: PUCUTIL.h:37
Structure for storing resolution limit values.
Definition: PUCLIB.h:45
UINT32 nUnitWidth
Minimum unit for altering the horizontal resolution.
Definition: PUCLIB.h:60
UINT32 nMaxHeight
Maximum vertical resolution.
Definition: PUCLIB.h:51
UINT32 nMaxWidth
Maximum horizontal resolution.
Definition: PUCLIB.h:48
UINT32 nUnitHeight
Minimum unit for altering the vertical resolution.
Definition: PUCLIB.h:63
UINT32 nMinHeight
Minimum vertical resolution.
Definition: PUCLIB.h:57
UINT32 nMinWidth
Minimum horizontal resolution.
Definition: PUCLIB.h:54
Structure for storing the information of transfer data.
Definition: PUCLIB.h:88
UINT32 nDataSize
The size of transfer data. Stores the size of transfer data.
Definition: PUCLIB.h:94
USHORT nSequenceNo
The sequence number of transfer data.
Definition: PUCLIB.h:97
PUINT8 pData
Location for unpacked transfer data. It is necessary to allocate the required amount in advance....
Definition: PUCLIB.h:91