Sensoray 2246 User Manual
Sensoray Hardware
Table of contents
Document Outline
- Table of Contents
- Introduction
- Software Installation
- 2246SDK Demo Application
- Building an application with the 2246SDK
- mid2246 Data Structure Documentation
- File Documentation
- mid2246const.h File Reference
- Error constants
- Snapshot error constants
- Frame rate Constants.
- Maximum count of MID2246_SOURCE_xxx enum's
- Video levels
- Snapshot and Overlay bitmasks for file types
- Caption region display mask
- Revision moniker for SDK backward capability
- Defines
- Enumerations
- Define Documentation
- #define MAX_DEVICES 30
- #define MAX_TEXTSIZE 256
- #define MID2246_SUCCESS 0
- #define MID2246_ERR_NONE 0
- #define MID2246_ERR_UNSPECIFIED -1
- #define MID2246_ERR_CAPTURING -2
- #define MID2246_ERR_NOTCAPTURING -3
- #define MID2246_ERR_RUNNING -4
- #define MID2246_ERR_SNAPSHOT -5
- #define MID2246_ERR_INVALIDFILE -6
- #define MID2246_ERR_DIRECTX -7
- #define MID2246_ERR_NODEVICE -8
- #define MID2246_ERR_NOTINITIALIZED -9
- #define MID2246_ERR_INVALIDMODE -10
- #define MID2246_ERR_NOMEM -11
- #define MID2246_ERR_INVALIDPARAM -12
- #define MID2246_ERR_INVALIDUSERDATA -13
- #define MID2246_ERR_NONEWDATA -14
- #define MID2246_ERR_PAUSERESUME_MUX -15
- #define MID2246_ERR_INVALID_DVIPARAM -16
- #define MID2246_WARN_NOPROGSDI_JITTER -17
- #define MID2246_ERR_DV_COM_ERROR -18
- #define MID2246_ERR_STRLEN -19
- #define MID2246_SNAP_ERR_UNSPECIFIED -1
- #define MID2246_SNAP_ERR_BUFSIZE -2
- #define MID2246_SNAP_ERR_BIST -3
- #define MID2246_SNAP_ERR_SYNCH -4
- #define MID2246_SNAP_ERR_CRITSEC -5
- #define MID2246_SNAP_ERR_PARTBUF -6
- #define MID2246_SNAP_ERR_DVBUF -7
- #define MID2246_SNAP_ERR_DVGRAB -8
- #define MID2246_SNAP_ERR_USERERR -9
- #define MID2246_FRAMERATE_DEFAULT 0
- #define MID2246_FRAMERATE_NTSC_2997 1
- #define MID2246_FRAMERATE_NTSC_15 2
- #define MID2246_FRAMERATE_NTSC_10 3
- #define MID2246_FRAMERATE_NTSC_5 4
- #define MID2246_FRAMERATE_NTSC_24 5
- #define MID2246_SOURCE_LASTSDI MID2246_SOURCE_HDSDI720P2
- #define MID2246_LEVEL_CONTRAST 1
- #define MID2246_LEVEL_BRIGHTNESS 2
- #define MID2246_LEVEL_SATURATION 4
- #define MID2246_LEVEL_HUE 8
- #define MID2246_LEVEL_SATURATION_CR 4
- #define MID2246_LEVEL_SATURATION_CB 8
- #define MID2246_FILE_JPEG 1
- #define MID2246_FILE_BMP 2
- #define MID2246_FILE_PPM 4
- #define MID2246_REGION_MONITOR 1
- #define MID2246_REGION_MPEG 2
- #define MID2246_REGION_STILL 4
- #define MID2246_BOARD_A 1
- #define MID2246_BOARD_H 2
- #define MID2246_BOARD_K 3
- Enumeration Type Documentation
- mid2246func.h File Reference
- Data Structures
- Defines
- Typedefs
- Functions
- Define Documentation
- Typedef Documentation
- Function Documentation - Configuration and Setup functions
- MID2246_API int SN_GetNumBoards (int * pBoards)
- MID2246_API int SN_GetVersion (char ** sMid2246Version, char ** sFPGA2246Version, int * pBoardId, int board)
- MID2246_API int SN_Initialize (HWND hwnd, HWND messageHwnd, int removeMsg, int board)
- MID2246_API int SN_Shutdown (int board)
- MID2246_API int SN_UpdateClippingWindow (HWND hwnd, int board)
- MID2246_API int SN_SetVideoPosition (int xpos, int ypos, int xsize, int ysize, int left_clip, int top_clip, int right_clip, int bottom_clip, int board)
- MID2246_API int SN_SetSource (MID2246_SOURCE input, BOOL bTest, int board)
- MID2246_API int SN_GetSource (MID2246_SOURCE * pSource, int board)
- MID2246_API int SN_SetVidSys (MID2246_VIDSYS vidsys, int board)
- MID2246_API int SN_GetVidSys (int board)
- MID2246_API int SN_SetDvi (MID2246_DVIRES res, BOOL bColorBars, int DviCropLeft, int DviCropTop, int DviCropRight, int DviCropBottom, int board)
- MID2246_API int SN_SetMpegCrop (int MpegCropLeft, int MpegCropTop, int MpegCropRight, int MpegCropBottom, int board)
- MID2246_API int SN_SetMpegConfig (MPEG_CONFIG * pConfig, int board)
- MID2246_API int SN_GetMpegConfig (MPEG_CONFIG * pConfig, int board)
- MID2246_API int SN_SetLevels (int param, unsigned char value, int board)
- MID2246_API int SN_SetAudioInput (MID2246_AUDIO_INPUT audio, int micBoost, int board)
- 0 on success
- MID2246_API int SN_SetAudioOutput (MID2246_AUDIO_OUTPUT audio, int board)
- MID2246_API int SN_GetStatus (MIDSRAYSTATUS * pStats, int board)
- MID2246_API int SN_GetFrameSync (int * sync, int board)
- MID2246_API int SN_IsValidVid (MID2246_SOURCE checksource, int board)
- MID2246_API int SN_IsValidSdi (MID2246_SOURCE checksource, int board)
- MID2246_API int SN_IsValidDv (int board)
- MID2246_API int SN_EnumerateInputs (int * pStatus, int * pVidSys, int board)
- MID2246_API int SN_GetVidStatus (int board)
- MID2246_API int SN_GetVidStatusNoBIST (int board)
- Function Documentation - Callback functions from application
- Function Documentation - Recording functions
- MID2246_API int SN_StartStream (int board = 0)
- MID2246_API int SN_StopStream (int board = 0)
- MID2246_API int SN_LowLatency (BOOL bON, int board)
- MID2246_API int SN_StartRecord (char * filename, int size, int breakonrecsize = 0, int board = 0)
- MID2246_API int SN_StartRecordW (LPWSTR filename, int size, int breakonrecsize = 0, int board = 0)
- MID2246_API int SN_SetNotifyAtRecordEnd (HWND hNotifyApp, UINT mNotifyMessage, int board = 0)
- MID2246_API int SN_SetNotifyAtRecordEndW (HWND hNotifyApp, UINT mNotifyMessage, int board = 0)
- MID2246_API int SN_PauseRecord (int board = 0)
- MID2246_API int SN_ResumeRecord (int board = 0)
- MID2246_API int SN_StopRecord (int board = 0)
- MID2246_API int SN_SetRecordMode (MID2246_REC recMode, int board = 0)
- MID2246_API int SN_SetRecordVideoStream (BOOL bRecVid, int board = 0)
- MID2246_API int SN_GetRecordVideoStream (BOOL * bRecVid, int board = 0)
- MID2246_API int SN_SetRecordAudioStream (BOOL bRecAud, int board = 0)
- MID2246_API int SN_GetRecordAudioStream (BOOL * bRecAud, int board = 0)
- MID2246_API int SN_SetAudioEncode (BOOL bEncAud, int board = 0)
- MID2246_API int SN_GetAudioEncode (BOOL * bEncAud, int board = 0)
- MID2246_API int SN_SetRenderVideo (BOOL bDisplayVideo, int board = 0)
- MID2246_API int SN_GetRenderVideo (BOOL * bDisplayVideo, int board = 0)
- MID2246_API int SN_SetAspectRatio (MID2246_ASPECT_MODE mode, int board = 0)
- MID2246_API int SN_GetAspectRatio (MID2246_ASPECT_MODE * mode, int board = 0)
- MID2246_API int SN_GetTimeLeft (int bitrate, int board)
- Function Documentation - Playback functions
- MID2246_API int SN_PlaybackVideo (char * filename_plus_path, int board = 0)
- MID2246_API int SN_PlaybackVideoW (LPWSTR filename_plus_path, int board = 0)
- MID2246_API int SN_StopPlayback (int board = 0)
- MID2246_API int SN_PausePlayback (BOOL bPause, int board = 0)
- MID2246_API int SN_SetNotifyDuringFilePlay (HWND hNotifyApp, UINT mNotifyMessage, int board = 0)
- MID2246_API int SN_PlaybackSetRate (double drate, int board = 0)
- MID2246_API int SN_PlaybackSetSeekPosition (int percent, int range, int board = 0)
- MID2246_API int SN_PlaybackGetSeekPosition (int range, int board = 0)
- MID2246_API int SN_DisplaySnapshot (char * filename, int time, int board = 0)
- MID2246_API int SN_DisplaySnapshotW (LPWSTR filename, int time, int board = 0)
- MID2246_API int SN_StopDisplaySnapshot (int board = 0)
- Function Documentation - General configuration functions
- Function Documentation - Image capture functions
- MID2246_API int SN_SetMergeMethod (MID2246_FIELDALG merge_method, mergefunc_t * custom_alg, int board)
- MID2246_API int SN_SnapshotToFile (char * szFilename, int filetype, int freezetime, int wait, int qual, int CustMergeSize, int board)
- MID2246_API int SN_SnapshotToFileW (LPWSTR pFile, int filetype, int freezetime, int wait, int qual, int CustMergeSize, int board)
- MID2246_API int SN_SnapshotToMem (BYTE * image, int size, int freezetime, int wait, int board)
- MID2246_API int SN_SnapshotRaw (BYTE * image, int size, image_raw_t * pImage, int freezetime, int wait, int board)
- MID2246_API int SN_FreezeFrame (int bFreeze, int board = 0)
- Function Documentation - Overlay functions
- MID2246_API int SN_OverlayText (int xpos, int ypos, overlay_text_t * pOvlText, int regionmask, int board)
- MID2246_API int SN_OverlayTextIdx (int AtIndex, int xpos, int ypos, overlay_text_t * pOvlText, int regionmask, int board)
- MID2246_API int SN_OverlayImage (int xpos, int ypos, char * imageFile, int regionmask, int board)
- MID2246_API int SN_OverlayImageIdx (int AtIndex, int xpos, int ypos, char * imageFile, int regionmask, int board)
- MID2246_API int SetOverlayImageRaw (BYTE * image, int xPos, int yPos, int xSize, int ySize, int AtIndex, int AtIndex, int xpos, int ypos, int regionmask, int board)
- MID2246_API int SN_OverlayQuad (int WinIndex, char * imageFile, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int regionmask, int board)
- MID2246_API int SN_CopyBmpToOverlayZero (char * ImageFile, char * ImageRGBptr, int xPos, int yPos, int xSize, int ySize, int Backgnd_ForegndN, int board)
- MID2246_API int SN_GetOverlayIdx (int WinIndex, int * Type, int * Region, int * Group, int * Xpos, int * Ypos, char ** Value, int board)
- MID2246_API int SN_OverlayBackgroundColor (int red, int green, int blue, int board)
- MID2246_API int SN_MoveOverlay (int WinIndex, int NewX, int NewY, int board)
- MID2246_API int SN_OverlayDelXY (int xpos, int ypos, int board)
- MID2246_API int SN_OverlayDel (int WinIndex, int board)
- MID2246_API int SN_UpdateOverlay (int board)
- MID2246_API int SN_ClearOverlay (int board)
- MID2246_API int SN_ClearOverlayRegion (int regionmask, int board)
- MID2246_API int SN_SetOverlayRegion (int regionmask, int board)
- MID2246_API int SN_SetOverlayMode (int mode, int board)
- Function Documentation - General Purpose IO
- Function Documentation - Other
- Sample code