OpenSDK  V4.2.0
Typedefs | Functions
OpenNetStreamInterFace.h File Reference

OPEN SDK API Definition. More...

#include "OpenNetStreamDefine.h"
#include "OpenNetStreamError.h"

Go to the source code of this file.

Typedefs

typedef void(CALLBACK * OpenSDK_MessageHandler) (const char *szSessionId, unsigned int iMsgType, unsigned int iErrorCode, const char *pMessageInfo, void *pUser)
 Message callback. More...
 
typedef void(CALLBACK * OpenSDK_DataCallBack) (DataType enType, char *const pData, int iLen, void *pUser)
 Data callback format. More...
 
typedef void(CALLBACK * OpenSDK_Push_MessageHandler) (const char *szDesc, const char *szContent, const char *szDetail, void *pUser)
 Alarm notification callback function. More...
 

Functions

OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_InitLib (const char *szAuthAddr, const char *szPlatform, const char *szAppId)
 Initialize the library, support setting the system IP address. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_FiniLib ()
 Anti-initialize the library. More...
 
OPENSDK_API void CALLBACK OpenSDK_SetConfigInfo (ConfigKey iKey, const int iValue)
 Global configuration information, according to ConfigKey configuration. More...
 
OPENSDK_API void CALLBACK OpenSDK_SetPlatformAddr (const char *szPlatform)
 The platform address is set up, and the address of the overseas platform is reset back. The platform address is reset by calling this interface. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetAppID (const char *szAppId)
 Set APP ID. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetAccessToken (const char *szAccessToken)
 Set AccessToken. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_AllocSessionEx (OpenSDK_MessageHandler pHandle, void *pUser, char **pSession, int *iSessionLen)
 Apply a session ID. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_FreeSession (const char *szSessionId)
 Destroy SDk handle. More...
 
OPENSDK_API void CALLBACK OpenSDK_SetSessionConfig (const char *szSessionId, ConfigKey iKey, const int iValue)
 Configuring configuration information for Session, configured according to ConfigKey, before calling the stream. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetDataCallBack (const char *szSessionId, OpenSDK_DataCallBack pDataCallBack, void *pUser)
 Set data callback. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetVideoLevel (const char *szDevSerial, const int iChannelNo, const int iVideoLevel)
 Set or switch resolution. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_StartRealPlayEx (const char *szSessionId, HWND hPlayWnd, const char *szDevSerial, const int iChannelNo, const char *szSafeKey)
 Start playing, asynchronous API. Return value only stands for operating succeeded, doesn't mean playing succeeded. Judge the result via the message callback function msgid. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_StartPlayWithStreamType (const char *szSessionId, HWND hPlayWnd, const char *szDevSerial, const int iChannelNo, const char *szSafeKey, const int iStreamType)
 Start playing with streamtype, asynchronous API. Return value only stands for operating succeeded, doesn't mean playing succeeded. Judge the result via the message callback function msgid. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_StopRealPlayEx (const char *szSessionId)
 Stop playing, asynchronous API. Return value only stands for operating succeeded, doesn't mean playing succeeded. Judge the result via the message callback function msgid. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_StartSearchEx (const char *szSessionId, const char *szDevSerial, const int iChannelNo, const char *szStartTime, const char *szStopTime)
 Search video files,including the video files stored in cloud storage and devide storage. Only supports searching by date. Asynchronous API. Return value only stands for operating succeeded, doesn't mean playing succeeded. Judge the result via the message callback function msgid. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_StartPlayBackEx (const char *szSessionId, HWND hPlayWnd, const char *szDevSerial, const int iChannelNo, const char *szSafeKey, const char *szStartTime, const char *szStopTime)
 Start playback, asynchronization API. Return value only stands for operating succeeded, doesn't mean playing succeeded. Judge the result via the message callback function msgid. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_PlayBackResume (const char *szSessionId)
 Playback resumed. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_PlayBackPause (const char *szSessionId)
 Playback paused. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_StopPlayBackEx (const char *szSessionId)
 Playback stopped. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_GetOSDTime (const char *szSessionId, STREAM_TIME *pTime)
 Get OSD time. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_OpenSound (const char *szSessionId)
 Turn on audio. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_CloseSound (const char *szSessionId)
 Turn off audio. More...
 
OPENSDK_API unsigned short CALLBACK OpenSDK_GetVolume (const char *szSessionId)
 Get volume. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetVolume (const char *szSessionId, unsigned short uVolume)
 Adjust volume. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_StartVoiceTalkEx (const char *szSessionId, const char *szDevSerial, const int iChannelNo)
 Start Two-way audio, talking with multiple devices is not supported. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_StopVoiceTalk (const char *szSessionId)
 Stop Two-way audio. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_CapturePicture (const char *szSessionId, const char *szFileName)
 Capture, which is used when calling StartRealPlay succeeded (receive MsgId == INS_PLAY_START in the callback function) More...
 
OPENSDK_API void CALLBACK OpenSDK_SetLoginParams (LoginParamKey iKey, const char *szValue)
 Set the login incoming parameters. More...
 
