239 lines
12 KiB
C
239 lines
12 KiB
C
|
#ifndef _HC_EHOME_STREAM_H_
|
|||
|
#define _HC_EHOME_STREAM_H_
|
|||
|
|
|||
|
#include "HCISUPPublic.h"
|
|||
|
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_PREVIEW_CB_MSG
|
|||
|
{
|
|||
|
BYTE byDataType; //NET_DVR_SYSHEAD(1)-<2D><><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7>NET_DVR_STREAMDATA(2)-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes1[3];
|
|||
|
void* pRecvdata; //<2F><><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DWORD dwDataLen; //<2F><><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
|||
|
BYTE byRes2[128];
|
|||
|
}NET_EHOME_PREVIEW_CB_MSG, *LPNET_EHOME_PREVIEW_CB_MSG;
|
|||
|
|
|||
|
typedef void(CALLBACK *PREVIEW_DATA_CB)(LONG iPreviewHandle, NET_EHOME_PREVIEW_CB_MSG* pPreviewCBMsg, void* pUserData);
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_NEWLINK_CB_MSG
|
|||
|
{
|
|||
|
BYTE szDeviceID[MAX_DEVICE_ID_LEN]; //<2F>豸<EFBFBD><E8B1B8>ʾ<EFBFBD><CABE>(<28><><EFBFBD><EFBFBD>)
|
|||
|
LONG iSessionID; //<2F>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>Ự<EFBFBD><E1BBB0>ID(<28><><EFBFBD><EFBFBD>)
|
|||
|
DWORD dwChannelNo; //<2F>豸ͨ<E8B1B8><CDA8><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byStreamType; //0-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byRes1[2];
|
|||
|
BYTE byStreamFormat; //<2F><>װ<EFBFBD><D7B0>ʽ<EFBFBD><CABD>0- PS,1-<2D><><EFBFBD><D7BC>(<28><><EFBFBD><EFBFBD>)
|
|||
|
char sDeviceSerial[NET_EHOME_SERIAL_LEN]; //<2F>豸<EFBFBD><E8B1B8><EFBFBD>кţ<D0BA><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
#if (defined(OS_WINDOWS64) || defined(OS_POSIX64))//win64<36><34>linux64<36><34>ָ<EFBFBD><D6B8>Ϊ8<CEAA>ֽ<EFBFBD>
|
|||
|
PREVIEW_DATA_CB fnPreviewDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
void *pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnPreviewDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
#else
|
|||
|
PREVIEW_DATA_CB fnPreviewDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byRes2[4];
|
|||
|
void *pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnPreviewDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byRes3[4];
|
|||
|
#endif
|
|||
|
BYTE byRes[96];
|
|||
|
}NET_EHOME_NEWLINK_CB_MSG, *LPNET_EHOME_NEWLINK_CB_MSG;
|
|||
|
|
|||
|
typedef BOOL (CALLBACK *PREVIEW_NEWLINK_CB)(LONG lLinkHandle, NET_EHOME_NEWLINK_CB_MSG* pNewLinkCBMsg, void* pUserData);
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_LISTEN_PREVIEW_CFG
|
|||
|
{
|
|||
|
NET_EHOME_IPADDRESS struIPAdress; //<2F><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>IPΪ0.0.0.0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>Ĭ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>Ĭ<EFBFBD><EFBFBD>Ϊ<EFBFBD>Ӳ<EFBFBD><EFBFBD><EFBFBD>ϵͳ<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>һ<EFBFBD><EFBFBD>
|
|||
|
PREVIEW_NEWLINK_CB fnNewLinkCB; //Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>SDK<44><4B><EFBFBD>ص<EFBFBD><D8B5>ûص<C3BB><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void* pUser; // <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>fnNewLinkCB<43>з<EFBFBD><D0B7>س<EFBFBD><D8B3><EFBFBD>
|
|||
|
BYTE byLinkMode; //0<><30>TCP<43><50>1<EFBFBD><31>UDP 2: HRUDP<44><50>ʽ 8<><38>NPQ<50><51>ʽ
|
|||
|
BYTE byLinkEncrypt; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>,TCPͨ<50><CDA8>TLS<4C><53><EFBFBD>䣬UDP(<28><><EFBFBD><EFBFBD>NPQ)ʹ<><CAB9>DTLS<4C><53><EFBFBD>䣬0-<2D><><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>1-<2D><><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes[126];
|
|||
|
}NET_EHOME_LISTEN_PREVIEW_CFG, *LPNET_EHOME_LISTEN_PREVIEW_CFG;
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_PREVIEW_DATA_CB_PARAM
|
|||
|
{
|
|||
|
PREVIEW_DATA_CB fnPreviewDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void* pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnPreviewDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BYTE byStreamFormat; //<2F><>װ<EFBFBD><D7B0>ʽ<EFBFBD><CABD>0- PS
|
|||
|
BYTE byRes[127]; //<2F><><EFBFBD><EFBFBD>
|
|||
|
}NET_EHOME_PREVIEW_DATA_CB_PARAM, *LPNET_EHOME_PREVIEW_DATA_CB_PARAM;
|
|||
|
|
|||
|
typedef enum tagNET_EHOME_ESTREAM_INIT_CFG_TYPE
|
|||
|
{
|
|||
|
NET_EHOME_ESTREAM_INIT_CFG_LIBEAY_PATH = 0, //<2F><><EFBFBD><EFBFBD>OpenSSL<53><4C>libeay32.dll/libcrypto.so<73><6F><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
|||
|
NET_EHOME_ESTREAM_INIT_CFG_SSLEAY_PATH = 1, //<2F><><EFBFBD><EFBFBD>OpenSSL<53><4C>ssleay32.dll/libssl.so<73><6F><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
|||
|
NET_EHOME_ESTREAM_INIT_CFG_USERCERTIFICATE_PATH = 2, //<2F><><EFBFBD><EFBFBD>TLS<4C><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DTLS<4C><53><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>·<EFBFBD><C2B7><EFBFBD><EFBFBD>TLS<4C><53>DTLS<4C><53><EFBFBD><EFBFBD>ͬһ<CDAC><D2BB>֤<EFBFBD><D6A4>
|
|||
|
NET_EHOME_ESTREAM_INIT_CFG_USERPRIVATEKEY_PATH = 3 //<2F><><EFBFBD><EFBFBD>TLS<4C><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DTLS<4C><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˽Կ֤<D4BF><D6A4>·<EFBFBD><C2B7><EFBFBD><EFBFBD>TLS<4C><53>DTLS<4C><53><EFBFBD><EFBFBD>ͬһ<CDAC><D2BB>֤<EFBFBD><D6A4>
|
|||
|
}NET_EHOME_ESTREAM_INIT_CFG_TYPE;
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_LOCAL_PLAYBACK_PARAM
|
|||
|
{
|
|||
|
DWORD dwSize;
|
|||
|
BYTE byPlayBackSync; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ط<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD>գ<EFBFBD>0-<2D><>ʾʹ<CABE><CAB9><EFBFBD>첽<EFBFBD><ECB2BD>ʽ<EFBFBD><CABD>1-<2D><>ʾʹ<CABE><CAB9>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD>ʽ;
|
|||
|
BYTE byRes[131];
|
|||
|
}NET_EHOME_LOCAL_PLAYBACK_PARAM, *LPNET_EHOME_LOCAL_PLAYBACK_PARAM;
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_Init();
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_Fini();
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_SetSDKInitCfg(NET_EHOME_ESTREAM_INIT_CFG_TYPE enumType, void* const lpInBuff);
|
|||
|
|
|||
|
NET_DVR_API DWORD CALLBACK NET_ESTREAM_GetLastError();
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_SetExceptionCallBack(DWORD dwMessage, HANDLE hWnd, void (CALLBACK* fExceptionCallBack)(DWORD dwType, LONG iUserID, LONG iHandle, void* pUser), void* pUser);
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_SetLogToFile(LONG iLogLevel, char *strLogDir, BOOL bAutoDel);
|
|||
|
|
|||
|
//<2F><>ȡ<EFBFBD>汾<EFBFBD><E6B1BE>
|
|||
|
NET_DVR_API DWORD CALLBACK NET_ESTREAM_GetBuildVersion();
|
|||
|
|
|||
|
NET_DVR_API LONG CALLBACK NET_ESTREAM_StartListenPreview(LPNET_EHOME_LISTEN_PREVIEW_CFG pListenParam);
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_StopListenPreview(LONG iListenHandle);
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_StopPreview(LONG iPreviewHandle);
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_SetPreviewDataCB(LONG iHandle, LPNET_EHOME_PREVIEW_DATA_CB_PARAM pStruCBParam);
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_SetStandardPreviewDataCB(LONG iHandle, LPNET_EHOME_PREVIEW_DATA_CB_PARAM pStruCBParam);
|
|||
|
|
|||
|
#define NET_EHOME_DEVICEID_LEN 256 //<2F>豸ID<49><44><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_PLAYBACK_DATA_CB_INFO
|
|||
|
{
|
|||
|
DWORD dwType; //<2F><><EFBFBD><EFBFBD> 0-ͷ<><CDB7>Ϣ 1-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 15-HLS<4C><53><EFBFBD><EFBFBD><EFBFBD>ط<EFBFBD>
|
|||
|
BYTE* pData; //<2F><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
|
|||
|
DWORD dwDataLen; //<2F><><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
|||
|
BYTE byRes[128]; //<2F><><EFBFBD><EFBFBD>
|
|||
|
}NET_EHOME_PLAYBACK_DATA_CB_INFO, *LPNET_EHOME_PLAYBACK_DATA_CB_INFO;
|
|||
|
|
|||
|
typedef BOOL(CALLBACK *PLAYBACK_DATA_CB)(LONG iPlayBackLinkHandle, NET_EHOME_PLAYBACK_DATA_CB_INFO* pDataCBInfo, void* pUserData);
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_PLAYBACK_NEWLINK_CB_INFO
|
|||
|
{
|
|||
|
char szDeviceID[NET_EHOME_DEVICEID_LEN]; //<2F>豸<EFBFBD><E8B1B8>ʾ<EFBFBD><CABE>(<28><><EFBFBD><EFBFBD>)
|
|||
|
LONG lSessionID; //<2F>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ûطŻỰ<C5BB><E1BBB0>ID<49><44>0<EFBFBD><30>ʾ<EFBFBD><CABE>Ч(<28><><EFBFBD><EFBFBD>)
|
|||
|
DWORD dwChannelNo; //<2F>豸ͨ<E8B1B8><CDA8><EFBFBD>ţ<EFBFBD>0<EFBFBD><30>ʾ<EFBFBD><CABE>Ч(<28><><EFBFBD><EFBFBD>)
|
|||
|
char sDeviceSerial[NET_EHOME_SERIAL_LEN/*12*/]; //<2F>豸<EFBFBD><E8B1B8><EFBFBD>кţ<D0BA><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byStreamFormat; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0>ʽ<EFBFBD><CABD>0-PS 1-RTP(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byRes1[3];
|
|||
|
#if (defined(OS_WINDOWS64) || defined(OS_POSIX64))//win64<36><34>linux64<36><34>ָ<EFBFBD><D6B8>Ϊ8<CEAA>ֽ<EFBFBD>
|
|||
|
PLAYBACK_DATA_CB fnPlayBackDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
void* pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnPlayBackDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
#else
|
|||
|
PLAYBACK_DATA_CB fnPlayBackDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byRes2[4];
|
|||
|
void* pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnPlayBackDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byRes3[4];
|
|||
|
#endif
|
|||
|
BYTE byRes[88];
|
|||
|
}NET_EHOME_PLAYBACK_NEWLINK_CB_INFO, *LPNET_EHOME_PLAYBACK_NEWLINK_CB_INFO;
|
|||
|
|
|||
|
typedef BOOL (CALLBACK *PLAYBACK_NEWLINK_CB)(LONG lPlayBackLinkHandle, NET_EHOME_PLAYBACK_NEWLINK_CB_INFO* pNewLinkCBInfo, void* pUserData);
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_PLAYBACK_LISTEN_PARAM
|
|||
|
{
|
|||
|
NET_EHOME_IPADDRESS struIPAdress; //<2F><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>IPΪ0.0.0.0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>Ĭ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ַ<EFBFBD><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>Ĭ<EFBFBD><C4AC>Ϊ<EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD>ϵͳ<CFB5><CDB3>ȡ<EFBFBD><C8A1><EFBFBD>ĵ<EFBFBD>һ<EFBFBD><D2BB>
|
|||
|
PLAYBACK_NEWLINK_CB fnNewLinkCB; //<2F>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӻص<D3BB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void* pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>fnNewLinkCB<43>з<EFBFBD><D0B7>س<EFBFBD><D8B3><EFBFBD>
|
|||
|
BYTE byLinkMode; //0<><30>TCP<43><50>1<EFBFBD><31>UDP (UDP<44><50><EFBFBD><EFBFBD>)
|
|||
|
BYTE byLinkEncrypt; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>,TCPͨ<50><CDA8>TLS<4C><53><EFBFBD>䣬UDP(<28><><EFBFBD><EFBFBD>NPQ)ʹ<><CAB9>DTLS<4C><53><EFBFBD>䣬0-<2D><><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>1-<2D><><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes[126];
|
|||
|
}NET_EHOME_PLAYBACK_LISTEN_PARAM, *LPNET_EHOME_PLAYBACK_LISTEN_PARAM;
|
|||
|
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_PLAYBACK_DATA_CB_PARAM
|
|||
|
{
|
|||
|
PLAYBACK_DATA_CB fnPlayBackDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void* pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnPlayBackDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BYTE byStreamFormat; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0>ʽ<EFBFBD><CABD>0-PS 1-RTP
|
|||
|
BYTE byRes[127]; //<2F><><EFBFBD><EFBFBD>
|
|||
|
}NET_EHOME_PLAYBACK_DATA_CB_PARAM, *LPNET_EHOME_PLAYBACK_DATA_CB_PARAM;
|
|||
|
|
|||
|
#define EHOME_PREVIEW_EXCEPTION 0x102 //Ԥ<><D4A4>ȡ<EFBFBD><C8A1><EFBFBD>쳣
|
|||
|
#define EHOME_PLAYBACK_EXCEPTION 0x103 //<2F>ط<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>쳣
|
|||
|
#define EHOME_AUDIOTALK_EXCEPTION 0x104 //<2F><><EFBFBD><EFBFBD><EFBFBD>Խ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD>쳣
|
|||
|
|
|||
|
#define NET_EHOME_SYSHEAD 1 //ϵͳͷ<CDB3><CDB7><EFBFBD><EFBFBD>
|
|||
|
#define NET_EHOME_STREAMDATA 2 //<2F><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define NET_EHOME_STREAMEND 3 //<2F><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define NET_EHOME_HLS 15 //HLS<4C>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
NET_DVR_API LONG CALLBACK NET_ESTREAM_StartListenPlayBack(LPNET_EHOME_PLAYBACK_LISTEN_PARAM pListenParam);
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_SetPlayBackDataCB(LONG iPlayBackLinkHandle, NET_EHOME_PLAYBACK_DATA_CB_PARAM* pDataCBParam);
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_StopPlayBack(LONG iPlayBackLinkHandle);
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_StopListenPlayBack(LONG iPlaybackListenHandle);
|
|||
|
|
|||
|
//--------------------------------------------------------------------------------------------------------------
|
|||
|
#define NET_EHOME_DEVICEID_LEN 256 //<2F>豸ID<49><44><EFBFBD><EFBFBD>
|
|||
|
#define NET_EHOME_SERIAL_LEN 12
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_VOICETALK_DATA_CB_INFO
|
|||
|
{
|
|||
|
BYTE* pData; //<2F><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>
|
|||
|
DWORD dwDataLen; //<2F><><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
|||
|
BYTE byRes[128]; //<2F><><EFBFBD><EFBFBD>
|
|||
|
}NET_EHOME_VOICETALK_DATA_CB_INFO, *LPNET_EHOME_VOICETALK_DATA_CB_INFO;
|
|||
|
|
|||
|
typedef BOOL(CALLBACK *VOICETALK_DATA_CB)(LONG lHandle, NET_EHOME_VOICETALK_DATA_CB_INFO* pDataCBInfo, void* pUserData);
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_VOICETALK_NEWLINK_CB_INFO
|
|||
|
{
|
|||
|
BYTE szDeviceID[NET_EHOME_DEVICEID_LEN/*256*/]; //<2F>豸<EFBFBD><E8B1B8>ʾ<EFBFBD><CABE>(<28><><EFBFBD><EFBFBD>)
|
|||
|
DWORD dwEncodeType; // //SDK<44><4B>ֵ,<2C><>ǰ<EFBFBD>Խ<EFBFBD><D4BD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0- G722_1<5F><31>1-G711U<31><55>2-G711A<31><41>3-G726<32><36>4-AAC<41><43>5-MP2L2<4C><32>6-PCM, 7-MP3, 8-G723, 9-MP1L2, 10-ADPCM, 99-RAW(δʶ<CEB4><CAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)(<28><><EFBFBD><EFBFBD>)
|
|||
|
char sDeviceSerial[NET_EHOME_SERIAL_LEN/*12*/]; //<2F>豸<EFBFBD><E8B1B8><EFBFBD>кţ<D0BA><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
DWORD dwAudioChan; //<2F>Խ<EFBFBD>ͨ<EFBFBD><CDA8>(<28><><EFBFBD><EFBFBD>)
|
|||
|
LONG lSessionID; //<2F>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ûطŻỰ<C5BB><E1BBB0>ID<49><44>0<EFBFBD><30>ʾ<EFBFBD><CABE>Ч(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byToken[64];
|
|||
|
#if (defined(OS_WINDOWS64) || defined(OS_POSIX64))//win64<36><34>linux64<36><34>ָ<EFBFBD><D6B8>Ϊ8<CEAA>ֽ<EFBFBD>
|
|||
|
VOICETALK_DATA_CB fnVoiceTalkDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
void *pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnVoiceTalkDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
#else
|
|||
|
VOICETALK_DATA_CB fnVoiceTalkDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byRes1[4];
|
|||
|
void *pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnVoiceTalkDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
BYTE byRes2[4];
|
|||
|
#endif
|
|||
|
BYTE byRes[48];
|
|||
|
} NET_EHOME_VOICETALK_NEWLINK_CB_INFO, *LPNET_EHOME_VOICETALK_NEWLINK_CB_INFO;
|
|||
|
|
|||
|
typedef BOOL (CALLBACK *VOICETALK_NEWLINK_CB)(LONG lHandle, NET_EHOME_VOICETALK_NEWLINK_CB_INFO* pNewLinkCBInfo, void* pUserData);
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_LISTEN_VOICETALK_CFG
|
|||
|
{
|
|||
|
NET_EHOME_IPADDRESS struIPAdress; //<2F><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>IPΪ0.0.0.0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>Ĭ<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ַ<EFBFBD><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>£<EFBFBD>Ĭ<EFBFBD><C4AC>Ϊ<EFBFBD>Ӳ<EFBFBD><D3B2><EFBFBD>ϵͳ<CFB5><CDB3>ȡ<EFBFBD><C8A1><EFBFBD>ĵ<EFBFBD>һ<EFBFBD><D2BB>
|
|||
|
VOICETALK_NEWLINK_CB fnNewLinkCB; //<2F><><EFBFBD><EFBFBD><EFBFBD>ӻص<D3BB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void* pUser; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>fnNewLinkCB<43>з<EFBFBD><D0B7>س<EFBFBD><D8B3><EFBFBD>
|
|||
|
BYTE byLinkMode; //0<><30>TCP<43><50>1<EFBFBD><31>UDP (UDP<44><50><EFBFBD><EFBFBD>)
|
|||
|
BYTE byLinkEncrypt; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>,TCPͨ<50><CDA8>TLS<4C><53><EFBFBD>䣬UDP(<28><><EFBFBD><EFBFBD>NPQ)ʹ<><CAB9>DTLS<4C><53><EFBFBD>䣬0-<2D><><EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD>1-<2D><><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes[126];
|
|||
|
}NET_EHOME_LISTEN_VOICETALK_CFG, *LPNET_EHOME_LISTEN_VOICETALK_CFG;
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_VOICETALK_DATA_CB_PARAM
|
|||
|
{
|
|||
|
VOICETALK_DATA_CB fnVoiceTalkDataCB; //<2F><><EFBFBD>ݻص<DDBB><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void* pUserData; //<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>, <20><>fnVoiceTalkDataCB<43>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BYTE byRes[128]; //<2F><><EFBFBD><EFBFBD>
|
|||
|
}NET_EHOME_VOICETALK_DATA_CB_PARAM, *LPNET_EHOME_VOICETALK_DATA_CB_PARAM;
|
|||
|
|
|||
|
typedef struct tagNET_EHOME_VOICETALK_DATA
|
|||
|
{
|
|||
|
BYTE* pSendBuf; //<2F><>Ƶ<EFBFBD><C6B5><EFBFBD>ݻ<EFBFBD><DDBB><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DWORD dwDataLen; //<2F><>Ƶ<EFBFBD><C6B5><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
|||
|
DWORD dwTimeout; //<2F><><EFBFBD>ݷ<EFBFBD><DDB7>ͳ<EFBFBD>ʱʱ<CAB1>䣬<EFBFBD><E4A3AC>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>룻0-Ĭ<>ϣ<EFBFBD>5000ms<6D><73>
|
|||
|
BYTE byRes[124]; //<2F><><EFBFBD><EFBFBD>
|
|||
|
}NET_EHOME_VOICETALK_DATA, *LPNET_EHOME_VOICETALK_DATA;
|
|||
|
|
|||
|
NET_DVR_API LONG CALLBACK NET_ESTREAM_StartListenVoiceTalk(LPNET_EHOME_LISTEN_VOICETALK_CFG pListenParam);
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_StopListenVoiceTalk(LONG lListenHandle);
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_SetVoiceTalkDataCB(LONG lHandle, LPNET_EHOME_VOICETALK_DATA_CB_PARAM pStruCBParam);
|
|||
|
NET_DVR_API LONG CALLBACK NET_ESTREAM_SendVoiceTalkData (LONG lHandle, LPNET_EHOME_VOICETALK_DATA pVoicTalkData);
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_StopVoiceTalk(LONG lHandle);
|
|||
|
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_SetSDKLocalCfg(NET_EHOME_LOCAL_CFG_TYPE enumType, void* const lpInBuff);
|
|||
|
NET_DVR_API BOOL CALLBACK NET_ESTREAM_GetSDKLocalCfg(NET_EHOME_LOCAL_CFG_TYPE enumType, void* lpOutBuff);
|
|||
|
|
|||
|
|
|||
|
#endif //_HC_EHOME_STREAM_H_
|