|
之前对接D版本是按照如下流程:
if (!BVCU_Result_SUCCEEDED(m_loginStatus)){
return BVCU_RESULT_E_FAILED;
}
MPUChannelInfo puInfo;
ZeroMemory(&puInfo, sizeof(puInfo));
if (strcmp(type, "data") == 0){
int result = m_data.GetPu(puId, &puInfo);
if (BVCU_Result_FAILED(result))
{
wchar_t buf[128];
wsprintf(buf, _T("m_data.GetPu result:%d \r\n"), result);
OutputDebugStringW(buf);
return result;
}
}
else if (strcmp(type, "4G") == 0){
int result = m_data.Get4GPu(puId, &puInfo);
if (BVCU_Result_FAILED(result))
{
wchar_t buf[128];
wsprintf(buf, _T("m_data.Get4GPu result:%d \r\n"), result);
OutputDebugStringW(buf);
return result;
}
}
OpenInfo openInfo;
ZeroMemory(&openInfo, sizeof(openInfo));
openInfo.wnd = hwnd;
strncpy_s(openInfo.sPUID, BVCU_MAX_ID_LEN + 1, puInfo.szPUID, _TRUNCATE);
RECT rect;
bool res = ::GetWindowRect(hwnd, &rect);
BVCU_Display_Rect dispRect;
dispRect.iBottom = rect.bottom;
dispRect.iLeft = rect.left;
dispRect.iRight = rect.right;
dispRect.iTop = rect.top;
// 查找video或者4G模块的通道号
if (strcmp(puInfo.pChannel[0].szName, "video") == 0 || strcmp(puInfo.pChannel[0].szName, "channel1") == 0)
{
for (int i = 0; i < puInfo.iChannelCount; i++){
//
// 10 代表单向视频回传
int result = CMLibBVCU::Browse(&openInfo.pDialog, puId, puInfo.pChannel.iChannelIndex, 10, hwnd, &dispRect);
if (BVCU_Result_SUCCEEDED(result)){
// 管理起来
m_openList.push_back(openInfo);
}
wchar_t buf[128];
wsprintf(buf, _T("CMLibBVCU::Browse result:%d \r\n"), result);
OutputDebugStringW(buf);
return result;
}
}
else if (strcmp(Utf8ToGbk(puInfo.pChannel[0].szName).c_str(), "通道1") == 0){
for (int i = 0; i < puInfo.iChannelCount; i++){
//
// 8 代表单向音频回传
int result = CMLibBVCU::Browse(&openInfo.pDialog, puId, puInfo.pChannel.iChannelIndex, 8, hwnd, &dispRect);
if (BVCU_Result_SUCCEEDED(result)){
// 管理起来
m_openList.push_back(openInfo);
}
wchar_t buf[128];
wsprintf(buf, _T("CMLibBVCU::Browse result:%d \r\n"), result);
OutputDebugStringW(buf);
return result;
}
}
return BVCU_RESULT_E_FAILED;
看最新SDK好像有点区别,能否指点一下? |
|