|
@@ -184,6 +184,8 @@ void CMediaControllerEntity::OnPreStart(CAutoArray<CSimpleStringA> strArgs,CSmar
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("register sysvar %s failed!", SYSVAR_CALLSTATE);
|
|
|
}
|
|
|
|
|
|
+ SetCameraConfigSysVar(CAMERACONFIG_INIT);
|
|
|
+
|
|
|
int i = 0;
|
|
|
|
|
|
m_arrListener.Init(14);
|
|
@@ -269,6 +271,7 @@ void CMediaControllerEntity::OnStarted()
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Camera State to CAMERA_OPT_ERROR");
|
|
|
m_nCameraErrorCode = Error_OptCamera;
|
|
|
}
|
|
|
+ SetCameraConfigSysVar(CAMERACONFIG_FALSE);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -280,11 +283,11 @@ void CMediaControllerEntity::OnStarted()
|
|
|
m_nCameraErrorCode = Error_AllCamera;
|
|
|
}
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Load Config failed!");
|
|
|
+ SetCameraConfigSysVar(CAMERACONFIG_FALSE);
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- SetCameraSysVar(CAMERA_NO_ERROR);
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Camera State to CAMERA_NO_ERROR");
|
|
|
+ SetCameraConfigSysVar(CAMERACONFIG_TRUE);
|
|
|
}
|
|
|
}
|
|
|
else{
|
|
@@ -466,6 +469,13 @@ ErrorCodeEnum CMediaControllerEntity::SetCameraSysVar(const CSimpleStringA &newV
|
|
|
}
|
|
|
|
|
|
|
|
|
+ErrorCodeEnum CMediaControllerEntity::SetCameraConfigSysVar(const CSimpleStringA& newVal)
|
|
|
+{
|
|
|
+ CSmartPointer<IEntityFunction> spFunction = this->GetFunction();
|
|
|
+
|
|
|
+ return spFunction->SetSysVar(SYSVAR_CAMERACONFIG, newVal.GetData());
|
|
|
+}
|
|
|
+
|
|
|
void CMediaControllerEntity::OnPreClose(EntityCloseCauseEnum eCloseCause,CSmartPointer<ITransactionContext> pTransactionContext)
|
|
|
{
|
|
|
CSmartPointer<IEntityFunction> spFunction = GetFunction();
|