[UTC][player][Non-ACR][fix the invalid media path] 23/232023/2
authorEunhye Choi <eunhae1.choi@samsung.com>
Mon, 27 Apr 2020 11:29:34 +0000 (20:29 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Mon, 27 Apr 2020 11:32:50 +0000 (20:32 +0900)
- audio pitch API is supported for audio only content.

Change-Id: Id852c649bbc846fe65af1ef1a3fc6f3d28fc5f00

src/utc/player/utc-media-player.c

index 764f67642f196eef30e85d4431adc6ec6bf6a504..eaa2fde7606c93ba319bd490a20d77b6ddf79b97 100644 (file)
@@ -2437,26 +2437,31 @@ int utc_media_player_audio_pitch_set_value_p(void)
        int ret = PLAYER_ERROR_NONE;
        player_state_e state = PLAYER_STATE_NONE;
 
-    ret = player_get_state(player, &state);
+       ret = player_get_state(player, &state);
        assert_eq(ret, PLAYER_ERROR_NONE);
 
-    if (state != PLAYER_STATE_IDLE){
-        player_unprepare(player);
-    }
+       if (state != PLAYER_STATE_IDLE){
+               player_unprepare(player);
+       }
+
+       ret = player_set_uri(player, audio_path);
+       if (PLAYER_ERROR_NONE != ret) {
+               PRINT_UTC_LOG("[Line : %d][%s] player_set_uri is failed\\n", __LINE__, API_NAMESPACE);
+       }
 
        ret = player_audio_pitch_set_enabled(player, true);
        assert_eq(ret, PLAYER_ERROR_NONE);
 
-    ret = player_audio_pitch_set_value(player, 0.9);
-    assert_eq(ret, PLAYER_ERROR_NONE);
+       ret = player_audio_pitch_set_value(player, 0.9);
+       assert_eq(ret, PLAYER_ERROR_NONE);
 
-    ret = player_prepare(player);
+       ret = player_prepare(player);
        assert_eq(ret, PLAYER_ERROR_NONE);
 
-    ret = player_audio_pitch_set_value(player, 1.5);
-    assert_eq(ret, PLAYER_ERROR_NONE);
+       ret = player_audio_pitch_set_value(player, 1.5);
+       assert_eq(ret, PLAYER_ERROR_NONE);
 
-    return 0;
+       return 0;
 }
 
 /**