OpenSDK
V4.2.0
|
类型定义 | |
typedef void(CALLBACK * | OpenSDK_MessageHandler) (const char *szSessionId, unsigned int iMsgType, unsigned int iErrorCode, const char *pMessageInfo, void *pUser) |
信息回调 更多... | |
函数 | |
OPENSDK_API OPENSDK_RESULT CALLBACK | OpenSDK_AllocSessionEx (OpenSDK_MessageHandler pHandle, void *pUser, char **pSession, int *iSessionLen) |
申请一个会话Id 更多... | |
OPENSDK_API OPENSDK_RESULT CALLBACK | OpenSDK_FreeSession (const char *szSessionId) |
销毁SDK操作句柄 更多... | |
OPENSDK_API void CALLBACK | OpenSDK_SetSessionConfig (const char *szSessionId, ConfigKey iKey, const int iValue) |
针对Session设置配置信息, 根据ConfigKey进行配置, 取流之前调用 更多... | |
typedef void(CALLBACK * OpenSDK_MessageHandler) (const char *szSessionId, unsigned int iMsgType, unsigned int iErrorCode, const char *pMessageInfo, void *pUser) |
信息回调
szSessionId | 申请的会话ID |
iMsgType | 消息号 MessageType |
iErrorCode | 错误码 OpenNetStreamError.h |
pMessageInfo | 信息 |
pUser | 用户自定义数据 |
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_AllocSessionEx | ( | OpenSDK_MessageHandler | pHandle, |
void * | pUser, | ||
char ** | pSession, | ||
int * | iSessionLen | ||
) |
申请一个会话Id
[in] | pHandle | 设置回调函数, OpenSDK_MessageHandler |
[in] | pUser | 用户自定义数据,会在pHandle中原样抛出 |
[out] | pSession | 用于接收分配的会话ID |
[out] | iSessionLen | pSession的长度 |
OPENSDK_API OPENSDK_RESULT CALLBACK OpenSDK_FreeSession | ( | const char * | szSessionId | ) |
销毁SDK操作句柄
[in] | szSessionId | 会话Id,通过OpenSDK_AllocSession()创建 |
OPENSDK_API void CALLBACK OpenSDK_SetSessionConfig | ( | const char * | szSessionId, |
ConfigKey | iKey, | ||
const int | iValue | ||
) |
针对Session设置配置信息, 根据ConfigKey进行配置, 取流之前调用
[in] | iKey | ConfigKey, 配置类型 |
[in] | iValue | 配置数值, 如果key=CONFIG_OPEN_STREAMTRANS, value=1时表示视频码流经过转封装库输出,用于录像 |