#ifndef _TISGRABBER #define _TISGRABBER ////////////////////////////////////////////////////////////////////////// /*! @mainpage Please see "tisgrabber.h" for the function documentation. */ #include "TISGrabberGlobalDefs.h" // WINAPI for Visual Basic //#define AC WINAPI ////////////////////////////////////////////////////////////////////////// /*! Calling convention of the DLL functions. For internal use only. */ #define AC __stdcall ///< __stdcall for Borland C and Ansi C #ifndef _WINUSER_ ////////////////////////////////////////////////////////////////////////// /*! Workaround if we are in non windows environment. */ #define NOHWNDDEFINED 1 #define __HWND int ///< Workaround if we are in non windows environment. #else #define __HWND HWND ///= 0 Success, count of found devices @retval <0 An error occurred. Simple sample to list the video capture devices: @code char szDeviceList[20][40]; int iDeviceCount; iDeviceCount = IC_ListDevices( (char*)szDeviceList,40 ); for( i = 0; i < iDeviceCount; i++ ) { printf("%2d. %s\n",i+1,szDeviceList[i]); } @endcode */ int AC IC_ListDevices( char *szDeviceList, int iSize );///< Count and list devices. ////////////////////////////////////////////////////////////////////////// /*! Simpler approach of enumerating devices. No 2D char array needed @code char szDeviceName[40]; // Use max 39 chars for a device name int iDeviceCount; iDeviceCount = IC_GetDeviceCount(); // Query number of connected devices for( i = 0; i < iDeviceCount; i++ ) { IC_ListDevicesbyIndex(szDeviceName,39, i); printf("%2d. %s\n",i+1,szDeviceName); } @endcode @param szDeviceName Char memory, that receives the device name @param iSize Size of the char memory. If names are longer, they will be truncated. @param DeviceIndex Index of the device to be query. Must be between 0 and IC_GetDeviceCount. @retval >= 0 Success, count of found devices @retval <0 An error occurred. */ int AC IC_ListDevicesbyIndex( char *szDeviceName, int iSize, int DeviceIndex ); ////////////////////////////////////////////////////////////////////////// /*! Count all available video formats. If the Parameter szFormatList is NULL, only the number of formats is queried. The Parameter szFormatList must be a two dimensional array of char. The iSize parameter specifies the length of the strings, that are used in the array to store the format names. @param hGrabber The handle to the grabber object. @param szFormatList A two dimensional char array that recieves the list. Or NULL if only the count of formats is to be returned. @retval >= 0 Success, count of found video formats @retval <0 An error occurred. Simple sample to list the video capture devices: @code char szFormatList[80][40]; int iFormatCount; HGRABBER hGrabber; hGrabber = IC_CreateGrabber(); IC_OpenVideoCaptureDevice(hGrabber, "DFK 21F04" ); iFormatCount = IC_ListDevices(hGrabber, (char*)szFormatList,40 ); for( i = 0; i < min( iFormatCount, 80); i++ ) { printf("%2d. %s\n",i+1,szFormatList[i]); } IC_ReleaseGrabber( hGrabber ); @endcode */ int AC IC_ListVideoFormats( HGRABBER hGrabber, char *szFormatList, int iSize );///= 0 Success, count of found devices. @retval IC_NO_HANDLE Internal Error. @sa IC_GetDevice @sa IC_GetUniqueNamefromList */ int AC IC_GetDeviceCount(); ///= 0 Success @retval IC_NO_DEVICE No video capture device selected. @retval IC_NO_HANDLE No handle to the grabber object. @sa IC_GetInputChannel */ int AC IC_GetInputChannelCount( HGRABBER hGrabber ); ///= 0 Success @retval IC_NO_DEVICE No video capture device selected. @retval IC_NO_HANDLE No handle to the grabber object. @sa IC_GetVideoNorm */ int AC IC_GetVideoNormCount( HGRABBER hGrabber ); ///= 0 Success @retval IC_NO_DEVICE No video capture device selected. @retval IC_NO_HANDLE No handle to the grabber object. @sa IC_GetVideoFormat */ int AC IC_GetVideoFormatCount( HGRABBER hGrabber ); ///< Returns the count of available video formats. ////////////////////////////////////////////////////////////////////////// /*! Get a string representation of the video format specified by iIndex. iIndex must be between 0 and IC_GetVideoFormatCount(). IC_GetVideoFormatCount() must have been called before this function, otherwise it will always fail. @param hGrabber The handle to the grabber object. @param iIndex Number of the video format to be used. @retval Nonnull The name of the specified video format. @retval NULL An error occured. @sa IC_GetVideoFormatCount */ char* AC IC_GetVideoFormat( HGRABBER hGrabber, int iIndex ); ///1 Length of the display name, if szDisplayName is NULL. @sa IC_OpenDevByDisplayName @sa IC_ReleaseGrabber */ int AC IC_GetDisplayName( HGRABBER hGrabber, char *szDisplayname, int iLen); ///1 Length of the Unique name, if szUniqueName is NULL. */ int AC IC_GetUniqueName( HGRABBER hGrabber, char *szUniquename, int iLen); ///0 : Count of available trigger modes @retval IC_NO_HANDLE Invalid grabber handle @retval IC_NO_DEVICE No video capture device opened @code char szModes[20][10]; int iModeCount; iModeCount = IC_GetTriggerModes(hGrabber, (char*)szModes,20); for( int i = 0; i < min( iModeCount, 20); i++ ) { printf("%2d. %s\n",i+1,szModes[i]); } @endcode */ int AC IC_GetTriggerModes( HGRABBER hGrabber, char *szModeList, int iSize ); ///