|
@@ -1275,61 +1275,6 @@ private:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // comment by ly@2019/03/19
|
|
|
- //ErrorCodeEnum TryStartCamera()
|
|
|
- //{
|
|
|
- // Dbg("[dbg] StartExternalCamera");
|
|
|
- // ErrorCodeEnum errorCode = StartUSBCamera();
|
|
|
- // Dbg("StartExternalCamera:0x%x", errorCode);
|
|
|
- // int nRetCod = 5;
|
|
|
- // switch(errorCode)
|
|
|
- // {
|
|
|
- // case Error_Succeed:
|
|
|
- // {
|
|
|
- // nRetCod = 0; // 正常
|
|
|
- // /// add by ly at 20161017
|
|
|
- // /// notify to rvcweb that outer camera switch has finished
|
|
|
- // ExternalCameraStateChanged evt;
|
|
|
- // evt.statemsg = CSimpleStringA2W("已切换到外接摄像头!");
|
|
|
- // evt.camname = CSimpleStringA2W(strUSBCam);
|
|
|
- // SpSendBroadcast(GetFunction(), SP_MSG_OF(ExternalCameraStateChanged), SP_MSG_SIG_OF(ExternalCameraStateChanged), evt);
|
|
|
- // Dbg("[dbg] ExternalCameraStateChanged broadcast sent!");
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // case Error_Resource:
|
|
|
- // nRetCod = 1; // 外接摄像头未插入
|
|
|
- // break;
|
|
|
- // case Error_EnvCamera:
|
|
|
- // case Error_AllCamera:
|
|
|
- // nRetCod = 2; // 外接摄像头启动失败
|
|
|
- // OnExternalCameraSwitchFailed(SwitchFailed_StartFault);
|
|
|
- // break;
|
|
|
- // case Error_DevNotAvailable:
|
|
|
- // nRetCod = 3; // 检测到一个外接摄像头,但无法分辨名称
|
|
|
- // OnExternalCameraSwitchFailed(SwitchFailed_Ambiguous);
|
|
|
- // break;
|
|
|
- // case Error_Duplication:
|
|
|
- // nRetCod = 4; // 检测到两个以上外接摄像头
|
|
|
- // OnExternalCameraSwitchFailed(SwitchFailed_NoUnique);
|
|
|
- // break;
|
|
|
- // default:
|
|
|
- // nRetCod = 5; // 其他错误
|
|
|
- // OnExternalCameraSwitchFailed(SwitchFailed_StartFault);
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // if (m_bStartCamera == FALSE) // 外接没启动成,如果内置没启动,切换到内置
|
|
|
- // {
|
|
|
- // SetCameraSysVar(CAMERA_START_ING);
|
|
|
- // ExternalCameraStateChanged evt;
|
|
|
- // evt.statemsg = CSimpleStringA2W("无法启动外接,内置切换中……");
|
|
|
- // evt.camname = CSimpleStringA2W(strEnvCam);
|
|
|
- // SpSendBroadcast(GetFunction(), SP_MSG_OF(ExternalCameraStateChanged), SP_MSG_SIG_OF(ExternalCameraStateChanged), evt);
|
|
|
- // Dbg("[dbg] ExternalCameraStateChanged broadcast sent!");
|
|
|
- // return StopUSBCamera();
|
|
|
- // }
|
|
|
-
|
|
|
- // return Error_Succeed;
|
|
|
- //}
|
|
|
|
|
|
virtual void OnLog( const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,const LogTypeEnum eLogType, const SeverityLevelEnum eLevel,
|
|
|
const DWORD dwSysError,const DWORD dwUserCode,const DWORD dwEntityInstanceID, const WORD wEntityDevelID,
|
|
@@ -1442,7 +1387,7 @@ private:
|
|
|
case EVENT_MOD_CUSTOMERAWARE_END:
|
|
|
{
|
|
|
m_bCustomerwareBegin = false;
|
|
|
- if (/*m_bIsPadType&&*/m_bStartCamera&&!m_bExternControlCam)
|
|
|
+ if (m_bStartCamera&&!m_bExternControlCam)
|
|
|
{
|
|
|
Dbg("stop camera");
|
|
|
if (m_capture)
|
|
@@ -1470,41 +1415,6 @@ private:
|
|
|
StartCameraAndTiggerRecord((LPCTSTR)strSessionId);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- // comment by ly@2019/03/19
|
|
|
- //::Sleep(2000); // 延迟2s后判断
|
|
|
- //// 如果不是广角摄像头 edit by ly at 20161216
|
|
|
- //if(!strstr((LPCTSTR)strEwsCam,pszMessage))
|
|
|
- //{
|
|
|
- // if (strUSBCam.GetLength() <= 1)
|
|
|
- // {
|
|
|
- // strUSBCam = pszMessage;
|
|
|
- // // 对低柜双屏版屏蔽外接摄像头插入事件 edit by ly@2018/10
|
|
|
- // if (eDesk2SType != m_eDeviceType)
|
|
|
- // {
|
|
|
- // // 广播给业务系统
|
|
|
- // ExternalCameraInserted evt;
|
|
|
- // evt.camname = CSimpleStringA2W(strUSBCam);
|
|
|
- // SpSendBroadcast(GetFunction(), SP_MSG_OF(ExternalCameraInserted), SP_MSG_SIG_OF(ExternalCameraInserted), evt);
|
|
|
- // Dbg("[dbg] ExternalCameraInserted broadcast sent!");
|
|
|
- // }
|
|
|
-
|
|
|
- // /// add by ly at 20161017
|
|
|
- // /// notify to rvcweb that outer camera is switching
|
|
|
- // SetCameraSysVar(CAMERA_START_ING);
|
|
|
- // ExternalCameraStateChanged evt1;
|
|
|
- // evt1.statemsg = CSimpleStringA2W("外接摄像头切换中,请稍等……");
|
|
|
- // evt1.camname = CSimpleStringA2W(strUSBCam);
|
|
|
- // SpSendBroadcast(GetFunction(), SP_MSG_OF(ExternalCameraStateChanged), SP_MSG_SIG_OF(ExternalCameraStateChanged), evt1);
|
|
|
- // Dbg("[dbg] ExternalCameraStateChanged broadcast sent!");
|
|
|
-
|
|
|
- // TryStartCamera();
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // Dbg("[dbg] more than one USBCam inserted!");
|
|
|
- // }
|
|
|
- //}
|
|
|
}
|
|
|
break;
|
|
|
|