#pragma once

#define CALL_TYPE  __stdcall
#define SEEKFIT_API extern "C" __declspec(dllexport)

//#pragma comment (lib, "By5000asiplay.lib")

#include "TypeDefine.h"

#define		SEEKFIT_CARD_TYPE_By5000ASIPLAY		0x5100

#define		By5000ASIPLAY_MODE_MEDIA_CG			0
#define		By5000ASIPLAY_MODE_MEDIA				1
#define		By5000ASIPLAY_MODE_CG					2

#define		By5000ASIPLAY_OPTION_CONTROL_RELAY		0x4000

#define		RELAY_MODE_LOOPBACK					0
#define		RELAY_MODE_NORMAL					1

#define		VIDEO_MODE_NTSC						0
#define		VIDEO_MODE_PAL						1

#define		SYNC_SOURCE_INTERNAL				0x80

#define		VIDEO_SOURCE_CVBS1					0
#define		VIDEO_SOURCE_SVIDEO					1
#define		VIDEO_SOURCE_YUV					2
//#define		VIDEO_SOURCE_CVBS2					3
//#define		VIDEO_SOURCE_SDI					4
#define		VIDEO_SOURCE_ASI					5

//#define		AUDIO_SOURCE_XLR					0
#define		AUDIO_SOURCE_RCA					1
//#define		AUDIO_SOURCE_SDI					2
#define		AUDIO_SOURCE_ASI					3

#define		VIDEO_OUTPUT_YUV					0
#define		VIDEO_OUTPUT_CVBS_YC				1

#define		VIDEO_INPUT_UNLOCKED				0
#define		VIDEO_INPUT_LOCKED					1

#define		AUDIO_CHANNEL_STEREO				0
#define		AUDIO_CHANNEL_LEFT					1
#define		AUDIO_CHANNEL_RIGHT					2
#define		AUDIO_CHANNEL_BLEND					3

#define		VOLUMN_NO_SHOW_MODE					0
#define		VOLUMN_WINDOW_VERTICAL_UP_MODE		1
#define		VOLUMN_WINDOW_VERTICAL_DOWN_MODE	2
#define		VOLUMN_OVERLAY_VERTICAL_UP_MODE		5
#define		VOLUMN_OVERLAY_VERTICAL_DOWN_MODE	6

#define		RECORDER_CAPTURE_ANALOG_STREAM		1
#define		RECORDER_PLAYBACK_STREAM			2
#define		RECORDER_CAPTURE_TS_STREAM			3

////////////////////////////////////////////////////////////////////////////
// System Functions
////////////////////////////////////////////////////////////////////////////

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetTotalCardNumber(UINT & uiTotalCardNumber);

