|
@@ -898,7 +898,7 @@ static void video_capture_destroy(video_capture_t *video_cap)
|
|
|
}
|
|
|
|
|
|
|
|
|
-static int get_video_capture_fps()
|
|
|
+static int get_video_capture_fps(int icapfps)
|
|
|
{
|
|
|
int ifps = REC_COMMON_VIDEO_PADRAW_FPS;
|
|
|
if ((ePadtype == g_eDeviceType) || (eMobilePadType == g_eDeviceType) || (eDesk2SType == g_eDeviceType)
|
|
@@ -909,6 +909,10 @@ static int get_video_capture_fps()
|
|
|
ifps = REC_COMMON_VIDEO_RAW_FPS;
|
|
|
}
|
|
|
|
|
|
+ if (icapfps <=30 && icapfps >=5){
|
|
|
+ ifps = icapfps;
|
|
|
+ }
|
|
|
+
|
|
|
return ifps;
|
|
|
}
|
|
|
|
|
@@ -1019,7 +1023,7 @@ static int video_capture_start_linux(video_capture_t* video_cap)
|
|
|
t_param.cap_mode = cap_mode;
|
|
|
t_param.dev_id = dev_id;
|
|
|
t_param.frame_fmt = VIDEO_FORMAT_RGB24;
|
|
|
- t_param.fps = get_video_capture_fps();
|
|
|
+ t_param.fps = get_video_capture_fps(video_cap->camera_type == CAMERA_TYPE_ENV ? conf->video_env_fps : conf->video_opt_fps);
|
|
|
|
|
|
t_param.on_frame = (video_cap->camera_type == CAMERA_TYPE_ENV ? &env_cap_on_frame : &opt_cap_on_frame);
|
|
|
t_param.on_frame_i420 = (video_cap->camera_type == CAMERA_TYPE_ENV ? &env_cap_on_frame_i420 : &opt_cap_on_frame_i420);
|