[UTC][capi-media-recorder][ACR-1145][Replace microphone and camera features by media...
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 11 Jan 2018 06:03:37 +0000 (15:03 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Wed, 17 Jan 2018 01:26:48 +0000 (01:26 +0000)
Change-Id: Ie3db17816f6345bb8da3e4b19dd19794f201b779
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
src/utc/recorder/utc_media_recorder.c
src/utc/recorder/utc_media_recorder_callback.c
src/utc/recorder/utc_media_recorder_lifecycle.c

index 5e072574375e05a868c34ad270ed5bc39d1d16bc..372e15f6711bd7b3d08ce72a0d51d5d3e5c0761b 100755 (executable)
 
 static char *media = ".test_record.amr";
 static char *media_path = NULL;
-static bool mic_supported = false;
+static bool audio_recording_supported = false;
 static recorder_h recorder = NULL;
 static int startup_ret = RECORDER_ERROR_NONE;
-static bool cam_supported = false;
+static bool video_recording_supported = false;
 static camera_h camera = NULL;
 static int startup_ret_camera = CAMERA_ERROR_NONE;
 
@@ -133,7 +133,7 @@ static void _sound_stream_focus_state_changed_cb(sound_stream_info_h stream_info
                         This is the precondition for checking apis. \n
                         Tiis precondition is create_audiorecorder api for checking device and privilege error.
  * @scenario            1. Check device storage supported. \n
-                        2. Get platform feature for microphone and camera. \n
+                        2. Get platform feature for audio recording and video recording. \n
                         3. Create audio recorder. \n
                         4. Create camera.
  * @parameter           N/A
@@ -143,8 +143,8 @@ void utc_media_recorder_startup(void)
 {
        storage_foreach_device_supported(_storage_device_cb, NULL);
 
-       system_info_get_platform_bool("http://tizen.org/feature/microphone", &mic_supported);
-       system_info_get_platform_bool("http://tizen.org/feature/camera", &cam_supported);
+       system_info_get_platform_bool("http://tizen.org/feature/media.audio_recording", &audio_recording_supported);
+       system_info_get_platform_bool("http://tizen.org/feature/media.video_recording", &video_recording_supported);
 
        startup_ret = recorder_create_audiorecorder(&recorder);
        startup_ret_camera = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
@@ -194,7 +194,7 @@ int utc_media_recorder_attr_get_audio_channel_p(void)
        int ret = RECORDER_ERROR_NONE;
        int channel = 0;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -221,7 +221,7 @@ int utc_media_recorder_attr_get_audio_channel_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -248,7 +248,7 @@ int utc_media_recorder_attr_get_audio_channel_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -277,7 +277,7 @@ int utc_media_recorder_attr_get_audio_device_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_device_e device = RECORDER_AUDIO_DEVICE_MIC;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -304,7 +304,7 @@ int utc_media_recorder_attr_get_audio_device_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -331,7 +331,7 @@ int utc_media_recorder_attr_get_audio_device_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -360,7 +360,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_p(void)
        int ret = RECORDER_ERROR_NONE;
        int bitrate = 0;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -387,7 +387,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -414,7 +414,7 @@ int utc_media_recorder_attr_get_audio_encoder_bitrate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -443,7 +443,7 @@ int utc_media_recorder_attr_get_audio_samplerate_p(void)
        int ret = RECORDER_ERROR_NONE;
        int samplerate = 0;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -470,7 +470,7 @@ int utc_media_recorder_attr_get_audio_samplerate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -497,7 +497,7 @@ int utc_media_recorder_attr_get_audio_samplerate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -527,12 +527,12 @@ int utc_media_recorder_attr_get_orientation_tag_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_rotation_e rotation_tag = RECORDER_ROTATION_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -560,12 +560,12 @@ int utc_media_recorder_attr_get_orientation_tag_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -593,12 +593,12 @@ int utc_media_recorder_attr_get_orientation_tag_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -628,12 +628,12 @@ int utc_media_recorder_attr_get_recording_motion_rate_p(void)
        int ret = RECORDER_ERROR_NONE;
        double rate = 0.0;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -661,12 +661,12 @@ int utc_media_recorder_attr_get_recording_motion_rate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -694,12 +694,12 @@ int utc_media_recorder_attr_get_recording_motion_rate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -728,7 +728,7 @@ int utc_media_recorder_attr_get_size_limit_p(void)
        int ret = RECORDER_ERROR_NONE;
        int size = 0;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -755,7 +755,7 @@ int utc_media_recorder_attr_get_size_limit_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -782,7 +782,7 @@ int utc_media_recorder_attr_get_size_limit_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -811,7 +811,7 @@ int utc_media_recorder_attr_get_time_limit_p(void)
        int ret = RECORDER_ERROR_NONE;
        int value = 0;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -838,7 +838,7 @@ int utc_media_recorder_attr_get_time_limit_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -865,7 +865,7 @@ int utc_media_recorder_attr_get_time_limit_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -895,12 +895,12 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_p(void)
        int ret = RECORDER_ERROR_NONE;
        int value = 0;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -928,12 +928,12 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -961,12 +961,12 @@ int utc_media_recorder_attr_get_video_encoder_bitrate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1005,7 +1005,7 @@ int utc_media_recorder_attr_is_muted_p(void)
        recorder_audio_codec_e audio_codec = RECORDER_AUDIO_CODEC_DISABLE;
        recorder_file_format_e file_format = -1;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1058,7 +1058,7 @@ int utc_media_recorder_attr_is_muted_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1085,7 +1085,7 @@ int utc_media_recorder_attr_set_audio_channel_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1112,7 +1112,7 @@ int utc_media_recorder_attr_set_audio_channel_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1139,7 +1139,7 @@ int utc_media_recorder_attr_set_audio_channel_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1167,7 +1167,7 @@ int utc_media_recorder_attr_set_audio_device_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_device_e device = RECORDER_AUDIO_DEVICE_MIC;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1195,7 +1195,7 @@ int utc_media_recorder_attr_set_audio_device_n(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_device_e device = 10;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1222,7 +1222,7 @@ int utc_media_recorder_attr_set_audio_encoder_bitrate_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1249,7 +1249,7 @@ int utc_media_recorder_attr_set_audio_encoder_bitrate_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1276,7 +1276,7 @@ int utc_media_recorder_attr_set_audio_samplerate_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1303,7 +1303,7 @@ int utc_media_recorder_attr_set_audio_samplerate_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1330,7 +1330,7 @@ int utc_media_recorder_attr_set_size_limit_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1357,7 +1357,7 @@ int utc_media_recorder_attr_set_size_limit_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1384,7 +1384,7 @@ int utc_media_recorder_attr_set_size_limit_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1412,7 +1412,7 @@ int utc_media_recorder_attr_set_time_limit_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1439,7 +1439,7 @@ int utc_media_recorder_attr_set_time_limit_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1466,7 +1466,7 @@ int utc_media_recorder_attr_set_time_limit_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1494,12 +1494,12 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1527,12 +1527,12 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1560,12 +1560,12 @@ int utc_media_recorder_attr_set_video_encoder_bitrate_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1592,7 +1592,7 @@ int utc_media_recorder_attr_set_mute_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1619,7 +1619,7 @@ int utc_media_recorder_attr_set_mute_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1648,12 +1648,12 @@ int utc_media_recorder_attr_set_orientation_tag_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_rotation_e rotation = RECORDER_ROTATION_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1682,12 +1682,12 @@ int utc_media_recorder_attr_set_orientation_tag_n1(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_rotation_e rotation = -1;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1716,12 +1716,12 @@ int utc_media_recorder_attr_set_orientation_tag_n2(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_rotation_e rotation = -1;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1750,12 +1750,12 @@ int utc_media_recorder_attr_set_recording_motion_rate_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1783,12 +1783,12 @@ int utc_media_recorder_attr_set_recording_motion_rate_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1816,7 +1816,7 @@ int utc_media_recorder_get_audio_encoder_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_codec_e value;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1843,7 +1843,7 @@ int utc_media_recorder_get_audio_encoder_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1870,7 +1870,7 @@ int utc_media_recorder_get_audio_encoder_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1908,7 +1908,7 @@ int utc_media_recorder_set_get_audio_encoder_p(void)
        recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_AMR;
        recorder_audio_codec_e ret_codec = RECORDER_AUDIO_CODEC_AMR;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1980,7 +1980,7 @@ int utc_media_recorder_get_file_format_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_file_format_e value = RECORDER_FILE_FORMAT_3GP;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2007,7 +2007,7 @@ int utc_media_recorder_get_file_format_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2036,12 +2036,12 @@ int utc_media_recorder_get_video_encoder_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_video_codec_e value = RECORDER_VIDEO_CODEC_MPEG4;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2069,12 +2069,12 @@ int utc_media_recorder_get_video_encoder_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2102,12 +2102,12 @@ int utc_media_recorder_get_video_encoder_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2144,12 +2144,12 @@ int utc_media_recorder_set_get_video_encoder_p(void)
        recorder_video_codec_e codec = RECORDER_VIDEO_CODEC_H263;
        recorder_video_codec_e ret_codec = RECORDER_VIDEO_CODEC_H263;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2221,7 +2221,7 @@ int utc_media_recorder_get_audio_level_p(void)
        recorder_audio_codec_e audio_codec = RECORDER_AUDIO_CODEC_DISABLE;
        recorder_file_format_e file_format = -1;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2269,7 +2269,7 @@ int utc_media_recorder_get_audio_level_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2299,12 +2299,12 @@ int utc_media_recorder_get_video_resolution_p(void)
        int mHeight = 0;
        int mWidth = 0;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2332,12 +2332,12 @@ int utc_media_recorder_get_video_resolution_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2365,12 +2365,12 @@ int utc_media_recorder_get_video_resolution_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2399,7 +2399,7 @@ int utc_media_recorder_set_audio_encoder_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_codec_e codec = RECORDER_AUDIO_CODEC_DISABLE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2435,7 +2435,7 @@ int utc_media_recorder_set_audio_encoder_n1(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_codec_e codec = -2;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2464,7 +2464,7 @@ int utc_media_recorder_set_audio_encoder_n2(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_audio_codec_e codec = -2;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2492,7 +2492,7 @@ int utc_media_recorder_set_audio_encoder_n3(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2523,7 +2523,7 @@ int utc_media_recorder_set_file_format_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_file_format_e format = RECORDER_FILE_FORMAT_3GP;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2551,7 +2551,7 @@ int utc_media_recorder_set_file_format_n(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_file_format_e format = -1;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2578,7 +2578,7 @@ int utc_media_recorder_set_filename_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2605,7 +2605,7 @@ int utc_media_recorder_set_filename_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2634,12 +2634,12 @@ int utc_media_recorder_set_video_encoder_p(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_video_codec_e codec = RECORDER_VIDEO_CODEC_MPEG4;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2668,12 +2668,12 @@ int utc_media_recorder_set_video_encoder_n1(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_video_codec_e codec = -1;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2702,12 +2702,12 @@ int utc_media_recorder_set_video_encoder_n2(void)
        int ret = RECORDER_ERROR_NONE;
        recorder_video_codec_e codec = -1;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2742,12 +2742,12 @@ int utc_media_recorder_set_video_resolution_p(void)
        int height = 0;
        recorder_h video_recorder = NULL;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2796,7 +2796,7 @@ int utc_media_recorder_set_get_file_format_p(void)
        recorder_file_format_e format = RECORDER_FILE_FORMAT_3GP;
        recorder_file_format_e ret_format = RECORDER_FILE_FORMAT_3GP;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2877,12 +2877,12 @@ int utc_media_recorder_set_video_resolution_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2910,12 +2910,12 @@ int utc_media_recorder_set_video_resolution_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2946,7 +2946,7 @@ int utc_media_recorder_get_filename_p(void)
        int ret = RECORDER_ERROR_NONE;
        char *f_name = NULL;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -2981,7 +2981,7 @@ int utc_media_recorder_get_filename_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -3012,7 +3012,7 @@ int utc_media_recorder_set_sound_stream_info_p(void)
        int ret2 = SOUND_MANAGER_ERROR_NONE;
        sound_stream_info_h stream_info = NULL;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -3049,7 +3049,7 @@ int utc_media_recorder_set_sound_stream_info_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
index ff76534f2441eff3cdc2a4ca6fb09636e8c6a731..0d9968cb51f00eb8b1fb59fff58f5690bd40f9a6 100755 (executable)
@@ -20,8 +20,8 @@
 
 static recorder_h recorder = NULL;
 static camera_h camera = NULL;
-static bool cam_supported = false;
-static bool mic_supported = false;
+static bool video_recording_supported = false;
+static bool audio_recording_supported = false;
 static int startup_ret = RECORDER_ERROR_NONE;
 static int startup_ret_camera = CAMERA_ERROR_NONE;
 
@@ -38,8 +38,8 @@ static int startup_ret_camera = CAMERA_ERROR_NONE;
 void utc_media_recorder_callback_startup(void)
 {
        /* start of TC */
-       system_info_get_platform_bool("http://tizen.org/feature/microphone", &mic_supported);
-       system_info_get_platform_bool("http://tizen.org/feature/camera", &cam_supported);
+       system_info_get_platform_bool("http://tizen.org/feature/media.audio_recording", &audio_recording_supported);
+       system_info_get_platform_bool("http://tizen.org/feature/media.video_recording", &video_recording_supported);
 
        startup_ret = recorder_create_audiorecorder(&recorder);
        startup_ret_camera = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
@@ -154,7 +154,7 @@ int utc_media_recorder_foreach_supported_audio_encoder_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -181,7 +181,7 @@ int utc_media_recorder_foreach_supported_audio_encoder_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -208,7 +208,7 @@ int utc_media_recorder_foreach_supported_file_format_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -235,7 +235,7 @@ int utc_media_recorder_foreach_supported_file_format_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -263,12 +263,12 @@ int utc_media_recorder_foreach_supported_video_encoder_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -296,12 +296,12 @@ int utc_media_recorder_foreach_supported_video_encoder_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -329,12 +329,12 @@ int utc_media_recorder_foreach_supported_video_resolution_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -362,12 +362,12 @@ int utc_media_recorder_foreach_supported_video_resolution_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(startup_ret_camera, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        }
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -394,7 +394,7 @@ int utc_media_recorder_set_recording_limit_reached_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -421,7 +421,7 @@ int utc_media_recorder_set_recording_limit_reached_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -449,7 +449,7 @@ int utc_media_recorder_set_recording_status_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -476,7 +476,7 @@ int utc_media_recorder_set_recording_status_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -503,7 +503,7 @@ int utc_media_recorder_set_state_changed_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -530,7 +530,7 @@ int utc_media_recorder_set_state_changed_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -557,7 +557,7 @@ int utc_media_recorder_set_interrupted_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -584,7 +584,7 @@ int utc_media_recorder_set_interrupted_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -611,7 +611,7 @@ int utc_media_recorder_set_audio_stream_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -638,7 +638,7 @@ int utc_media_recorder_set_audio_stream_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -665,7 +665,7 @@ int utc_media_recorder_set_error_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -692,7 +692,7 @@ int utc_media_recorder_set_error_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -719,7 +719,7 @@ int utc_media_recorder_unset_recording_limit_reached_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -746,7 +746,7 @@ int utc_media_recorder_unset_recording_limit_reached_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -773,7 +773,7 @@ int utc_media_recorder_unset_recording_status_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -800,7 +800,7 @@ int utc_media_recorder_unset_recording_status_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -827,7 +827,7 @@ int utc_media_recorder_unset_state_changed_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -854,7 +854,7 @@ int utc_media_recorder_unset_state_changed_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -881,7 +881,7 @@ int utc_media_recorder_unset_interrupted_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -908,7 +908,7 @@ int utc_media_recorder_unset_interrupted_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -935,7 +935,7 @@ int utc_media_recorder_unset_audio_stream_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -962,7 +962,7 @@ int utc_media_recorder_unset_audio_stream_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -989,7 +989,7 @@ int utc_media_recorder_unset_error_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1016,7 +1016,7 @@ int utc_media_recorder_unset_error_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1050,7 +1050,7 @@ int utc_media_recorder_add_device_state_changed_cb_p(void)
 
        ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
 
-       if (mic_supported)
+       if (audio_recording_supported)
                check_ret = RECORDER_ERROR_NONE;
        else
                check_ret = RECORDER_ERROR_NOT_SUPPORTED;
@@ -1132,7 +1132,7 @@ int utc_media_recorder_remove_device_state_changed_cb_p(void)
 
        ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                assert_eq(ret, RECORDER_ERROR_NONE);
                assert_neq(cb_id, 0);
 
@@ -1168,7 +1168,7 @@ int utc_media_recorder_remove_device_state_changed_cb_n1(void)
 
        ret = recorder_remove_device_state_changed_cb(0);
 
-       if (mic_supported)
+       if (audio_recording_supported)
                check_ret = RECORDER_ERROR_INVALID_OPERATION;
        else
                check_ret = RECORDER_ERROR_NOT_SUPPORTED;
@@ -1200,7 +1200,7 @@ int utc_media_recorder_remove_device_state_changed_cb_n2(void)
 
        ret = recorder_add_device_state_changed_cb(_device_state_changed_cb, NULL, &cb_id);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                assert_eq(ret, RECORDER_ERROR_NONE);
                assert_neq(cb_id, 0);
 
@@ -1233,7 +1233,7 @@ int utc_media_recorder_set_muxed_stream_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1260,7 +1260,7 @@ int utc_media_recorder_set_muxed_stream_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1288,7 +1288,7 @@ int utc_media_recorder_unset_muxed_stream_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1316,7 +1316,7 @@ int utc_media_recorder_unset_muxed_stream_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1343,7 +1343,7 @@ int utc_media_recorder_set_interrupt_started_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1370,7 +1370,7 @@ int utc_media_recorder_set_interrupt_started_cb_n1(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1397,7 +1397,7 @@ int utc_media_recorder_set_interrupt_started_cb_n2(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1424,7 +1424,7 @@ int utc_media_recorder_unset_interrupt_started_cb_p(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
@@ -1451,7 +1451,7 @@ int utc_media_recorder_unset_interrupt_started_cb_n(void)
 {
        int ret = RECORDER_ERROR_NONE;
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(startup_ret, RECORDER_ERROR_NOT_SUPPORTED);
                return 0;
        }
index 58f8ee181677b4002632120e251d65e41bc8bd66..3cba496d11d6072b0553bf723b8ea467f6885cf8 100755 (executable)
@@ -23,8 +23,8 @@
 
 static char *media = ".test_record.amr";
 static char *media_path = NULL;
-static bool cam_supported = false;
-static bool mic_supported = false;
+static bool video_recording_supported = false;
+static bool audio_recording_supported = false;
 
 #define UTC_AUDIO_CODEC_NUM 5
 #define UTC_FILE_FORMAT_NUM 7
@@ -130,8 +130,8 @@ void utc_media_recorder_lifecycle_startup(void)
 {
        storage_foreach_device_supported(_storage_device_cb, NULL);
 
-       system_info_get_platform_bool("http://tizen.org/feature/microphone", &mic_supported);
-       system_info_get_platform_bool("http://tizen.org/feature/camera", &cam_supported);
+       system_info_get_platform_bool("http://tizen.org/feature/media.audio_recording", &audio_recording_supported);
+       system_info_get_platform_bool("http://tizen.org/feature/media.video_recording", &video_recording_supported);
 
        return;
 }
@@ -177,7 +177,7 @@ int utc_media_recorder_create_audiorecorder_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (!mic_supported) {
+       if (!audio_recording_supported) {
                assert_eq(ret, RECORDER_ERROR_NOT_SUPPORTED);
        } else {
                recorder_destroy(recorder);
@@ -217,7 +217,7 @@ int utc_media_recorder_cancel_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -277,7 +277,7 @@ int utc_media_recorder_cancel_n(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -336,7 +336,7 @@ int utc_media_recorder_commit_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -396,7 +396,7 @@ int utc_media_recorder_commit_n(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -447,7 +447,7 @@ int utc_media_recorder_create_videorecorder_p(void)
        int ret2 = RECORDER_ERROR_NONE;
 
        ret = camera_create(CAMERA_DEVICE_CAMERA0, &camera);
-       if (!cam_supported) {
+       if (!video_recording_supported) {
                assert_eq(ret, CAMERA_ERROR_NOT_SUPPORTED);
                return 0;
        } else {
@@ -509,7 +509,7 @@ int utc_media_recorder_destroy_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                assert_eq(ret, RECORDER_ERROR_NONE);
 
                ret = recorder_destroy(recorder);
@@ -574,7 +574,7 @@ int utc_media_recorder_pause_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -635,7 +635,7 @@ int utc_media_recorder_pause_n(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -690,7 +690,7 @@ int utc_media_recorder_prepare_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -739,7 +739,7 @@ int utc_media_recorder_prepare_n1(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                assert_eq(ret, RECORDER_ERROR_NONE);
 
                ret = recorder_prepare(recorder);
@@ -806,7 +806,7 @@ int utc_media_recorder_start_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -857,7 +857,7 @@ int utc_media_recorder_start_n(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                assert_eq(ret, RECORDER_ERROR_NONE);
 
                ret = recorder_start(recorder);
@@ -899,7 +899,7 @@ int utc_media_recorder_unprepare_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = _get_supported_audio_encoder_and_file_format(recorder, &audio_codec, &file_format);
                assert_eq(ret, RECORDER_ERROR_NONE);
 
@@ -947,7 +947,7 @@ int utc_media_recorder_unprepare_n1(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                assert_eq(ret, RECORDER_ERROR_NONE);
 
                ret = recorder_unprepare(recorder);
@@ -1006,7 +1006,7 @@ int utc_media_recorder_get_state_p(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                assert_eq(ret, RECORDER_ERROR_NONE);
 
                ret = recorder_get_state(recorder, &state);
@@ -1064,7 +1064,7 @@ int utc_media_recorder_get_state_n2(void)
 
        ret = recorder_create_audiorecorder(&recorder);
 
-       if (mic_supported) {
+       if (audio_recording_supported) {
                ret = recorder_get_state(recorder, NULL);
 
                recorder_destroy(recorder);
@@ -1099,7 +1099,7 @@ int utc_media_recorder_get_device_state_p(void)
 
        ret = recorder_get_device_state(RECORDER_TYPE_AUDIO, &device_state);
 
-       if (mic_supported)
+       if (audio_recording_supported)
                check_ret = RECORDER_ERROR_NONE;
        else
                check_ret = RECORDER_ERROR_NOT_SUPPORTED;