INCLUDE_DIRECTORIES(${INC_DIR}, ${INC_COM_DIR})
IF (TIZEN_FEATURE_EVAS_RENDERER)
-SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-media-sound-manager capi-base-common mused mm-common tizen-extension-client evas ecore elementary mm-evas-renderer libtzplatform-config")
+SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-media-sound-manager capi-base-common mused mm-common tizen-extension-client evas ecore elementary mm-evas-renderer storage")
ELSE (TIZEN_FEATURE_EVAS_RENDERER)
-SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-media-sound-manager capi-base-common mused mm-common tizen-extension-client evas ecore elementary libtzplatform-config")
+SET(dependents "dlog glib-2.0 libtbm capi-media-tool capi-media-sound-manager capi-base-common mused mm-common tizen-extension-client evas ecore elementary storage")
ENDIF (TIZEN_FEATURE_EVAS_RENDERER)
SET(pc_dependents "libtbm capi-media-tool capi-base-common capi-media-sound-manager ecore-wayland")
int client_get_api_timeout(player_cli_s * pc, muse_player_api_e api);
int client_wait_for_cb_return(muse_player_api_e api, callback_cb_info_s * cb_info, char **ret_buf, int time_out);
-void _player_replace_old_path(const char *in_path, char *out_path);
#ifdef __cplusplus
}
Name: capi-media-player
Summary: A Media Player API
-Version: 0.3.25
+Version: 0.3.26
Release: 0
Group: Multimedia/API
License: Apache-2.0
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(libtbm)
BuildRequires: pkgconfig(eom)
-BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(storage)
%if "%{?profile}" != "tv" && "%{?profile}" != "wearable"
BuildRequires: pkgconfig(mm-evas-renderer)
%endif
#include <muse_player_msg.h>
#include <sound_manager.h>
#include <sound_manager_internal.h>
-#include <tzplatform_config.h>
+#include <storage-internal.h>
#include "player_internal.h"
#include "player_private.h"
#include "player_display.h"
return ret;
}
-/* for backward compatability, to make the old path accessable */
-void _player_replace_old_path(const char *in_path, char *out_path)
-{
- const char *old_path = "/opt/usr/media";
-
- LOGD("input file_path : %s", in_path);
-
- if (strncmp(in_path, old_path, strlen(old_path)) == 0)
- snprintf(out_path, MAX_URL_LEN, "%s%s", tzplatform_getenv(TZ_USER_CONTENT), in_path+strlen(old_path));
- else
- snprintf(out_path, MAX_URL_LEN, "%s", in_path);
-
- LOGD("replaced path : %s", out_path);
- return;
-}
-
int player_set_uri(player_h player, const char *uri)
{
PLAYER_INSTANCE_CHECK(player);
muse_player_api_e api = MUSE_PLAYER_API_SET_URI;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
- char path[MAX_URL_LEN];
+ char path[MAX_URL_LEN] = {0, };
LOGD("ENTER");
- _player_replace_old_path(uri, path);
+ if (storage_get_origin_internal_path(uri, MAX_URL_LEN, path) < 0) {
+ /* cannot convert path. use the original one. */
+ strncpy(path, uri, MAX_URL_LEN-1);
+ } else {
+ /* need to use converted path. */
+ LOGD("Converted path : %s -> %s", uri, path);
+ }
player_msg_send1(api, pc, ret_buf, ret, STRING, path);
pc->push_media_stream = FALSE;
#include <Ecore_Wayland.h>
#include <muse_player.h>
#include <muse_player_msg.h>
+#include <storage-internal.h>
#include "player_private.h"
#include "player_msg.h"
#include "player_internal.h"
muse_player_api_e api = MUSE_PLAYER_API_SET_NEXT_URI;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
- char path[MAX_URL_LEN];
+ char path[MAX_URL_LEN] = {0, };
LOGD("ENTER");
- _player_replace_old_path(uri, path);
+ if (storage_get_origin_internal_path(uri, MAX_URL_LEN, path) < 0) {
+ /* cannot convert path. use the original one. */
+ strncpy(path, uri, MAX_URL_LEN-1);
+ } else {
+ /* need to use converted path. */
+ LOGD("Converted path : %s -> %s", uri, path);
+ }
+
player_msg_send1(api, pc, ret_buf, ret, STRING, path);
g_free(ret_buf);
player_msg_send(api, pc, ret_buf, ret);
if (ret == PLAYER_ERROR_NONE) {
player_msg_get_string(next_uri, ret_buf);
- *uri = strndup(next_uri, MUSE_MSG_MAX_LENGTH);
+
+ char dest[MUSE_MSG_MAX_LENGTH] = {0,};
+ if(storage_get_compat_internal_path(next_uri, sizeof(dest), dest) < 0) {
+ /* cannot convert path. use the original one. */
+ *uri = strndup(next_uri, MUSE_MSG_MAX_LENGTH);
+ } else {
+ /* need to use converted path. */
+ LOGD("Converted path : %s -> %s", next_uri, dest);
+ *uri = strndup(dest, MUSE_MSG_MAX_LENGTH);
+ }
}
g_free(ret_buf);
return ret;