|
@@ -32,6 +32,7 @@ using namespace MediaController;
|
|
|
#define RVC_AUDIO_BUFFER_LEN 320
|
|
|
#endif
|
|
|
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
static void __dbg(const char *fmt, va_list arg)
|
|
|
{
|
|
|
int n = vsnprintf(NULL, 0, fmt, arg);
|
|
@@ -47,6 +48,7 @@ static void __dbg(const char *fmt, va_list arg)
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s", strlog);
|
|
|
}
|
|
|
}
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
static void __logevent(int ilogtype, int idevid, const char* strmessage)
|
|
@@ -841,8 +843,8 @@ static void env_cap_on_frame(void *user_data, video_frame *frame)
|
|
|
if (video_cap->bsavephoto) {
|
|
|
if ((video_cap->isaveinterval > 0) && (0 == video_cap->frame_id % (video_cap->isaveinterval * cap->config.video_env_fps)))
|
|
|
{
|
|
|
- char strFileName[2 * MAX_PATH] = { 0 };
|
|
|
- snprintf(strFileName, 2 * MAX_PATH, "%s%s_%d.bmp", video_cap->strsavedir, video_cap->strphotoname, isnapshot_count++);
|
|
|
+ char strFileName[3 * MAX_PATH] = { 0 };
|
|
|
+ snprintf(strFileName, 3 * MAX_PATH, "%s%s_%d%s", video_cap->strsavedir, video_cap->strphotoname, isnapshot_count++, ".bmp");
|
|
|
video_frame_save_bmpfile(strFileName, frame);
|
|
|
}
|
|
|
}
|
|
@@ -1195,6 +1197,8 @@ static void video_capture_destroy(video_capture_t *video_cap)
|
|
|
}
|
|
|
|
|
|
|
|
|
+#ifdef RVC_OS_WIN
|
|
|
+#else
|
|
|
static int get_video_capture_fps(int icapfps)
|
|
|
{
|
|
|
int ifps = REC_COMMON_VIDEO_RAW_FPS;
|
|
@@ -1205,6 +1209,8 @@ static int get_video_capture_fps(int icapfps)
|
|
|
|
|
|
return ifps;
|
|
|
}
|
|
|
+#endif
|
|
|
+
|
|
|
|
|
|
#ifdef RVC_OS_WIN
|
|
|
static int video_capture_start_win(video_capture_t* video_cap)
|
|
@@ -1579,9 +1585,9 @@ namespace MediaController {
|
|
|
if (rc != Error_Succeed)
|
|
|
{
|
|
|
cap->opt_video->ustarttime = 0;
|
|
|
- char strMessage[MAX_PATH*2] = {0};
|
|
|
- get_camera_exception_message(strMessage, MAX_PATH*2, cap->config.strVideoOpt, "open operate camera fail, please check device.");
|
|
|
- LogWarn(Severity_Middle,Error_NotInit,ERROR_MOD_MEDIACONTROLLER_OPTCAM_OPEN, strMessage);
|
|
|
+ char stroptMessage[MAX_PATH*2] = {0};
|
|
|
+ get_camera_exception_message(stroptMessage, MAX_PATH*2, cap->config.strVideoOpt, "open operate camera fail, please check device.");
|
|
|
+ LogWarn(Severity_Middle,Error_NotInit,ERROR_MOD_MEDIACONTROLLER_OPTCAM_OPEN, stroptMessage);
|
|
|
return Error_AllCamera;
|
|
|
}
|
|
|
else
|
|
@@ -1611,9 +1617,9 @@ namespace MediaController {
|
|
|
if (rc != Error_Succeed)
|
|
|
{
|
|
|
cap->opt_video->ustarttime = 0;
|
|
|
- char strMessage[MAX_PATH*2] = {0};
|
|
|
- get_camera_exception_message(strMessage, MAX_PATH*2, cap->config.strVideoOpt, "open operate camera fail, please check device.");
|
|
|
- LogWarn(Severity_Middle,Error_NotInit,ERROR_MOD_MEDIACONTROLLER_OPTCAM_OPEN,strMessage);
|
|
|
+ char strMsg[MAX_PATH*2] = {0};
|
|
|
+ get_camera_exception_message(strMsg, MAX_PATH*2, cap->config.strVideoOpt, "open operate camera fail, please check device.");
|
|
|
+ LogWarn(Severity_Middle,Error_NotInit,ERROR_MOD_MEDIACONTROLLER_OPTCAM_OPEN, strMsg);
|
|
|
return Error_OptCamera;
|
|
|
}
|
|
|
else
|
|
@@ -1641,9 +1647,9 @@ namespace MediaController {
|
|
|
if (rc != Error_Succeed)
|
|
|
{
|
|
|
cap->opt_video->ustarttime = 0;
|
|
|
- char strMessage[MAX_PATH*2] = {0};
|
|
|
- get_camera_exception_message(strMessage, MAX_PATH*2, cap->config.strVideoOpt, "open operate camera fail,please check device.");
|
|
|
- LogWarn(Severity_Middle,Error_NotInit,ERROR_MOD_MEDIACONTROLLER_OPTCAM_OPEN,strMessage);
|
|
|
+ char stroptMsg[MAX_PATH*2] = {0};
|
|
|
+ get_camera_exception_message(stroptMsg, MAX_PATH*2, cap->config.strVideoOpt, "open operate camera fail, please check device.");
|
|
|
+ LogWarn(Severity_Middle,Error_NotInit,ERROR_MOD_MEDIACONTROLLER_OPTCAM_OPEN, stroptMsg);
|
|
|
return Error_AllCamera;
|
|
|
}
|
|
|
else
|