|
|
@@ -1164,6 +1164,12 @@ ErrorCodeEnum CMediaControllerEntity::AutoGetVideoDeviceName(capture_config_t* c
|
|
|
}
|
|
|
|
|
|
|
|
|
+static CSimpleStringA generateCameraInfosJson(CSimpleStringA strEnv, CSimpleStringA strOpt, int iEnv, int iOpt, int iMtu)
|
|
|
+{
|
|
|
+ return CSimpleStringA::Format("[{\"EnvCamera\":\"%s\",\"OptCamera\":\"%s\",\"EnvRotate\":\"%d\",\"OptRotate\":\"%d\",\"mtu\":\"%d\"}]",
|
|
|
+ strEnv.GetData(), strOpt.GetData(), iEnv, iOpt, iMtu);
|
|
|
+}
|
|
|
+
|
|
|
ErrorCodeEnum CMediaControllerEntity::LoadConfig(capture_config_t *conf)
|
|
|
{
|
|
|
CSmartPointer<IEntityFunction> spFunction = GetFunction();
|
|
|
@@ -1172,6 +1178,7 @@ ErrorCodeEnum CMediaControllerEntity::LoadConfig(capture_config_t *conf)
|
|
|
strEwsCam = "$";
|
|
|
ErrorCodeEnum Error = spFunction->OpenConfig(Config_Root, spConfig);
|
|
|
if (Error == Error_Succeed) {
|
|
|
+ int imtu = 0;
|
|
|
table.AddEntryString("Audio", "handfree_in_dev", conf->strAudioIn, "$");
|
|
|
table.AddEntryString("Audio", "handfree_out_dev", conf->strAudioOut, "$");
|
|
|
table.AddEntryString("Video", "EnvCamera", conf->strVideoEnv, "$");
|
|
|
@@ -1181,9 +1188,14 @@ ErrorCodeEnum CMediaControllerEntity::LoadConfig(capture_config_t *conf)
|
|
|
table.AddEntryInt("Video", "OptRotate", conf->video_opt_rotate, 0);
|
|
|
table.AddEntryInt("Video", "EnvFps", conf->video_env_fps, 0);
|
|
|
table.AddEntryInt("Video", "OptFps", conf->video_opt_fps, 0);
|
|
|
+ table.AddEntryInt("Video", "mtu", imtu, 0);
|
|
|
Error = table.Load(spConfig);
|
|
|
if (Error == Error_Succeed)
|
|
|
{
|
|
|
+ LogWarn(Severity_Low, Error_Debug, ERROR_MOD_MEDIACONTROLLER_ENV_CAMERA_INFO, conf->strVideoEnv.GetData());
|
|
|
+ LogWarn(Severity_Low, Error_Debug, ERROR_MOD_MEDIACONTROLLER_OPT_CAMERA_INFO, conf->strVideoOpt.GetData());
|
|
|
+ LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_CAMERA_INFOS, generateCameraInfosJson(conf->strVideoEnv, conf->strVideoOpt, conf->video_env_rotate, conf->video_opt_rotate, imtu).GetData());
|
|
|
+
|
|
|
char strInfo[MAX_PATH * 2] = { 0 };
|
|
|
Error = AutoGetVideoDeviceName(conf);
|
|
|
snprintf(strInfo, MAX_PATH * 2, "env = %s,opt = %s", conf->strVideoEnv.GetData(), conf->strVideoOpt.GetData());
|