int player_set_subtitle_path(player_h player, const char *path)
{
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(path);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_PATH;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
+ char subtitle_path[MAX_URL_LEN] = {0, };
LOGD("ENTER");
- player_msg_send1(api, pc, ret_buf, ret, STRING, path);
+ if (storage_get_origin_internal_path(path, MAX_URL_LEN, subtitle_path) < 0) {
+ /* cannot convert path. use the original one. */
+ strncpy(subtitle_path, path, MAX_URL_LEN-1);
+ } else {
+ /* need to use converted path. */
+ LOGD("Converted path : %s -> %s", path, subtitle_path);
+ }
+
+ player_msg_send1(api, pc, ret_buf, ret, STRING, subtitle_path);
g_free(ret_buf);
return ret;
}
muse_player_api_e api = MUSE_PLAYER_API_SET_PROGRESSIVE_DOWNLOAD_PATH;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
+ char dw_path[MAX_URL_LEN] = {0, };
LOGD("ENTER");
- player_msg_send1(api, pc, ret_buf, ret, STRING, path);
+ if (storage_get_origin_internal_path(path, MAX_URL_LEN, dw_path) < 0) {
+ /* cannot convert path. use the original one. */
+ strncpy(dw_path, path, MAX_URL_LEN-1);
+ } else {
+ /* need to use converted path. */
+ LOGD("Converted path : %s -> %s", path, dw_path);
+ }
+
+ player_msg_send1(api, pc, ret_buf, ret, STRING, dw_path);
g_free(ret_buf);
return ret;
}