int legacy_player_sound_register(player_h player, int pid);
int legacy_player_get_timeout_for_muse(player_h player, int *timeout);
int legacy_player_get_num_of_video_out_buffers(player_h player, int *num, int *extra_num);
-
+int legacy_player_set_file_buffering_path(player_h player, const char *file_path);
#ifdef __cplusplus
}
{
PLAYER_INSTANCE_CHECK(player);
player_s *handle = (player_s *)player;
+
handle->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME] = NULL;
handle->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME] = NULL;
+
LOGI("Event type : %d ", MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME);
int ret = mm_player_set_video_stream_callback(handle->mm_handle, NULL, NULL);
return PLAYER_ERROR_NONE;
}
+
+int legacy_player_set_file_buffering_path(player_h player, const char *file_path)
+{
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(file_path);
+ player_s *handle = (player_s *)player;
+ PLAYER_STATE_CHECK(handle, PLAYER_STATE_IDLE);
+
+ int ret = mm_player_set_file_buffering_path(handle->mm_handle, file_path);
+
+ if (ret != MM_ERROR_NONE)
+ return __player_convert_error_code(ret, (char *)__FUNCTION__);
+ else
+ return PLAYER_ERROR_NONE;
+}
muse_player = (muse_player_handle_s *)muse_core_ipc_get_handle(module);
player_msg_get_string(uri, muse_core_client_get_msg(module));
-
ret = legacy_player_set_uri(muse_player->player_handle, uri);
player_msg_return(api, ret, module);
+ const char* file_buffering_path = muse_core_client_get_temporal_path();
+
+ LOGD("file buffering path : %s", file_buffering_path);
+ if (file_buffering_path)
+ legacy_player_set_file_buffering_path(muse_player->player_handle, file_buffering_path);
+
return ret;
}
#include "muse_player.h"
#include "muse_player_api.h" /* generated during build, ref ../make_api.py */
#include "muse_player_private.h"
+#include "muse_player_msg.h"
#include "legacy_player.h"
static int player_cmd_shutdown(muse_module_h module)
return PLAYER_ERROR_NONE;
}
+static int player_cmd_resouce_not_available(muse_module_h module)
+{
+ int ret = PLAYER_ERROR_RESOURCE_LIMIT;
+ muse_player_api_e api = MUSE_PLAYER_API_CREATE;
+ LOGD("return PLAYER_ERROR_RESOURCE_LIMIT");
+
+ player_msg_return(api, ret, module);
+
+ return PLAYER_ERROR_NONE;
+}
+
int (*cmd_dispatcher[MUSE_MODULE_COMMAND_MAX])(muse_module_h module) = {
NULL, /* MUSE_MODULE_COMMAND_INITIALIZE */
player_cmd_shutdown, /* MUSE_MODULE_COMMAND_SHUTDOWN */
NULL, /* MUSE_MODULE_COMMAND_DEBUG_INFO_DUMP */
+ NULL, /* MUSE_MODULE_COMMAND_CREATE_SERVER_ACK */
+ player_cmd_resouce_not_available, /* MUSE_MODULE_COMMAND_RESOURCE_NOT_AVAILABLE */
};
/**
Name: mmsvc-player
Summary: A Media Player module for muse server
-Version: 0.2.16
+Version: 0.2.17
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0