return RECORDER_ERROR_INVALID_PARAMETER;
}
+ if (kbyte < 0) {
+ LOGE("invalid kbyte %d", kbyte);
+ return RECORDER_ERROR_INVALID_PARAMETER;
+ }
+
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
MMCAM_TARGET_MAX_SIZE, kbyte,
NULL);
return RECORDER_ERROR_INVALID_PARAMETER;
}
+ if (second < 0) {
+ LOGE("invalid second %d", second);
+ return RECORDER_ERROR_INVALID_PARAMETER;
+ }
+
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
MMCAM_TARGET_TIME_LIMIT, second,
NULL);
LOGE("RECORDER_ERROR_NOT_SUPPORTED");
return RECORDER_ERROR_NOT_SUPPORTED;
}
+ if (bitrate <= 0) {
+ LOGE("invalid bitrate %d", bitrate);
+ return RECORDER_ERROR_INVALID_PARAMETER;
+ }
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
MMCAM_VIDEO_ENCODER_BITRATE, bitrate,
LOGE("RECORDER_ERROR_NOT_SUPPORTED");
return RECORDER_ERROR_NOT_SUPPORTED;
}
+ if (rate <= 0.0) {
+ LOGE("invalid rate %lf", rate);
+ return RECORDER_ERROR_INVALID_PARAMETER;
+ }
+
ret = mm_camcorder_set_attributes(handle->mm_handle, NULL,
MMCAM_CAMERA_RECORDING_MOTION_RATE, rate,
NULL);
int legacy_recorder_attr_set_audio_channel(recorder_h recorder, int channel_count)
{
- if (channel_count < 1) {
+ if (channel_count < 1 || channel_count > 2) {
LOGE("invalid channel %d", channel_count);
return RECORDER_ERROR_INVALID_PARAMETER;
}