attribute_name, set_value,
NULL);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
LOGE("set [%s] failed 0x%x", attribute_name, ret);
- }
-
-
return __convert_streamrecorder_error_code(attribute_name, ret);
}
ret = mm_streamrecorder_get_state(handle->mm_handle, &srstate);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
+
*state = __streamrecorder_state_convert((void *)srstate);
return STREAMRECORDER_ERROR_NONE;
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
}
ret = streamrecorder_get_state(recorder, &state);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
if (state != STREAMRECORDER_STATE_CREATED) {
LOGE("STREAMRECORDER_ERROR_INVALID_STATE (state:%d)", state);
}
ret = streamrecorder_get_state(recorder, &state);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
if (state != STREAMRECORDER_STATE_PREPARED) {
LOGE("STREAMRECORDER_ERROR_INVALID_STATE (state:%d)", state);
}
ret = mm_streamrecorder_unrealize(handle->mm_handle);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
LOGE("stramrecorder_unrealize fail");
- }
+
return __convert_streamrecorder_error_code(__func__, ret);
}
}
ret = streamrecorder_get_state(recorder, &state);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
if (!(state == STREAMRECORDER_STATE_PREPARED || state == STREAMRECORDER_STATE_PAUSED)) {
LOGE("STREAMRECORDER_ERROR_INVALID_STATE (state:%d)", state);
}
ret = streamrecorder_get_state(recorder, &state);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
if (state != STREAMRECORDER_STATE_RECORDING) {
LOGE("STREAMRECORDER_ERROR_INVALID_STATE (state:%d)", state);
}
ret = streamrecorder_get_state(recorder, &state);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
if (!(state == STREAMRECORDER_STATE_RECORDING || state == STREAMRECORDER_STATE_PAUSED)) {
LOGE("STREAMRECORDER_ERROR_INVALID_STATE (state:%d)", state);
}
ret = streamrecorder_get_state(recorder, &state);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
if (!(state == STREAMRECORDER_STATE_RECORDING || state == STREAMRECORDER_STATE_PAUSED)) {
LOGE("STREAMRECORDER_ERROR_INVALID_STATE (state:%d)", state);
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
}
- if (framerate == NULL) {
+ if (framerate == NULL)
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
- }
ret = mm_streamrecorder_get_attributes(handle->mm_handle, NULL,
MMSTR_VIDEO_FRAMERATE, framerate,
int ret = MM_ERROR_NONE;
streamrecorder_s *handle = (streamrecorder_s *)recorder;
- if (format == NULL) {
+ if (format == NULL)
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
- }
ret = mm_streamrecorder_get_attributes(handle->mm_handle, NULL,
MMSTR_VIDEO_SOURCE_FORMAT, format,
return STREAMRECORDER_ERROR_INVALID_STATE;
}
- if (width == 0 || height == 0) {
+ if (width == 0 || height == 0)
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
- }
ret = mm_streamrecorder_set_attributes(handle->mm_handle, NULL,
MMSTR_VIDEO_RESOLUTION_WIDTH, width,
ret = mm_streamrecorder_get_attribute_info(handle->mm_handle, MMSTR_VIDEO_RESOLUTION_WIDTH, &video_width);
ret |= mm_streamrecorder_get_attribute_info(handle->mm_handle, MMSTR_VIDEO_RESOLUTION_HEIGHT, &video_height);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
+
for (i = 0 ; i < video_width.int_array.count ; i++) {
- if (!foreach_cb(video_width.int_array.array[i], video_height.int_array.array[i], user_data)) {
+ if (!foreach_cb(video_width.int_array.array[i], video_height.int_array.array[i], user_data))
break;
- }
}
return STREAMRECORDER_ERROR_NONE;
break;
}
- if (format != -1 && !foreach_cb(format, user_data)) {
+ if (format != -1 && !foreach_cb(format, user_data))
break;
- }
}
return STREAMRECORDER_ERROR_NONE;
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
}
- if (kbyte < 0) {
+ if (kbyte < 0)
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
- }
ret = mm_streamrecorder_set_attributes(handle->mm_handle, NULL,
MMSTR_TARGET_MAX_SIZE, kbyte,
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
}
- if (second < 0) {
+ if (second < 0)
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
- }
ret = mm_streamrecorder_set_attributes(handle->mm_handle, NULL,
MMSTR_TARGET_TIME_LIMIT, second,
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
}
- if (bitrate == NULL) {
+ if (bitrate == NULL)
return STREAMRECORDER_ERROR_INVALID_PARAMETER;
- }
+
ret = mm_streamrecorder_get_attributes(handle->mm_handle, NULL,
MMSTR_VIDEO_BITRATE, bitrate,
NULL);
MMStreamRecorderAttrsInfo info;
ret = mm_streamrecorder_get_attribute_info(handle->mm_handle, MMSTR_AUDIO_ENCODER, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
switch (info.int_array.array[i]) {
codec = -1;
break;
}
- if (codec != -1 && !foreach_cb(codec, user_data)) {
+ if (codec != -1 && !foreach_cb(codec, user_data))
break;
- }
}
return STREAMRECORDER_ERROR_NONE;
MMStreamRecorderAttrsInfo info;
ret = mm_streamrecorder_get_attribute_info(handle->mm_handle, MMSTR_VIDEO_ENCODER, &info);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
return __convert_streamrecorder_error_code(__func__, ret);
- }
for (i = 0 ; i < info.int_array.count ; i++) {
switch (info.int_array.array[i]) {
break;
}
- if (codec != -1 && !foreach_cb(codec, user_data)) {
+ if (codec != -1 && !foreach_cb(codec, user_data))
break;
- }
}
return STREAMRECORDER_ERROR_NONE;