www.pudn.com > ITSever.rar > client.h


#ifndef __CLIENT_H__ 
#define __CLIENT_H__ 
 
#ifdef CLIENT_EXPORTS 
#define CLIENT_API __declspec(dllexport) 
#else 
#define CLIENT_API __declspec(dllimport) 
#endif 
 
#ifdef __cplusplus 
extern "C" { 
#endif 
 
#include "clntsink.h" 
 
typedef int (__stdcall *pDataRec)(int sid, int iusrdata, int idatatype, char* pdata, int ilen); 
typedef int (__stdcall *pMsgBack)(int sid, int opt, int param1, int param2); 
typedef int HSESSION; 
 
 
/* 
  192.0.0.145是流媒体服务器的IP地址 
  rtsp://192.0.0.145/stream.264      //VOD 相对路径 
  rtsp://192.0.0.145/d:/流媒体/hikstream/files/stream.264      //VOD 绝对路径 
  rtsp://192.0.0.12/192.0.1.200:8000:DS-8000HC:0:0:admin:12345/av_stream //实时流 
*/ 
 
CLIENT_API int __stdcall InitStreamClientLib(void);  //初始化ACE 
 
CLIENT_API int __stdcall FiniStreamClientLib(void);  //关闭ACE 
 
CLIENT_API HSESSION __stdcall HIKS_CreatePlayer(IHikClientAdviseSink* pSink, void* pWndSiteHandle, pDataRec pRecFunc, pMsgBack pMsgFunc=0,int TransMethod=0);//创建Player 
 
CLIENT_API int __stdcall HIKS_OpenURL(HSESSION hSession,const char* pszURL,int iusrdata);//打开URL 
 
CLIENT_API int __stdcall HIKS_Play(HSESSION hSession);//播放 
 
CLIENT_API int __stdcall HIKS_RandomPlay(HSESSION hSession,unsigned long timepos);//随机位置播放,用于视频的前后拖动 
 
CLIENT_API int __stdcall HIKS_Pause(HSESSION hSession); //暂停 
 
CLIENT_API int __stdcall HIKS_Resume(HSESSION hSession);//恢复 
 
CLIENT_API int __stdcall HIKS_Stop(HSESSION hSession);//停止,销毁Player 
 
CLIENT_API int __stdcall HIKS_GetCurTime(HSESSION hSession,unsigned long *utime);//获取当前的播放时间,1/64秒为单位, 目前返回都是0 
 
CLIENT_API int __stdcall HIKS_ChangeRate(HSESSION hSession,int scale);//改变播放速率,在快进或慢进的时候用 
 
CLIENT_API int __stdcall HIKS_Destroy(HSESSION hSession);//销毁Player 
 
CLIENT_API int __stdcall HIKS_GetVideoParams(HSESSION hSession, int *ibri, int *icon, int *isat, int *ihue); 
 
CLIENT_API int __stdcall HIKS_SetVideoParams(HSESSION hSession, int ibri, int icon, int isat, int ihue); 
 
CLIENT_API int __stdcall HIKS_PTZControl(HSESSION hSession, unsigned int ucommand, int iparam1, int iparam2, int iparam3, int iparam4); 
 
CLIENT_API int __stdcall HIKS_SetVolume(HSESSION hSession,unsigned short volume);//设置音量 参数volume的范围是0-65535 
 
CLIENT_API int __stdcall HIKS_OpenSound(HSESSION hSession, bool bExclusive=false); 
 
CLIENT_API int __stdcall HIKS_CloseSound(HSESSION hSession); 
 
CLIENT_API int __stdcall HIKS_ThrowBFrameNum(HSESSION hSession,unsigned int nNum);//丢B祯 
 
CLIENT_API int __stdcall HIKS_GrabPic(HSESSION hSession,const char* szPicFileName, unsigned short byPicType); 
 
 
#ifdef __cplusplus 
} 
#endif 
 
#endif