static void _recorder_apply_settings(audio_recorder_view *view)
{
+ int ret_val = RECORDER_ERROR_NONE;
if (view->recorder) {
recorder_attr_set_audio_channel(view->recorder, 2);
- recorder_attr_set_audio_device(view->recorder, RECORDER_AUDIO_DEVICE_MIC);
- recorder_attr_set_time_limit(view->recorder, MAX_TIME);
+
+ ret_val = recorder_attr_set_audio_device(view->recorder, RECORDER_AUDIO_DEVICE_MIC);
+ if (ret_val != RECORDER_ERROR_NONE) {
+ LOGD("recorder_attr_set_audio_device not successful error code: %d", ret_val);
+ }
+
+ ret_val = recorder_attr_set_time_limit(view->recorder, MAX_TIME);
+ if (ret_val != RECORDER_ERROR_NONE) {
+ LOGD("recorder_attr_set_time_limit not successful error code: %d", ret_val);
+ }
recorder_set_filename(view->recorder, view->file_path);
- recorder_set_file_format(view->recorder, view->file_format);
+
+ ret_val = recorder_set_file_format(view->recorder, view->file_format);
+ if (ret_val != RECORDER_ERROR_NONE) {
+ LOGD("recorder_set_file_format not successful error code: %d", ret_val);
+ }
LOGD("file_format: %d", view->file_format);
- recorder_set_audio_encoder(view->recorder, view->codec);
+
+ ret_val = recorder_set_audio_encoder(view->recorder, view->codec);
+ if (ret_val != RECORDER_ERROR_NONE) {
+ LOGD("recorder_set_audio_encoder not successful error code: %d", ret_val);
+ }
+
recorder_attr_set_audio_samplerate(view->recorder, view->sample_rate);
recorder_attr_set_audio_encoder_bitrate(view->recorder, view->bitrate);
char *domain = VR_STR_DOMAIN_LOCAL;
elm_object_domain_translatable_part_text_set(view->layout, "recorder_title", domain, STR_RECORDING);
-
}
}
static void _recorder_destroy(audio_recorder_view *view)
{
+ int ret_val = RECORDER_ERROR_NONE;
LOGD("Enter _recorder_destroy");
if (view->recorder) {
- recorder_cancel(view->recorder);
+ ret_val = recorder_cancel(view->recorder);
+ if (ret_val != RECORDER_ERROR_NONE) {
+ LOGD("recorder_cancel err = %d ", ret_val);
+ }
+
recorder_unprepare(view->recorder);
recorder_destroy(view->recorder);
view->recorder = NULL;