|
@@ -1594,7 +1594,7 @@ namespace MediaController {
|
|
|
else
|
|
|
{
|
|
|
cap->opt_video->ustarttime = y2k_time_now();
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_OPTCAM_OPEN, "start optcam success.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start optcam success.");
|
|
|
return Error_EnvCamera;
|
|
|
}
|
|
|
}
|
|
@@ -1607,7 +1607,7 @@ namespace MediaController {
|
|
|
else
|
|
|
{
|
|
|
cap->env_video->ustarttime = y2k_time_now();
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_ENVCAM_OPEN, "start envcam success.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start envcam success.");
|
|
|
if (cap->opt_video)
|
|
|
{
|
|
|
if (cap->env_video)
|
|
@@ -1626,7 +1626,7 @@ namespace MediaController {
|
|
|
else
|
|
|
{
|
|
|
cap->opt_video->ustarttime = y2k_time_now();
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_OPTCAM_OPEN, "start optcam success.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start optcam success.");
|
|
|
return Error_Succeed;
|
|
|
}
|
|
|
}
|
|
@@ -1656,7 +1656,7 @@ namespace MediaController {
|
|
|
else
|
|
|
{
|
|
|
cap->opt_video->ustarttime = y2k_time_now();
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_OPTCAM_OPEN, "start optcam success.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start optcam success.");
|
|
|
return Error_EnvCamera;
|
|
|
}
|
|
|
}
|
|
@@ -1700,7 +1700,7 @@ namespace MediaController {
|
|
|
}
|
|
|
else{
|
|
|
cap->env_video->ustarttime = y2k_time_now();
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_ENVCAM_OPEN, "start envcam success.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start envcam success.");
|
|
|
return Error_Succeed;
|
|
|
}
|
|
|
}
|
|
@@ -1713,7 +1713,7 @@ namespace MediaController {
|
|
|
}
|
|
|
else{
|
|
|
cap->opt_video->ustarttime = y2k_time_now();
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_OPTCAM_OPEN, "start optcam success.");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start optcam success.");
|
|
|
return Error_Succeed;
|
|
|
}
|
|
|
}
|
|
@@ -1786,7 +1786,7 @@ namespace MediaController {
|
|
|
//LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_ENVCAM_CLOSE, CSimpleStringA::Format("stop envcam, and camera open time is %us.", ienvtime).GetData());
|
|
|
if (ienvtime >= 1) {
|
|
|
float fenvframerate = (float)((float)cap->env_video->frame_id / (float)ienvtime);
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_ENVCAM_FRAME_INFO, CSimpleStringA::Format("env camera frame info is dest frame number is %d(%us), real frame number is %d, difference is %d, real frmerate is %.2ffps.", ienvtime * cap->config.video_env_fps, ienvtime, cap->env_video->frame_id, ienvtime * cap->config.video_env_fps - cap->env_video->frame_id, fenvframerate).GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("env camera frame info is dest frame number is %d(%us), real frame number is %d, difference is %d, real frmerate is %.2ffps.", ienvtime * cap->config.video_env_fps, ienvtime, cap->env_video->frame_id, ienvtime * cap->config.video_env_fps - cap->env_video->frame_id, fenvframerate);
|
|
|
}
|
|
|
}
|
|
|
video_capture_stop(cap->env_video);
|
|
@@ -1797,7 +1797,7 @@ namespace MediaController {
|
|
|
//LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_OPTCAM_CLOSE, CSimpleStringA::Format("stop optcam, and camera open time is %us.", iopttime).GetData());
|
|
|
if (iopttime >= 1) {
|
|
|
float foptframerate = (float)((float)cap->opt_video->frame_id / (float)iopttime);
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_OPTCAM_FRAME_INFO, CSimpleStringA::Format("opt camera frame info is dest frame number is %d(%us), real frame number is %d, difference is %d, real frmerate is %.2ffps.", iopttime * cap->config.video_opt_fps, iopttime, cap->opt_video->frame_id, iopttime * cap->config.video_opt_fps - cap->opt_video->frame_id, foptframerate).GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("opt camera frame info is dest frame number is %d(%us), real frame number is %d, difference is %d, real frmerate is %.2ffps.", iopttime * cap->config.video_opt_fps, iopttime, cap->opt_video->frame_id, iopttime * cap->config.video_opt_fps - cap->opt_video->frame_id, foptframerate);
|
|
|
}
|
|
|
}
|
|
|
video_capture_stop(cap->opt_video);
|
|
@@ -1887,17 +1887,17 @@ namespace MediaController {
|
|
|
#ifdef RVC_OS_WIN
|
|
|
int n = videocap_get_device_count();
|
|
|
for (int i = 0; i < n; ++i) {
|
|
|
- WCHAR tmp[256];
|
|
|
- char t[256];
|
|
|
- WCHAR tmp1[256];
|
|
|
- char t1[256];
|
|
|
+ WCHAR tmp[MAX_PATH] = {0};
|
|
|
+ char t[MAX_PATH] = { 0 };
|
|
|
+ WCHAR tmp1[MAX_PATH] = { 0 };
|
|
|
+ char t1[MAX_PATH] = { 0 };
|
|
|
videocap_get_device_name(i, tmp, ARRAYSIZE(tmp));
|
|
|
WideCharToMultiByte(CP_ACP, 0, tmp, -1, t, sizeof(t), 0, NULL);
|
|
|
videocap_get_device_path(i, tmp1, ARRAYSIZE(tmp1));
|
|
|
WideCharToMultiByte(CP_ACP, 0, tmp1, -1, t1, sizeof(t1), 0, NULL);
|
|
|
|
|
|
- char t2[256];
|
|
|
- strcpy(t2,t1);
|
|
|
+ char t2[MAX_PATH] = {0};
|
|
|
+ strcpy(t2, t1);
|
|
|
for (int j = 0; j < strlen(t2); ++j)
|
|
|
{
|
|
|
t2[j] = toupper(t2[j]);
|
|
@@ -1981,12 +1981,12 @@ namespace MediaController {
|
|
|
icamnum = videocap_get_device_count();
|
|
|
//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("camera count is %d.", icamnum);
|
|
|
for (int i = 0; i < icamnum; ++i) {
|
|
|
- WCHAR tmp[256] = {0};
|
|
|
- char t[256] = {0};
|
|
|
- WCHAR tmp1[256] ={0};
|
|
|
- char t1[256] = {0};
|
|
|
- WCHAR tmp2[256] = { 0 };
|
|
|
- char t2[256] = { 0 };
|
|
|
+ WCHAR tmp[MAX_PATH] = {0};
|
|
|
+ char t[MAX_PATH] = {0};
|
|
|
+ WCHAR tmp1[MAX_PATH] ={0};
|
|
|
+ char t1[MAX_PATH] = {0};
|
|
|
+ WCHAR tmp2[MAX_PATH] = { 0 };
|
|
|
+ char t2[MAX_PATH] = { 0 };
|
|
|
videocap_get_device_name(i, tmp, ARRAYSIZE(tmp));
|
|
|
WideCharToMultiByte(CP_ACP, 0, tmp, -1, t, sizeof(t), 0, NULL);
|
|
|
videocap_get_device_path(i, tmp1, ARRAYSIZE(tmp1));
|
|
@@ -2018,15 +2018,15 @@ namespace MediaController {
|
|
|
rc = audio_get_dev_count(&icnt, &ocnt);
|
|
|
if (rc == 0) {
|
|
|
int i;
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio input devices(%d):", icnt);
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("audio input devices(%d):", icnt);
|
|
|
for (i = 0; i < icnt; ++i) {
|
|
|
CSimpleStringA str = audio_get_dev_name(true, i);
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, str.GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("%d = %s", i, str.GetData());
|
|
|
}
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("audio output devices(%d):", ocnt);
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("audio output devices(%d):", ocnt);
|
|
|
for (i = 0; i < ocnt; ++i) {
|
|
|
CSimpleStringA str = audio_get_dev_name(false, i);
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", i, str.GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("%d = %s", i, str.GetData());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -2041,7 +2041,7 @@ namespace MediaController {
|
|
|
char strpath[MAX_PATH] = { 0 };
|
|
|
|
|
|
if (0 == rvc_videocap_get_device_fullpathname(i, strcamera, 2 * MAX_PATH)){
|
|
|
- //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", inumber, strcamera);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s", inumber, strcamera);
|
|
|
strCamInfoJson += CSimpleStringA::Format("\"%d\":\"%s\",", inumber, strcamera);
|
|
|
inumber++;
|
|
|
|
|
@@ -2060,7 +2060,7 @@ namespace MediaController {
|
|
|
#endif // RVC_OS_WIN
|
|
|
|
|
|
if (icamnum > 0) {
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_CAMERA_COUNT, CSimpleStringA::Format("camera number is %d.", icamnum).GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("camera number is %d.", icamnum);
|
|
|
if (strCamInfoJson.GetLength() > 0) {
|
|
|
strCamInfoJson[strCamInfoJson.GetLength() - 1] = '\0';
|
|
|
}
|
|
@@ -2361,7 +2361,7 @@ namespace MediaController {
|
|
|
if (0 != cap->env_video->ustarttime) {
|
|
|
int ienvtime = y2k_time_now() - cap->env_video->ustarttime;
|
|
|
//LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_ENVCAM_CLOSE, CSimpleStringA::Format("stop envcam, and camera open time is %us.", ienvtime).GetData());
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_ENVCAM_FRAME_INFO, CSimpleStringA::Format("env camera frame info is dest frame number is %d(%us), real frame number is %d, difference is %d.", ienvtime * cap->config.video_env_fps, ienvtime, cap->env_video->frame_id, ienvtime * cap->config.video_env_fps - cap->env_video->frame_id).GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("env camera frame info is dest frame number is %d(%us), real frame number is %d, difference is %d.", ienvtime * cap->config.video_env_fps, ienvtime, cap->env_video->frame_id, ienvtime * cap->config.video_env_fps - cap->env_video->frame_id);
|
|
|
}
|
|
|
|
|
|
video_capture_destroy(cap->env_video);
|
|
@@ -2374,7 +2374,7 @@ namespace MediaController {
|
|
|
if (0 != cap->opt_video->ustarttime) {
|
|
|
int iopttime = y2k_time_now() - cap->opt_video->ustarttime;
|
|
|
//LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_OPTCAM_CLOSE, CSimpleStringA::Format("stop optcam, and camera open time is %us.", iopttime).GetData());
|
|
|
- LogWarn(Severity_Low, Error_Debug, LOG_EVT_MEDIACONTROLLER_OPTCAM_FRAME_INFO, CSimpleStringA::Format("opt camera frame info is dest frame number is %d(%us), real frame number is %d, difference is %d.", iopttime * cap->config.video_opt_fps, iopttime, cap->opt_video->frame_id, iopttime * cap->config.video_opt_fps - cap->opt_video->frame_id).GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("opt camera frame info is dest frame number is %d(%us), real frame number is %d, difference is %d.", iopttime * cap->config.video_opt_fps, iopttime, cap->opt_video->frame_id, iopttime * cap->config.video_opt_fps - cap->opt_video->frame_id);
|
|
|
}
|
|
|
|
|
|
video_capture_destroy(cap->opt_video);
|