OPENSDK_API const char *CALLBACK OpenSDK_GetLoginResponseParams (LoginParamKey iKey)
 Get the login parameters after logging in. More...
 
OPENSDK_API void CALLBACK OpenSDK_Logout ()
 Logout, match with the OpenSDK_Mid_Login API. More...
 
OPENSDK_API int CALLBACK OpenSDK_Mid_Login (char **szAccessToken, int *iAccessTokenLen)
 Login API. More...
 
OPENSDK_API int CALLBACK OpenSDK_Mid_Device_Add (const char *szAccessToken)
 Add device. More...
 
OPENSDK_API int CALLBACK OpenSDK_Mid_Device_Oper (const char *szAccessToken, const char *szDeviceId)
 Operate device. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Data_GetDevListEx (int iPageStart, int iPageSize, void **pBuf, int *iLength)
 Get camera list. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Data_GetSharedDevList (int iPageStart, int iPageSize, void **pBuf, int *iLength)
 Get shared camera list. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Data_GetDevDetailInfo (const char *szDevSerial, const int iChannelNo, const bool bUpdate, void **pDevDetailInfo, int *iLength)
 Get device details, including preview level, PTZ, intercom capability level etc. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Data_GetDeviceInfo (const char *szAccessToken, const char *szDeviceSerial, void **pBuf, int *iLength)
 Get single device information. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Data_GetAlarmListEx (const char *szDevSerial, const int iChannelNo, const char *szStartTime, const char *szEndTime, AlarmType iAlarmType, int iStatus, int iPageStart, int iPageSize, void **pBuf, int *iLength)
 Get alarm list. More...
 
OPENSDK_API int CALLBACK OpenSDK_DecryptPicture (const char *szAccessToken, const char *szPicURL, const char *szSerail, const char *szSafeKey, void **pPicBuf, int *iPicLen)
 Decrypt the alarm picture (calling encrypted picture and downloading unencrypted picture is suggested. Distinguish whether the picture is encrypted via the "isEncrypted=1" in the URL. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Data_SetAlarmRead (const char *szAccessToken, const char *szAlarmId)
 Set alarm information as read. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Data_DeleteDevice (const char *szAccessToken, const char *szDeviceId)
 Delete device. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Data_Free (void *pBuf)
 Destroy the memory allocated by SDK. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_PTZCtrlEx (const char *szSessionId, const char *szDevSerial, const int iChannelNo, PTZCommand enCommand, PTZAction enAction, int iSpeed)
 PTZ control. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_DevDefenceEx (const char *szSessionId, const char *szDevSerial, const int iChannelNo, DefenceType enType, DefenceStatus enStatus, DefenceActor enActor)
 Arm or disarm by Camera. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_HttpSendWithWait (const char *szUri, const char *szHeaderParam, const char *szBody, char **pBuf, int *iLength)
 Http Request API. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Push_SetAlarmCallBack (OpenSDK_Push_MessageHandler pHandle, void *pUser)
 Set alarm notification callback. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Push_SetDeviceStatusCallBack (OpenSDK_Push_MessageHandler pHandle, void *pUser)
 Set device online/ offline notification. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Push_SetTransparentChannelCallBack (OpenSDK_Push_MessageHandler pHandle, void *pUser)
 Set device online/ offline notification. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Push_StartRecvEx (const char *szPushSecret)
 Start receiving alarm. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_Push_StopRecv ()
 Stop receiving alarm. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_GetAreaList (void **pBuf, int *iBufLen)
 Get area list of all the nations. use in register. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_GetDeviceDDNSList (int iPageStart, int iPageSize, void **pBuf, int *iBufLen)
 This API is used to turn page to get the DDNS information of all the devices in the account. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetDeviceDDNSDomain (const char *szDevSerial, const char *szDomain)
 This API is used to set the device DDNS domain, including the shared device's DDNS domain. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_GetDeviceDDNSInfo (const char *szDevSerial, const char *szDomain, void **pBuf, int *iBufLen)
 This API is used to get the device DDNS information, including the shared device DDNS information. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetDeviceDDNSAutoMapping (const char *szDevSerial)
 This API is used to set device DDNS auto mapping mode by single device. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetDeviceDDNSManualMapping (const char *szDevSerial, const int iCmdPort, const int iHttpPort)
 This API is used to set device DDNS manual mapping mode by single device. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_ShareDeviceDDNSInfo (const char *szDevSerial, const char *szAccount)
 This API is used to Share DDNS information to other account by single device. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_GetShareDeviceDDNSList (int iPageStart, int iPageSize, void **pBuf, int *iBufLen)
 This API is used to turn page to get the DDNS information of all the shared devices in the current account. More...
 
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_GetLastErrorCode ()
 Get the error code API. More...
 
OPENSDK_API const char *CALLBACK OpenSDK_GetLastErrorDesc ()
 Error Code Description. More...
 

Detailed Description

OPEN SDK API Definition.

Author
panlong, peter
Date
2017/07/15
Note
history:
V3.0.3 2017/07/15 peter Editted file notes