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")
+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")
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")
+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")
ENDIF (TIZEN_FEATURE_EVAS_RENDERER)
SET(pc_dependents "libtbm capi-media-tool capi-base-common capi-media-sound-manager ecore-wayland")
#define CREATE_CB_TIME_OUT 400 /* ms */
#define CALLBACK_TIME_OUT 5000 /* ms */
#define MAX_SERVER_TIME_OUT 35000 /* ms */
-
+#define MAX_URL_LEN 2048 /**< Maximum length of the maximum URL */
typedef struct _ret_msg_s {
gint api;
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
}
#include <muse_player_msg.h>
#include <sound_manager.h>
#include <sound_manager_internal.h>
+#include <tzplatform_config.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];
LOGD("ENTER");
- player_msg_send1(api, pc, ret_buf, ret, STRING, uri);
+ _player_replace_old_path(uri, path);
+
+ player_msg_send1(api, pc, ret_buf, ret, STRING, path);
pc->push_media_stream = FALSE;
g_free(ret_buf);
return PLAYER_ERROR_NONE;
}
#endif
+
player_msg_send1(api, pc, ret_buf, ret, INT, visible);
g_free(ret_buf);
return ret;
if (tfd > INVALID_DEFAULT_VALUE)
close(tfd);
- pc->cb_info->tfd = INVALID_DEFAULT_VALUE;
+
+ if (CALLBACK_INFO(pc))
+ pc->cb_info->tfd = INVALID_DEFAULT_VALUE;
if (bo)
tbm_bo_unref(bo);
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];
LOGD("ENTER");
- player_msg_send1(api, pc, ret_buf, ret, STRING, uri);
+ _player_replace_old_path(uri, path);
+ player_msg_send1(api, pc, ret_buf, ret, STRING, path);
g_free(ret_buf);
return ret;