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

VideoWrapperLibAdapter.h

Go to the documentation of this file.
00001 //  ==========================================================================================
00013 //  ==========================================================================================
00014 
00015 #ifndef _VIDEOWRAPPERLIBADAPTER_H
00016 #define _VIDEOWRAPPERLIBADAPTER_H
00017 
00018 #include "VideoWrapperTypes.h"
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 // ==========================================================================================
00025 // entry point macros
00026 // ==========================================================================================
00027 // This defines the calling conventions of the entry points for
00028 // dynamic libraries. This varies depending upon the operating system.
00029 
00030 #ifdef _LIB // static library
00031     #define     VWA_API 
00032     #define     VWA_API_ENTRY __cdecl
00033     typedef void (* DLL_EP)(void);
00034     #define     DLL_EP_PTR __cdecl *
00035 #else
00036 #if defined (_WIN32) || defined(WIN32) || defined(__WIN32__)
00037         #ifdef VWA_API_EXPORTS  
00038                 #define VWA_API __declspec(dllexport)
00039         #else
00040                 #define VWA_API __declspec(dllimport)
00041         #endif
00042     #define     VWA_API_ENTRY __cdecl
00043     typedef void (* DLL_EP)(void);
00044     #define     DLL_EP_PTR VWA_API_ENTRY *
00045 #else
00046     #define     VWA_API
00047     #define     VWA_API_ENTRY
00048     typedef void (* DLL_EP)(void);
00049     #define     DLL_EP_PTR *
00050 #endif
00051 #endif
00052 
00053 // ==========================================================================================
00054 // utility functions 
00055 // ==========================================================================================
00056 
00060 typedef void (VWA_API_ENTRY VWAPrintFcn)(char *);
00061 
00062 // ------------------------------------------------------------------------------------------
00063 // setPrintFunction
00064 // ------------------------------------------------------------------------------------------
00070 void VWA_API VWA_API_ENTRY setPrintFunction(VWAPrintFcn *function);
00071 
00072 
00073 // ==========================================================================================
00074 // camera management functions 
00075 // ==========================================================================================
00076 
00077 // ------------------------------------------------------------------------------------------
00078 // openVideo
00079 // ------------------------------------------------------------------------------------------
00101 VWResult VWA_API VWA_API_ENTRY openVideo( char* szInit, VWHCamera* phCam);
00102 
00103 // ------------------------------------------------------------------------------------------
00104 // closeVideo
00105 // ------------------------------------------------------------------------------------------
00113 VWResult VWA_API VWA_API_ENTRY closeVideo( VWHCamera hCam);
00114 
00115 // ------------------------------------------------------------------------------------------
00116 // startVideo
00117 // ------------------------------------------------------------------------------------------
00125 VWResult VWA_API VWA_API_ENTRY startVideo( VWHCamera hCam);
00126 
00127 // ------------------------------------------------------------------------------------------
00128 // stopVideo
00129 // ------------------------------------------------------------------------------------------
00137 VWResult VWA_API VWA_API_ENTRY stopVideo( VWHCamera hCam);
00138 
00139 // ------------------------------------------------------------------------------------------
00140 // resetVideo
00141 // ------------------------------------------------------------------------------------------
00150 VWResult VWA_API VWA_API_ENTRY resetVideo( VWHCamera hCam, VWBool bAutomatic);
00151 
00152 
00153 // ==========================================================================================
00154 // frame functions
00155 // ==========================================================================================
00156 
00157 // ------------------------------------------------------------------------------------------
00158 // getFrame
00159 // ------------------------------------------------------------------------------------------
00170 VWResult VWA_API VWA_API_ENTRY getFrame( VWHCamera hCam, unsigned char **ppbFrame, timeval *pTimestamp = NULL);
00171 
00172 // ------------------------------------------------------------------------------------------
00173 // releaseFrame
00174 // ------------------------------------------------------------------------------------------
00182 VWResult VWA_API VWA_API_ENTRY releaseFrame( VWHCamera hCam);
00183 
00184 // ------------------------------------------------------------------------------------------
00185 // getFrameRate
00186 // ------------------------------------------------------------------------------------------
00195 VWResult VWA_API VWA_API_ENTRY getFrameRate( VWHCamera hCam, double* pdFrameRate);
00196 
00197 
00198 // ==========================================================================================
00199 // video parameter accessor functions
00200 // ==========================================================================================
00201 
00202 // ------------------------------------------------------------------------------------------
00203 // getVideoWidth
00204 // ------------------------------------------------------------------------------------------
00213 VWResult VWA_API VWA_API_ENTRY getVideoWidth( VWHCamera hCam, int* pnWidth);
00214 
00215 // ------------------------------------------------------------------------------------------
00216 // getVideoHeight
00217 // ------------------------------------------------------------------------------------------
00226 VWResult VWA_API VWA_API_ENTRY getVideoHeight( VWHCamera hCam, int* pnHeight);
00227 
00228 // ------------------------------------------------------------------------------------------
00229 // getVideoPixelFormat
00230 // ------------------------------------------------------------------------------------------
00241 
00242 VWResult VWA_API VWA_API_ENTRY getVideoPixelFormat( VWHCamera hCam, VWPixelFormat* pPixelFormat);
00243 
00244 // ------------------------------------------------------------------------------------------
00245 // getVideoDepth
00246 // ------------------------------------------------------------------------------------------
00256 VWResult VWA_API VWA_API_ENTRY getVideoDepth( VWHCamera hCam, int* pnDepth);
00257 
00258 
00259 // ------------------------------------------------------------------------------------------
00260 // showPropertiesDialog
00261 // ------------------------------------------------------------------------------------------
00270 VWResult VWA_API VWA_API_ENTRY showPropertiesDialog( VWHCamera hCam);
00271 
00272 // TODO: document property functions
00273 // ------------------------------------------------------------------------------------------
00274 // VIDEO_setPropertyLong
00275 // ------------------------------------------------------------------------------------------
00289 VWResult VWA_API VWA_API_ENTRY setPropertyLong( VWHCamera hCam, VWCamProp propId, long lValue1, long lValue2 = 0L, VWBool bAuto = FALSE);
00290 
00291 // ------------------------------------------------------------------------------------------
00292 // VIDEO_getPropertyLong
00293 // ------------------------------------------------------------------------------------------
00307 VWResult VWA_API VWA_API_ENTRY getPropertyLong( VWHCamera hCam, VWCamProp propId, long* plValue1 = NULL, long* plValue2 = NULL, VWBool* pbAuto = NULL);
00308 
00309 
00310 // ------------------------------------------------------------------------------------------
00311 // VIDEO_getPropertyRangeLong
00312 // ------------------------------------------------------------------------------------------
00325 VWResult VWA_API VWA_API_ENTRY getPropertyRangeLong( VWHCamera hCam, VWCamProp propId, long* plMinValue = NULL, long* plMaxValue = NULL, VWBool* pbAuto = NULL);
00326 
00327 // TODO: keep double property functions?
00328 /*
00329 VWResult VWA_API VWA_API_ENTRY setPropertyDouble( VWHCamera hCam, VWCamProp propId, long lValue1, long lValue2 = 0L, VWBool bAuto = FALSE);
00330 VWResult VWA_API VWA_API_ENTRY getPropertyDouble( VWHCamera hCam, VWCamProp propId, long* plValue1 = NULL, long* plValue2 = NULL, VWBool* pbAuto = NULL);
00331 VWResult VWA_API VWA_API_ENTRY getPropertRangeDouble( VWHCamera hCam, VWCamProp propId, long* plMinValue = NULL, long* plMaxValue = NULL, VWBool* pbAuto = NULL);
00332 */
00333 
00334 // ------------------------------------------------------------------------------------------
00335 // VIDEO_setPropertyString
00336 // ------------------------------------------------------------------------------------------
00347 VWResult VWA_API VWA_API_ENTRY setPropertyString( VWHCamera hCam, VWCamProp propId, char* szValue);
00348 
00349 // ------------------------------------------------------------------------------------------
00350 // VIDEO_getPropertyString
00351 // ------------------------------------------------------------------------------------------
00362 VWResult VWA_API VWA_API_ENTRY getPropertyString( VWHCamera hCam, VWCamProp propId, char* szValue, int nSize);
00363 
00364 #ifdef __cplusplus  
00365 };
00366 #endif
00367 
00368 #endif // ifndef _VIDEOWRAPPERLIBADAPTER_H
00369 
00370 
00371 

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