OpenSDK  V4.2.0
Typedefs | Functions
API for live view

Typedefs

typedef void(CALLBACK * OpenSDK_DataCallBack) (DataType enType, char *const pData, int iLen, void *pUser)
 Data callback format. More...
 

Functions

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...
 

Detailed Description

Typedef Documentation

typedef void(CALLBACK * OpenSDK_DataCallBack) (DataType enType, char *const pData, int iLen, void *pUser)

Data callback format.

Parameters
enTypeData type, see details in DataType
pDataData content
iLenData length
pUserUser-defined data

Function Documentation

OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetDataCallBack ( const char *  szSessionId,
OpenSDK_DataCallBack  pDataCallBack,
void *  pUser 
)

Set data callback.

Parameters
[in]szSessionIdSession ID
[in]pDataCallBackCallback function
[in]pUserUser-defined data, which will be thrown out by pDataCallBack
Returns
Return 0 on success, -1 on failure
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_SetVideoLevel ( const char *  szDevSerial,
const int  iChannelNo,
const int  iVideoLevel 
)

Set or switch resolution.

Parameters
[in]szDevSerialDevice serial No.
[in]iChannelNoDevice channel No.
[in]iVideoLevelVedio quality, enter a number ranging from 0 to 2
Returns
Return 0 on success, non-0 on failure
See also
OpenSDK_StopRealPlay()
OpenSDK_SetDataCallBack
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.

Parameters
[in]szSessionIdSession ID
[in]hPlayWndDisplay window handle, NULL stands for getting streaming only, no playback
[in]szDevSerialDevice serial No.
[in]iChannelNoDevice channel No.
[in]szSafeKeyVideo encryption key. if video is not encrypted, set szsafekey as NULL
[in]iStreamTypestreamtype 1-main stream, 2-substream, -1-default streamtype
Returns
Return 0 on success, non-0 on failure
See also
OpenSDK_stopRealPlay
OpenSDK_SetDataCallBack
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.

Parameters
[in]szSessionIdSession ID
[in]hPlayWndDisplay window handle, NULL stands for getting streaming only, no playback
[in]szDevSerialDevice serial No.
[in]iChannelNoDevice channel No.
[in]szSafeKeyVideo encryption key. if video is not encrypted, set szsafekey as NULL
Returns
Return 0 on success, non-0 on failure
See also
OpenSDK_stopRealPlay
OpenSDK_SetDataCallBack
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.

Parameters
[in]szSessionIdSession ID
Returns
Return 0 on success, non-0 on failure
See also
OpenSDK_StartRealPlay()