Coverity issue fix 31/178831/1 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20181106.201901 accepted/tizen/unified/20180515.063803 submit/tizen/20180514.131428 submit/tizen_5.0/20181101.000008 submit/tizen_5.0/20181106.000001 submit/tizen_5.0/20181106.070715
authorKartik Tidke <kr.tidke@samsung.com>
Mon, 14 May 2018 07:29:19 +0000 (12:59 +0530)
committerKartik Tidke <kr.tidke@samsung.com>
Mon, 14 May 2018 07:29:19 +0000 (12:59 +0530)
Change-Id: I2ebcab4664c16d440213a0a3e938799fb45c3b88
Signed-off-by: Kartik Tidke <kr.tidke@samsung.com>
src/view/audio-recorder-view.c

index c51ac06..8d88d2d 100644 (file)
@@ -155,15 +155,33 @@ static void _recorder_create(audio_recorder_view *view)
 
 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);
 
@@ -171,15 +189,19 @@ static void _recorder_apply_settings(audio_recorder_view *view)
 
                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;