// By5000ASIplay card type No. : 0x2000
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetCardTypeNumber(UINT & uiCardTypeNo, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_OpenCard(UINT uiMode = By5000ASIPLAY_MODE_MEDIA_CG, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CloseCard(UINT uiCardNumber = 0);

// Restore board to factory status
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_RestoreDefault(UINT uiCardNumber = 0);

// Events
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_InitialEndOfFilePlaybackEvent(LPCTSTR szEvent, HANDLE & hEvent, UINT uiCardNumber = 0);

// If szEvent is NULL, close all events
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CloseEndOfFilePlaybackEvent(HANDLE hEvent, UINT uiCardNumber = 0);

////////////////////////////////////////////////////////////////////////////
// Media Player Functions
////////////////////////////////////////////////////////////////////////////

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_EnableMediaFilePlayback(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_DisableMediaFilePlayback(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetAnalyzedMediaFileInformation(LPCTSTR szFileName, UINT uiAnalyzeLevel, BOOL & bError,
																   MEDIA_FILE_INFORMATION & mfiFileInformation, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextOpen(LPCTSTR szFileName, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSeek(ULONG ulInTime, ULONG ulOutTime, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextPeek(ULONG & ulInTime, ULONG & ulOutTime, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSetRate(DOUBLE dRate, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaEnableAutoSwitch(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaDisableAutoSwitch(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSwitch(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaPlay(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaPause(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaStop(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaEnableFirstFramePause(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaDisableFirstFramePause(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSeek(ULONG ulInTime, ULONG ulOutTime, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaPeek(ULONG & ulInTime, ULONG & ulOutTime, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetRate(DOUBLE dRate, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaGetStatus(UINT & uiStatus, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextGetStatus(UINT & uiStatus, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaEnablePlaybackDve(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaDisablePlaybackDve(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetBackgroundPicture(PULONG pulBuffer, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetDveSourceWindow(UINT uiXStart, UINT uiYStart, UINT uiWidth, UINT uiHeight, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetDveDestWindow(UINT uiXStart, UINT uiYStart, UINT uiWidth, UINT uiHeight, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSetDveSourceWindow(UINT uiXStart, UINT uiYStart, UINT uiWidth, UINT uiHeight, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSetDveDestWindow(UINT uiXStart, UINT uiYStart, UINT uiWidth, UINT uiHeight, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetAudioVolumn(UINT uiAudioVolumn, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetAudioChannel(UINT uiAudioChannel, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSetAudioVolumn(UINT uiAudioVolumn, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSetAudioChannel(UINT uiAudioChannel, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaEnableAudioMute(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaDisableAudioMute(UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaEnableAudioVolumnAutoAdjust(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaDisableAudioVolumnAutoAdjust(UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetDvdAudioIndex(UINT uiIndex, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetDvdSubPictureIndex(UINT uiIndex, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSetDvdAudioIndex(UINT uiIndex, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSetDvdSubPictureIndex(UINT uiIndex, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaGetTimeCode(ULONG & ulTime, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaGetFileInformation(MEDIA_FILE_INFORMATION & mfiFileInformation, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextGetFileInformation(MEDIA_FILE_INFORMATION & mfiFileInformation, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetMosaicRectangles(MOSAIC_RECTANGLE * pMosaicRectangle, UINT uiMosaicRectNumber, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaNextSetMosaicRectangles(MOSAIC_RECTANGLE * pMosaicRectangle, UINT uiMosaicRectNumber, UINT uiCardNumber = 0);

////////////////////////////////////////////////////////////////////////////
// Capture Functions
////////////////////////////////////////////////////////////////////////////

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_EnableCapturedStreamPlayback(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_DisableCapturedStreamPlayback(UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamEnableDelay(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamDisableDelay(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetDelayTime(UINT uiSecond, UINT uiFrame, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamEnablePlaybackDve(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamDisablePlaybackDve(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetDveSourceWindow(UINT uiXStart, UINT uiYStart, UINT uiWidth, UINT uiHeight, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetDveDestWindow(UINT uiXStart, UINT uiYStart, UINT uiWidth, UINT uiHeight, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetAudioVolumn(UINT uiAudioVolumn, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetAudioChannel(UINT uiAudioChannel, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamEnableAudioMute(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamDisableAudioMute(UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamEnableAudioVolumnAutoAdjust(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamDisableAudioVolumnAutoAdjust(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetVolumnShowBarMode(UINT uiVolumnChannel, UINT uiShowMode, HWND hWindow, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetVideoBufferNumber(UINT uiBufferNum, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamGetVideoBufferNumber(UINT& uiBufferNum, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetAudioBufferNumber(UINT uiBufferNum, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamGetAudioBufferNumber(UINT& uiBufferNum, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamSetVideoMattingParam(VIDEO_MATTING_PARAM* pVideoMattingParam, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamEnableVideoMatting(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CapturedStreamDisableVideoMatting(UINT uiCardNumber = 0);


////////////////////////////////////////////////////////////////////////////
// Character Generator Functions
////////////////////////////////////////////////////////////////////////////
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_EnableCgOverlay(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_DisableCgOverlay(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CgGetBufferAddress(PVOID & pCgBufferAddress, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CgClearScreen(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CgSetOverlayMode(UINT uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CgGetOverlayMode(UINT & uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CgGetRectangle(UINT uiX, UINT uiY, UINT uiWidth, UINT uiHeight, PULONG pulValue, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CgSetRectangle(UINT uiX, UINT uiY, UINT uiWidth, UINT uiHeight, PULONG pulValue, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CgUpdateOneFrame(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_CgUpdateOneField(UINT uiCardNumber = 0);
////////////////////////////////////////////////////////////////////////////
// Preview Windows Functions
//
// uiWindowNumber - 0 : Video output preview window, same as TV's display, enabled default
// uiWindowNumber - 1 : Video input preview window, disabled default
//
////////////////////////////////////////////////////////////////////////////
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_EnableVideoPreviewWindow(UINT uiWindowNumber, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_DisableVideoPreviewWindow(UINT uiWindowNumber, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_VideoPreviewWindowSet(UINT uiWindowNumber, HWND hWindow, 
														 UINT uiXOffset, UINT uiYOffset, UINT uiWidth, UINT uiHeight, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_EnableShowSafeMargins(UINT uiCardNumber);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_DisableShowSafeMargins(UINT uiCardNumber);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_MediaSetVolumnShowBarMode(UINT uiVolumnChannel, UINT uiShowMode, HWND hWindow, UINT uiCardNumber = 0);
////////////////////////////////////////////////////////////////////////////
// Card Configuration Functions
////////////////////////////////////////////////////////////////////////////

// Relay Control
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoRelayMode(UINT uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoRelayMode(UINT & uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetAudioRelayMode(UINT uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetAudioRelayMode(UINT & uiMode, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoInputStatus(UINT & uiStatus, UINT uiCardNumber = 0);

// 0: NTSC
// 1: PAL
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoMode(UINT & uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoMode(UINT uiMode, UINT uiCardNumber = 0);

// blacklevel = 1: 7.5 IRE
// blacklevel = 0: 0.0 IRE
// Set black level. It is useful for NTSC video
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoBlackLevel(UINT uiBlackLevel, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoBlackLevel(UINT & uiBlackLevel, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetSyncSource(UINT & uiSource, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetSyncSource(UINT uiSource, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoSource(UINT & uiSource, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoSource(UINT uiSource, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetAudioSource(UINT & uiSource, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetAudioSource(UINT uiSource, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoInputLockMode(UINT & uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoInputLockMode(UINT uiMode, UINT uiCardNumber = 0);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoInputContrast(UINT & uiContrast, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoInputContrast(UINT uiContrast, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoInputBrightness(UINT & uiBrightness, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoInputBrightness(UINT uiBrightness, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoInputHue(UINT & uiHue, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoInputHue(UINT uiHue, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetVideoInputSaturation(UINT & uiSaturation, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoInputSaturation(UINT uiSaturation, UINT uiCardNumber = 0);

// addr range is from 0x00 to 0x2f
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_VerifyUserData(UINT uiAddr, UINT uiLength, UCHAR * pucData, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetUserData(UINT uiAddr, UCHAR ucData, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetVideoOverlayMode(UINT uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_SetAudioPlayBackMode(UINT uiMode, UINT uiSource, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_Test(UINT * puiPara, UINT uiParaNumber, UINT uiCardNumber = 0);

// Version Function
// Board version {BOARD_VERSION_MAJOR(16bits), BOARD_VERSION_MINOR(16bits)}
// FPGA design version {FPGA_VERSION_MAJOR(16bits), FPGA_VERSION_MINOR(16bits)}
// Board version	{	0x00,
//									BOARD_VERSION_MAJOR(8bits),
//									BOARD_VERSION_MINOR(8bits),
//									BOARD_VERSION_REVISION(8bits)
//								}
// FPGA version		{	0x00,
//									FPGA_VERSION_MAJOR(8bits),
//									FPGA_VERSION_MINOR(8bits),
//									FPGA_VERSION_REVISION(8bits)
//								}
// Driver version	{	0x00,
//									DRIVER_VERSION_MAJOR(8bits),
//									DRIVER_VERSION_MINOR(8bits),
//									DRIVER_VERSION_REVISION(8bits)
//								}
// SDK version		{	0x00,
//									SDK_VERSION_MAJOR(8bits),
//									SDK_VERSION_MINOR(8bits),
//									SDK_VERSION_REVISION(8bits)
//								}
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetBoardVersion(UINT * puiBuffer, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetFPGAVersion(UINT * puiBuffer, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetDriverVersion(UINT * puiBuffer, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetSdkVersion(UINT * puiBuffer);

SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetSerialNumber(ULONG & ulSerialNumber, UINT uiCardNumber = 0);

/////////////////////////////////////
//									
//		EFFECT Functions	
//
//////////////////////////////////////
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_VideoStreamSetTransformEffect(UINT uiEffect, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_VideoStreamSetTransformMode(UINT uiMode, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_VideoStreamSetTransformEffectDuration(INT nDuration, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_VideoStreamTriggerTransform(UINT uiCardNumber = 0);

extern struct MediaFrame;

/////////////////////////////////////
//									
//		Recorder Functions	
//
//////////////////////////////////////
extern struct MediaFrame;
//Seekfit_By5000asiplay_RecorderConfig在Seekfit_By5000asiplay_RecorderOpen调用之前生效，
//Seekfit_By5000asiplay_RecorderOpen调用后，Seekfit_By5000asiplay_RecorderConfig不生效。
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_RecorderConfig(UINT uiRecordSource, LPVOID lpParam, UINT uiChannel, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_RecorderOpen(UINT uiRecordSource, UINT uiChannel, RECORDER_PROGRAM_LIST rplProgramList, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_RecorderStart(UINT uiRecordSource, UINT uiChannel, RECORDER_PROGRAM_LIST rplProgramList, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_RecorderStop(UINT uiRecordSource, UINT uiChannel, RECORDER_PROGRAM_LIST rplProgramList, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_RecorderCgEnable(BOOL bEnable, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_RecorderPlaybackFrameToFile(LPCTSTR szFileName, UINT uiCardNumber = 0);

//SEEKFIT_API BOOL CALL_TYPE Seekfit_VerifyCard(UINT uiCardNumber = 0);
/*
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_GetCardRandomData(ULONG & ulRandomData, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_ValidateCard(ULONG ulEncryptResult, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_ValidateSoftware(ULONG ulRandomData, ULONG & ulEncryptResult, UINT uiCardNumber = 0);
*/
/////////////////////////////////////
//									
//		TransportStream Functions	
//
//////////////////////////////////////
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_TsCaptureEnable(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_TsCaptureDisable(UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_TsCaptureGetProgramInformation(TS_PROGRAM_INFO& tpiProgramInfo, INT& nStatus, UINT uiCardNumber = 0);
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_TsCaptureSetSelectedProgram(int iFiltProgramNum, unsigned short* uiRemoveProgramPid, UINT uiCardNumber = 0);

//开启ts播出功能
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_TsPlaybackEnable(UINT uiCardNumber = 0);
//关闭ts播出功能
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_TsPlaybackDisable(UINT uiCardNumber = 0);
//配置ts流参数，
//该配置只有在调用Seekfit_By5000asiplay_TsPlaybackEnable之前调用才会有效。
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_TsPlaybackEncoderConfig(LPVOID lpParam, UINT uiCardNumber = 0);
//开启ts流试试监控功能。
SEEKFIT_API BOOL CALL_TYPE Seekfit_By5000asiplay_TsPlaybackSwitchStreamMonitor(BOOL bSwitch/*0:off,1:on*/, UINT uiCardNumber = 0);
