#ifdef HAVE_WAYLAND
#include "Ecore_Wayland.h"
#endif
-#include "mmsvc_core.h"
-#include "mmsvc_core_msg_json.h"
-#include "mmsvc_core_ipc.h"
+#include "muse_core.h"
+#include "muse_core_msg_json.h"
+#include "muse_core_ipc.h"
#include "player2_private.h"
#include "player_msg_private.h"
#include "player_internal.h"
{
int ret = 0;
tbm_surface_h tsurf = NULL;
- mm_player_api_e api = MM_PLAYER_API_MEDIA_PACKET_FINALIZE_CB;
+ muse_player_api_e api = MUSE_PLAYER_API_MEDIA_PACKET_FINALIZE_CB;
_media_pkt_fin_data *fin_data = (_media_pkt_fin_data *)user_data;
intptr_t packet;
char *sndMsg;
}
packet = fin_data->remote_pkt;
- sndMsg = mmsvc_core_msg_json_factory_new(api, "packet", packet, 0);
- mmsvc_core_ipc_send_msg(fin_data->cb_info->fd, sndMsg);
- mmsvc_core_msg_json_factory_free(sndMsg);
+ sndMsg = muse_core_msg_json_factory_new(api, MUSE_TYPE_POINTER, "packet", packet, 0);
+ muse_core_ipc_send_msg(fin_data->cb_info->fd, sndMsg);
+ muse_core_msg_json_factory_free(sndMsg);
g_free(fin_data);
msg_buff_s *buff = &cb_info->buff;
char *new;
- if(len && buff->bufLen - MM_MSG_MAX_LENGTH <= len) {
+ if(len && buff->bufLen - MUSE_MSG_MAX_LENGTH <= len) {
LOGD("realloc Buffer %d -> %d, Msg Length %d",
- buff->bufLen, buff->bufLen + MM_MSG_MAX_LENGTH, len);
- buff->bufLen += MM_MSG_MAX_LENGTH;
+ buff->bufLen, buff->bufLen + MUSE_MSG_MAX_LENGTH, len);
+ buff->bufLen += MUSE_MSG_MAX_LENGTH;
new = g_renew(char, buff->recvMsg, buff->bufLen);
if(new && new != buff->recvMsg){
buff->recvMsg = new;
}
}
- recvLen = mmsvc_core_ipc_recv_msg(cb_info->fd, buff->recvMsg + len);
+ recvLen = muse_core_ipc_recv_msg(cb_info->fd, buff->recvMsg + len);
len += recvLen;
return len;
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
int set = 1;
LOGI("Event type : %d ", type);
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
int set = 0;
LOGI("Event type : %d ", type);
static void __prepare_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
- char caps[MM_MSG_MAX_LENGTH] = {0};
+ char caps[MUSE_MSG_MAX_LENGTH] = {0};
_player_event_e ev = _PLAYER_EVENT_TYPE_PREPARE;
if(player_msg_get_string(caps, recvMsg))
static void __subtitle_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
int duration = 0;
- char text[MM_URI_MAX_LENGTH];
+ char text[MUSE_URI_MAX_LENGTH];
_player_event_e ev = _PLAYER_EVENT_TYPE_SUBTITLE;
if(player_msg_get(duration, recvMsg)
static void __video_bin_created_cb_handler(
callback_cb_info_s * cb_info, char *recvMsg)
{
- char caps[MM_MSG_MAX_LENGTH] = {0};
+ char caps[MUSE_MSG_MAX_LENGTH] = {0};
if(player_msg_get_string(caps, recvMsg))
if(strlen(caps) > 0)
mm_player_mused_realize(cb_info->local_handle, caps);
}
}
-static void _add_ret_msg(mm_player_api_e api, callback_cb_info_s *cb_info,
+static void _add_ret_msg(muse_player_api_e api, callback_cb_info_s *cb_info,
int offset, int parse_len)
{
ret_msg_s *msg = NULL;
LOGE("g_new failure");
}
-static ret_msg_s * _get_ret_msg(mm_player_api_e api, callback_cb_info_s *cb_info)
+static ret_msg_s * _get_ret_msg(muse_player_api_e api, callback_cb_info_s *cb_info)
{
ret_msg_s *msg = cb_info->buff.retMsgHead;
ret_msg_s *prev = NULL;
int offset = 0;
callback_cb_info_s *cb_info = data;
char *recvMsg = cb_info->buff.recvMsg;
- mused_msg_parse_err_e err;
+ muse_core_msg_parse_err_e err;
while (g_atomic_int_get(&cb_info->running)) {
len = 0;
- err = MUSED_MSG_PARSE_ERROR_NONE;
+ err = MUSE_MSG_PARSE_ERROR_NONE;
do {
len = player_recv_msg(cb_info, len);
if (len <= 0)
parse_len = len;
offset = 0;
while(offset < len){
- api = MM_PLAYER_API_MAX;
+ api = MUSE_PLAYER_API_MAX;
if(player_msg_get_error_e(api, recvMsg + offset, parse_len, err)) {
- if(api < MM_PLAYER_API_MAX){
+ if(api < MUSE_PLAYER_API_MAX){
g_mutex_lock(&cb_info->player_mutex);
cb_info->buff.recved++;
_add_ret_msg(api, cb_info, offset, parse_len);
g_cond_signal(&cb_info->player_cond[api]);
g_mutex_unlock(&cb_info->player_mutex);
- if (api == MM_PLAYER_API_DESTROY) {
+ if (api == MUSE_PLAYER_API_DESTROY) {
g_atomic_int_set(&cb_info->running, 0);
}
}
- else if(api == MM_PLAYER_CB_EVENT) {
+ else if(api == MUSE_PLAYER_CB_EVENT) {
int event;
char *buffer;
g_mutex_lock(&cb_info->player_mutex);
offset += parse_len;
parse_len = len - parse_len;
}
- }while(err == MUSED_MSG_PARSE_ERROR_CONTINUE);
+ }while(err == MUSE_MSG_PARSE_ERROR_CONTINUE);
if (len <= 0)
break;
}
memset(cb_info, 0, sizeof(callback_cb_info_s));
g_mutex_init(&cb_info->player_mutex);
- for(i=0; i<MM_PLAYER_API_MAX; i++)
+ for(i=0; i<MUSE_PLAYER_API_MAX; i++)
g_cond_init(&cb_info->player_cond[i]);
buff = &cb_info->buff;
- buff->recvMsg = g_new(char, MM_MSG_MAX_LENGTH+1);
- buff->bufLen = MM_MSG_MAX_LENGTH+1;
+ buff->recvMsg = g_new(char, MUSE_MSG_MAX_LENGTH+1);
+ buff->bufLen = MUSE_MSG_MAX_LENGTH+1;
buff->recved = 0;
buff->retMsgHead = NULL;
int i;
g_return_if_fail(cb_info);
- mmsvc_core_connection_close(cb_info->fd);
- mmsvc_core_connection_close(cb_info->data_fd);
+ muse_core_connection_close(cb_info->fd);
+ muse_core_connection_close(cb_info->data_fd);
g_thread_join(cb_info->thread);
g_thread_unref(cb_info->thread);
LOGI("%p Callback destroyed", cb_info->thread);
g_mutex_clear(&cb_info->player_mutex);
- for(i=0; i<MM_PLAYER_API_MAX; i++)
+ for(i=0; i<MUSE_PLAYER_API_MAX; i++)
g_cond_clear(&cb_info->player_cond[i]);
g_free(cb_info->buff.recvMsg);
g_free(cb_info);
}
-int wait_for_cb_return(mm_player_api_e api, callback_cb_info_s *cb_info,
+int wait_for_cb_return(muse_player_api_e api, callback_cb_info_s *cb_info,
char **ret_buf, int time_out)
{
int ret = PLAYER_ERROR_NONE;
int sock_fd = -1;
int pid = getpid();
- mm_player_api_e api = MM_PLAYER_API_CREATE;
- mmsvc_api_client_e client = MMSVC_PLAYER;
+ muse_player_api_e api = MUSE_PLAYER_API_CREATE;
+ muse_core_api_module_e module = MUSE_PLAYER;
player_cli_s *pc = NULL;
char *ret_buf = NULL;
LOGD("ENTER");
- sock_fd = mmsvc_core_client_new();
+ sock_fd = muse_core_client_new();
if(sock_fd < 0){
LOGE("connection failure %d", errno);
ret = PLAYER_ERROR_INVALID_OPERATION;
goto ErrorExit;
}
- player_msg_create_handle(api, (intptr_t)player, sock_fd, INT, client, INT, pid);
+ player_msg_create_handle(api, sock_fd, INT, module, INT, pid);
pc = g_new0(player_cli_s, 1);
if (pc == NULL) {
ret = wait_for_cb_return(api, pc->cb_info, &ret_buf, CALLBACK_TIME_OUT);
if (ret == PLAYER_ERROR_NONE) {
- intptr_t handle;
- intptr_t client_addr;
- char stream_path[MM_MSG_MAX_LENGTH] = {0,};
- if(player_msg_get_type(handle, ret_buf, POINTER)) {
- EXT_HANDLE(pc) = handle;
- LOGD("Player create %p", EXT_HANDLE(pc));
- *player = (player_h) pc;
- }
- if(player_msg_get_type(client_addr, ret_buf, POINTER)) {
- pc->cb_info->data_fd = mmsvc_core_client_new_data_ch();
- mmsvc_core_send_client_addr(client_addr, pc->cb_info->data_fd);
- LOGD("Data channel fd %d, server side client info addr %p",
- pc->cb_info->data_fd, client_addr);
+ intptr_t module_addr;
+ char stream_path[MUSE_MSG_MAX_LENGTH] = {0,};
+ *player = (player_h) pc;
+ if(player_msg_get_type(module_addr, ret_buf, POINTER)) {
+ pc->cb_info->data_fd = muse_core_client_new_data_ch();
+ muse_core_send_client_addr(module_addr, pc->cb_info->data_fd);
+ LOGD("Data channel fd %d, muse module addr %p",
+ pc->cb_info->data_fd, module_addr);
}
if(mm_player_mused_create(&INT_HANDLE(pc)) != MM_ERROR_NONE) {
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_DESTROY;
+ muse_player_api_e api = MUSE_PLAYER_API_DESTROY;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_PREPARE_ASYNC;
+ muse_player_api_e api = MUSE_PLAYER_API_PREPARE_ASYNC;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_PREPARE;
+ muse_player_api_e api = MUSE_PLAYER_API_PREPARE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
- char caps[MM_MSG_MAX_LENGTH] = {0};
+ char caps[MUSE_MSG_MAX_LENGTH] = {0};
LOGD("ENTER");
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_UNPREPARE;
+ muse_player_api_e api = MUSE_PLAYER_API_UNPREPARE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(uri);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_URI;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_URI;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(data);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_MEMORY_BUFFER;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEMORY_BUFFER;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
tbm_bo bo;
{
PLAYER_INSTANCE_CHECK(pc);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_DEINIT_MEMORY_BUFFER;
+ muse_player_api_e api = MUSE_PLAYER_API_DEINIT_MEMORY_BUFFER;
intptr_t bo_addr = SERVER_TBM_BO(pc);
if(!bo_addr)
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pstate);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_STATE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_STATE;
player_cli_s *pc = (player_cli_s *) player;
int state;
char *ret_buf = NULL;
PLAYER_CHECK_CONDITION(left>=0 && left <= 1.0 ,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
PLAYER_CHECK_CONDITION(right>=0 && right <= 1.0 ,PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER" );
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_VOLUME;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_VOLUME;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_NULL_ARG_CHECK(pleft);
PLAYER_NULL_ARG_CHECK(pright);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_VOLUME;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_VOLUME;
player_cli_s *pc = (player_cli_s *) player;
double left = -1;
double right = -1;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_SOUND_TYPE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_SOUND_TYPE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
- mm_player_api_e api = MM_PLAYER_API_SET_AUDIO_POLICY_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_POLICY_INFO;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_AUDIO_LATENCY_MODE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_LATENCY_MODE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(platency_mode);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_AUDIO_LATENCY_MODE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_AUDIO_LATENCY_MODE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int latency_mode = -1;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_START;
+ muse_player_api_e api = MUSE_PLAYER_API_START;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_STOP;
+ muse_player_api_e api = MUSE_PLAYER_API_STOP;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_PAUSE;
+ muse_player_api_e api = MUSE_PLAYER_API_PAUSE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
"PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_PLAY_POSITION;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_PLAY_POSITION;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int pos = millisecond;
PLAYER_NULL_ARG_CHECK(millisecond);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_PLAY_POSITION;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_PLAY_POSITION;
player_cli_s *pc = (player_cli_s *) player;
int pos;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_MUTE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MUTE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int mute = (int)muted;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(muted);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_IS_MUTED;
+ muse_player_api_e api = MUSE_PLAYER_API_IS_MUTED;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int mute = -1;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_LOOPING;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_LOOPING;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(plooping);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_IS_LOOPING;
+ muse_player_api_e api = MUSE_PLAYER_API_IS_LOOPING;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int looping = 0;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pduration);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_DURATION;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_DURATION;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int duration = 0;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_DISPLAY;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
Evas_Object *obj = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_DISPLAY_MODE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_MODE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_CHECK_CONDITION(rate>=-5.0 && rate <= 5.0 ,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_PLAYBACK_RATE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_PLAYBACK_RATE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_DISPLAY_ROTATION;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_ROTATION;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pvalue);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_CONTENT_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_CONTENT_INFO;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
- char value[MM_MSG_MAX_LENGTH] = {0,};
+ char value[MUSE_MSG_MAX_LENGTH] = {0,};
LOGD("ENTER");
INT, key);
if(ret == PLAYER_ERROR_NONE){
player_msg_get_string(value, ret_buf);
- *pvalue = strndup(value, MM_MSG_MAX_LENGTH);
+ *pvalue = strndup(value, MUSE_MSG_MAX_LENGTH);
}
g_free(ret_buf);
return ret;
PLAYER_NULL_ARG_CHECK(paudio_codec);
PLAYER_NULL_ARG_CHECK(pvideo_codec);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_CODEC_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_CODEC_INFO;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
- char video_codec[MM_MSG_MAX_LENGTH] = {0,};
- char audio_codec[MM_MSG_MAX_LENGTH] = {0,};
+ char video_codec[MUSE_MSG_MAX_LENGTH] = {0,};
+ char audio_codec[MUSE_MSG_MAX_LENGTH] = {0,};
LOGD("ENTER");
if(ret == PLAYER_ERROR_NONE){
player_msg_get_string(video_codec, ret_buf);
player_msg_get_string(audio_codec, ret_buf);
- *pvideo_codec = strndup(video_codec, MM_MSG_MAX_LENGTH);
- *paudio_codec = strndup(audio_codec, MM_MSG_MAX_LENGTH);
+ *pvideo_codec = strndup(video_codec, MUSE_MSG_MAX_LENGTH);
+ *paudio_codec = strndup(audio_codec, MUSE_MSG_MAX_LENGTH);
}
g_free(ret_buf);
return ret;
PLAYER_NULL_ARG_CHECK(pchannel);
PLAYER_NULL_ARG_CHECK(pbit_rate);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_AUDIO_STREAM_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_AUDIO_STREAM_INFO;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int sample_rate = 0;
PLAYER_NULL_ARG_CHECK(pfps);
PLAYER_NULL_ARG_CHECK(pbit_rate);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_VIDEO_STREAM_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_STREAM_INFO;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int fps = 0;
PLAYER_NULL_ARG_CHECK(pwidth);
PLAYER_NULL_ARG_CHECK(pheight);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_VIDEO_SIZE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_SIZE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int width = 0;
PLAYER_NULL_ARG_CHECK(palbum_art);
PLAYER_NULL_ARG_CHECK(psize);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_ALBUM_ART;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_ALBUM_ART;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
char *album_art;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pcount);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BANDS_COUNT;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BANDS_COUNT;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int count;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(band_levels);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_ALL_BANDS;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_ALL_BANDS;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_BAND_LEVEL;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_BAND_LEVEL;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(plevel);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_LEVEL;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_LEVEL;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int level;
PLAYER_NULL_ARG_CHECK(pmin);
PLAYER_NULL_ARG_CHECK(pmax);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_LEVEL_RANGE;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_LEVEL_RANGE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int min,max;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pfrequency);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int frequency;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(prange);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY_RANGE;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY_RANGE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int range;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_EQUALIZER_CLEAR;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_CLEAR;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pavailable);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_EQUALIZER_IS_AVAILABLE;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_IS_AVAILABLE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int available;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_SUBTITLE_PATH;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_PATH;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_SUBTITLE_POSITION_OFFSET;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_POSITION_OFFSET;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(path);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_PROGRESSIVE_DOWNLOAD_PATH;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_PROGRESSIVE_DOWNLOAD_PATH;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int type = _PLAYER_EVENT_TYPE_VIDEO_BIN_CREATED;
PLAYER_NULL_ARG_CHECK(pcurrent);
PLAYER_NULL_ARG_CHECK(ptotal_size);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_PROGRESSIVE_DOWNLOAD_STATUS;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_PROGRESSIVE_DOWNLOAD_STATUS;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
unsigned long current, total_size;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_CAPTURE_VIDEO;
+ muse_player_api_e api = MUSE_PLAYER_API_CAPTURE_VIDEO;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_NULL_ARG_CHECK(cookie);
PLAYER_CHECK_CONDITION(size>=0,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_STREAMING_COOKIE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_COOKIE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_NULL_ARG_CHECK(user_agent);
PLAYER_CHECK_CONDITION(size>=0,PLAYER_ERROR_INVALID_PARAMETER,"PLAYER_ERROR_INVALID_PARAMETER" );
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_STREAMING_COOKIE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_COOKIE;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
PLAYER_NULL_ARG_CHECK(pstart);
PLAYER_NULL_ARG_CHECK(pcurrent);
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_GET_STREAMING_DOWNLOAD_PROGRESS;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_STREAMING_DOWNLOAD_PROGRESS;
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int start, current;
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
_player_event_e type = _PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME;
int set = 1;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
_player_event_e type = _PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME;
int set = 0;
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
_player_event_e type = _PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED;
int set = 1;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
_player_event_e type = _PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED;
int set = 0;
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
_player_event_e type;
int set = 1;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
_player_event_e type;
int set = 0;
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
_player_event_e type;
int set = 1;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
_player_event_e type;
int set = 0;
PLAYER_NULL_ARG_CHECK(packet);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_PUSH_MEDIA_STREAM;
+ muse_player_api_e api = MUSE_PLAYER_API_PUSH_MEDIA_STREAM;
char *ret_buf = NULL;
player_push_media_msg_type push_media;
char *push_media_msg = (char *)&push_media;
} else
#endif
if(push_media.buf_type == PUSH_MEDIA_BUF_TYPE_RAW) {
- mmsvc_core_ipc_push_data(pc->cb_info->data_fd, buf, push_media.size, push_media.pts);
+ muse_core_ipc_push_data(pc->cb_info->data_fd, buf, push_media.size, push_media.pts);
player_msg_send_array(api, pc, ret_buf, ret,
push_media_msg, msg_size, sizeof(char));
}
g_return_val_if_fail(format, PLAYER_ERROR_INVALID_OPERATION);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_MEDIA_STREAM_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_INFO;
char *ret_buf = NULL;
media_format_mimetype_e mimetype;
int width;
int ret = PLAYER_ERROR_NONE;
PLAYER_INSTANCE_CHECK(player);
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pmax_size);
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MAX_SIZE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MAX_SIZE;
char *ret_buf = NULL;
unsigned long long max_size;
int ret = PLAYER_ERROR_NONE;
PLAYER_INSTANCE_CHECK(player);
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(ppercent);
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
char *ret_buf = NULL;
uint percent;
PLAYER_NULL_ARG_CHECK(pcount);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_GET_TRACK_COUNT;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_TRACK_COUNT;
char *ret_buf = NULL;
int count;
PLAYER_NULL_ARG_CHECK(pindex);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_GET_CURRENT_TRACK;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_CURRENT_TRACK;
char *ret_buf = NULL;
int index;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_SELECT_TRACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SELECT_TRACK;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(pcode);
int ret = PLAYER_ERROR_NONE;
player_cli_s *pc = (player_cli_s *) player;
- mm_player_api_e api = MM_PLAYER_API_GET_TRACK_LANGUAGE_CODE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_TRACK_LANGUAGE_CODE;
char *ret_buf = NULL;
- char code[MM_MSG_MAX_LENGTH] = {0,};
+ char code[MUSE_MSG_MAX_LENGTH] = {0,};
const int code_len=2;
LOGD("ENTER");
extern "C" {
#endif
-#include <mmsvc_core_msg_json.h>
+#include <muse_core_msg_json.h>
#include <media_format.h>
#include <tbm_bufmgr.h>
#include <player2_private.h>
* @param[in] buf string of message buffer. has key and value
*/
#define player_msg_get(param, buf) \
- mmsvc_core_msg_json_deserialize(#param, buf, ¶m, NULL)
+ muse_core_msg_json_deserialize(#param, buf, NULL, ¶m, NULL, MUSE_TYPE_ANY)
/**
* @brief Get value from Message.
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
*/
#define player_msg_get_type(param, buf, type) \
- mmsvc_core_msg_json_deserialize_type(#param, buf, ¶m, NULL, MUSED_TYPE_##type)
+ muse_core_msg_json_deserialize(#param, buf, NULL, ¶m, NULL, MUSE_TYPE_##type)
/**
* @brief Get value from Message.
* @param[in] buf string of message buffer. has key and value
*/
#define player_msg_get_string(param, buf) \
- mmsvc_core_msg_json_deserialize(#param, buf, param, NULL)
+ muse_core_msg_json_deserialize(#param, buf, NULL, param, NULL, MUSE_TYPE_ANY)
/**
* @brief Get value from Message.
* @param[in] buf string of message buffer. has key and value
*/
#define player_msg_get_array(param, buf) \
- mmsvc_core_msg_json_deserialize(#param, buf, param, NULL)
+ muse_core_msg_json_deserialize(#param, buf, NULL, param, NULL, MUSE_TYPE_ANY)
/**
* @brief Get value from Message.
* @param[out] e the error number.
*/
#define player_msg_get_error_e(param, buf, len, e) \
- mmsvc_core_msg_json_deserialize_len(#param, buf, &len, ¶m, &e, MUSED_TYPE_INT)
+ muse_core_msg_json_deserialize(#param, buf, &len, ¶m, &e, MUSE_TYPE_INT)
/**
* @brief Create and send message. Wait for server result.
int __fd__; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} else \
ret = wait_for_cb_return(api, CALLBACK_INFO(player), &retbuf, CALLBACK_TIME_OUT); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
type __value__ = (type)param; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
- MUSED_TYPE_##type, #param, __value__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_##type, #param, __value__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} else \
ret = wait_for_cb_return(api, CALLBACK_INFO(player), &retbuf, CALLBACK_TIME_OUT); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
type2 __value2__ = (type2)param2; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} else \
ret = wait_for_cb_return(api, CALLBACK_INFO(player), &retbuf, CALLBACK_TIME_OUT); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
type3 __value3__ = (type3)param3; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
- MUSED_TYPE_##type3, #param3, __value3__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
+ MUSE_TYPE_##type3, #param3, __value3__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} else \
ret = wait_for_cb_return(api, CALLBACK_INFO(player), &retbuf, CALLBACK_TIME_OUT); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
type6 __value6__ = (type6)param6; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
- MUSED_TYPE_##type3, #param3, __value3__, \
- MUSED_TYPE_##type4, #param4, __value4__, \
- MUSED_TYPE_##type5, #param5, __value5__, \
- MUSED_TYPE_##type6, #param6, __value6__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
+ MUSE_TYPE_##type3, #param3, __value3__, \
+ MUSE_TYPE_##type4, #param4, __value4__, \
+ MUSE_TYPE_##type5, #param5, __value5__, \
+ MUSE_TYPE_##type6, #param6, __value6__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} else \
ret = wait_for_cb_return(api, CALLBACK_INFO(player), &retbuf, CALLBACK_TIME_OUT); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
int *__value__ = (int *)param; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
- MUSED_TYPE_INT, #length, length, \
- MUSED_TYPE_ARRAY, #param, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, #length, length, \
+ MUSE_TYPE_ARRAY, #param, \
datum_size == sizeof(int)? length : \
length / sizeof(int) + (length % sizeof(int)?1:0), \
__value__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} else \
ret = wait_for_cb_return(api, CALLBACK_INFO(player), &retbuf, CALLBACK_TIME_OUT); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
int *__value2__ = (int *)param2; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
- MUSED_TYPE_INT, #length1, length1, \
- MUSED_TYPE_ARRAY, #param1, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, #length1, length1, \
+ MUSE_TYPE_ARRAY, #param1, \
datum_size1 == sizeof(int)? length1 : \
length1 / sizeof(int) + (length1 % sizeof(int)?1:0), \
__value1__, \
- MUSED_TYPE_INT, #length2, length2, \
- MUSED_TYPE_ARRAY, #param2, \
+ MUSE_TYPE_INT, #length2, length2, \
+ MUSE_TYPE_ARRAY, #param2, \
datum_size2 == sizeof(int)? length2 : \
length2 / sizeof(int) + (length2 % sizeof(int)?1:0), \
__value2__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} else \
ret = wait_for_cb_return(api, CALLBACK_INFO(player), &retbuf, CALLBACK_TIME_OUT); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
type __value__ = (type)param; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
- MUSED_TYPE_##type, #param, __value__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_##type, #param, __value__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
return PLAYER_ERROR_INVALID_OPERATION; \
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param the name of param is key, must be local variable. never be pointer.
*/
-#define player_msg_create_handle(api, player, fd, type1, param1, type2, param2) \
+#define player_msg_create_handle(api, fd, type1, param1, type2, param2) \
do{ \
char *__sndMsg__; \
int __len__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, player, \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(fd, __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(fd, __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
return PLAYER_ERROR_INVALID_OPERATION; \
int __value2__ = (int)set; \
if(CALLBACK_INFO(player)) __fd__ = MSG_FD(player); \
else {ret = PLAYER_ERROR_INVALID_STATE;break;} \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_HANDLE, EXT_HANDLE(player), \
- MUSED_TYPE_INT, #event_type, __value1__, \
- MUSED_TYPE_INT, #set, __value2__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, #event_type, __value1__, \
+ MUSE_TYPE_INT, #set, __value2__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(__fd__, __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(__fd__, __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] ret Thre result of API.
- * @param[in] client socket client information
+ * @param[in] module mused module information
*/
-#define player_msg_return(api, ret, client) \
+#define player_msg_return(api, ret, module) \
do{ \
char *__sndMsg__; \
int __len__; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_RETURN, ret, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_RETURN, ret, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] ret Thre result of API.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param the name of param is key, must be local variable. never be pointer.
*/
-#define player_msg_return1(api, ret, client, type, param) \
+#define player_msg_return1(api, ret, module, type, param) \
do{ \
char *__sndMsg__; \
int __len__; \
type __value__ = (type)param; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_RETURN, ret, \
- MUSED_TYPE_##type, #param, __value__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_RETURN, ret, \
+ MUSE_TYPE_##type, #param, __value__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] ret Thre result of API.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param# the name of param is key, must be local variable. never be pointer.
*/
-#define player_msg_return2(api, ret, client, type1, param1, type2, param2) \
+#define player_msg_return2(api, ret, module, type1, param1, type2, param2) \
do{ \
char *__sndMsg__; \
int __len__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_RETURN, ret, \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_RETURN, ret, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] ret Thre result of API.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param# the name of param is key, must be local variable. never be pointer.
*/
-#define player_msg_return3(api, ret, client, type1, param1, type2, param2, type3, param3) \
+#define player_msg_return3(api, ret, module, type1, param1, type2, param2, type3, param3) \
do{ \
char *__sndMsg__; \
int __len__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
type3 __value3__ = (type3)param3; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_RETURN, ret, \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
- MUSED_TYPE_##type3, #param3, __value3__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_RETURN, ret, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
+ MUSE_TYPE_##type3, #param3, __value3__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] ret Thre result of API.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] param the name of param is key, must be local array/pointer variable.
* @param[in] length The size of array.
* @param[in] datum_size The size of a array's datum.
*/
-#define player_msg_return_array(api, ret, client, param, length, datum_size) \
+#define player_msg_return_array(api, ret, module, param, length, datum_size) \
do{ \
char *__sndMsg__; \
int __len__; \
int *__value__ = (int *)param; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_RETURN, ret, \
- MUSED_TYPE_INT, #length, length, \
- MUSED_TYPE_ARRAY, #param, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_RETURN, ret, \
+ MUSE_TYPE_INT, #length, length, \
+ MUSE_TYPE_ARRAY, #param, \
datum_size == sizeof(int)? length : \
length / sizeof(int) + (length % sizeof(int)?1:0), \
__value__, \
0); \
- __len__ = mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
+ __len__ = muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
ret = PLAYER_ERROR_INVALID_OPERATION; \
} \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] event The event number.
- * @param[in] client socket client information
+ * @param[in] module mused module information
*/
-#define player_msg_event(api, event, client) \
+#define player_msg_event(api, event, module) \
do{ \
char *__sndMsg__; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_EVENT, event, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_EVENT, event, \
0); \
- mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] event The event number.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param the name of param is key, must be local variable. never be pointer.
*/
-#define player_msg_event1(api, event, client, type, param) \
+#define player_msg_event1(api, event, module, type, param) \
do{ \
char *__sndMsg__; \
type __value__ = (type)param; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_EVENT, event, \
- MUSED_TYPE_##type, #param, __value__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_EVENT, event, \
+ MUSE_TYPE_##type, #param, __value__, \
0); \
- mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] event The event number.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param# the name of param is key, must be local variable. never be pointer.
*/
-#define player_msg_event2(api, event, client, type1, param1, type2, param2) \
+#define player_msg_event2(api, event, module, type1, param1, type2, param2) \
do{ \
char *__sndMsg__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_EVENT, event, \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_EVENT, event, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
0); \
- mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] event The event number.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param# the name of param is key, must be local variable. never be pointer.
*/
-#define player_msg_event3(api, event, client, type1, param1, type2, param2, type3, param3) \
+#define player_msg_event3(api, event, module, type1, param1, type2, param2, type3, param3) \
do{ \
char *__sndMsg__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
type3 __value3__ = (type3)param3; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_EVENT, event, \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
- MUSED_TYPE_##type3, #param3, __value3__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_EVENT, event, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
+ MUSE_TYPE_##type3, #param3, __value3__, \
0); \
- mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] event The event number.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param# the name of param is key, must be local variable. never be pointer.
*/
-#define player_msg_event4(api, event, client, type1, param1, type2, param2, type3, param3, type4, param4) \
+#define player_msg_event4(api, event, module, type1, param1, type2, param2, type3, param3, type4, param4) \
do{ \
char *__sndMsg__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
type3 __value3__ = (type3)param3; \
type4 __value4__ = (type4)param4; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_EVENT, event, \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
- MUSED_TYPE_##type3, #param3, __value3__, \
- MUSED_TYPE_##type4, #param4, __value4__, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_EVENT, event, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
+ MUSE_TYPE_##type3, #param3, __value3__, \
+ MUSE_TYPE_##type4, #param4, __value4__, \
0); \
- mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] event The event number.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param# the name of param is key, must be local variable. never be pointer.
* @param[in] arr_param the name of param is key, must be local pointer/array variable.
* @param[in] length The size of array.
* @param[in] datum_size The size of a array's datum.
*/
-#define player_msg_event2_array(api, event, client, type1, param1, type2, param2, arr_param, length, datum_size) \
+#define player_msg_event2_array(api, event, module, type1, param1, type2, param2, arr_param, length, datum_size) \
do{ \
char *__sndMsg__; \
type1 __value1__ = (type1)param1; \
type2 __value2__ = (type2)param2; \
int *__arr_value__ = (int *)arr_param; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_EVENT, event, \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
- MUSED_TYPE_INT, #length, length, \
- MUSED_TYPE_ARRAY, #arr_param, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_EVENT, event, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
+ MUSE_TYPE_INT, #length, length, \
+ MUSE_TYPE_ARRAY, #arr_param, \
datum_size == sizeof(int)? length : \
length / sizeof(int) + (length % sizeof(int)?1:0), \
__arr_value__, \
0); \
- mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
/**
* @remarks Does NOT guarantee thread safe.
* @param[in] api The enum of module API.
* @param[in] event The event number.
- * @param[in] client socket client information
+ * @param[in] module mused module information
* @param[in] type The enum of parameter type. Muse be one of thease(INT, INT64, POINTER, DOUBLE, STRING, ARRAY)
* @param[in] param# the name of param is key, must be local variable. never be pointer.
* @param[in] arr_param the name of param is key, must be local array/pointer variable.
* @param[in] length The size of array.
* @param[in] datum_size The size of a array's datum.
*/
-#define player_msg_event6_array(api, event, client, type1, param1, type2, param2, type3, param3, type4, param4, type5, param5, type6, param6, arr_param, length, datum_size) \
+#define player_msg_event6_array(api, event, module, type1, param1, type2, param2, type3, param3, type4, param4, type5, param5, type6, param6, arr_param, length, datum_size) \
do{ \
char *__sndMsg__; \
type1 __value1__ = (type1)param1; \
type5 __value5__ = (type5)param5; \
type6 __value6__ = (type6)param6; \
int *__arr_value__ = (int *)arr_param; \
- __sndMsg__ = mmsvc_core_msg_json_factory_new(api, PARAM_EVENT, event, \
- MUSED_TYPE_##type1, #param1, __value1__, \
- MUSED_TYPE_##type2, #param2, __value2__, \
- MUSED_TYPE_##type3, #param3, __value3__, \
- MUSED_TYPE_##type4, #param4, __value4__, \
- MUSED_TYPE_##type5, #param5, __value5__, \
- MUSED_TYPE_##type6, #param6, __value6__, \
- MUSED_TYPE_INT, #length, length, \
- MUSED_TYPE_ARRAY, #arr_param, \
+ __sndMsg__ = muse_core_msg_json_factory_new(api, \
+ MUSE_TYPE_INT, MUSE_PARAM_EVENT, event, \
+ MUSE_TYPE_##type1, #param1, __value1__, \
+ MUSE_TYPE_##type2, #param2, __value2__, \
+ MUSE_TYPE_##type3, #param3, __value3__, \
+ MUSE_TYPE_##type4, #param4, __value4__, \
+ MUSE_TYPE_##type5, #param5, __value5__, \
+ MUSE_TYPE_##type6, #param6, __value6__, \
+ MUSE_TYPE_INT, #length, length, \
+ MUSE_TYPE_ARRAY, #arr_param, \
datum_size == sizeof(int)? length : \
length / sizeof(int) + (length % sizeof(int)?1:0), \
__arr_value__, \
0); \
- mmsvc_core_ipc_send_msg(mmsvc_core_client_get_msg_fd(client), __sndMsg__); \
- mmsvc_core_msg_json_factory_free(__sndMsg__); \
+ muse_core_ipc_send_msg(muse_core_client_get_msg_fd(module), __sndMsg__); \
+ muse_core_msg_json_factory_free(__sndMsg__); \
}while(0)
#include "mm_debug.h"
#include "mm_error.h"
#include "mm_player.h"
-#include "mmsvc_core.h"
-#include "mmsvc_core_ipc.h"
+#include "muse_core.h"
+#include "muse_core_ipc.h"
#include "player2_private.h"
#include "player_msg_private.h"
#include "player_internal.h"
typedef struct {
player_h player;
- Client client;
+ muse_module_h module;
}prepare_data_t;
/*
static int _push_media_stream(intptr_t handle, player_push_media_msg_type *push_media, char *buf);
static gpointer _player_push_media_stream_handler(gpointer param);
-static void __player_callback(_player_event_e ev, Client client)
+static void __player_callback(_player_event_e ev, muse_module_h module)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
LOGD("ENTER");
- player_msg_event(api, ev, client);
+ player_msg_event(api, ev, module);
}
static void _prepare_async_cb(void *user_data)
{
_player_event_e ev = _PLAYER_EVENT_TYPE_PREPARE;
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
prepare_data_t *prepare_data = (prepare_data_t *)user_data;
- Client client;
+ muse_module_h module;
player_h player;
char *caps = NULL;
LOGE("user data of callback is NULL");
return;
}
- client = prepare_data->client;
+ module = prepare_data->module;
player = prepare_data->player;
g_free(prepare_data);
if(player_get_raw_video_caps(player, &caps) == PLAYER_ERROR_NONE) {
if(caps) {
- player_msg_event1(api, ev, client, STRING, caps);
+ player_msg_event1(api, ev, module, STRING, caps);
g_free(caps);
return;
}
}
- player_msg_event(api, ev, client);
+ player_msg_event(api, ev, module);
}
static void _seek_complate_cb(void *user_data)
{
_player_event_e ev = _PLAYER_EVENT_TYPE_SEEK;
- __player_callback(ev, (Client)user_data);
+ __player_callback(ev, (muse_module_h)user_data);
}
static void _buffering_cb(int percent, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_BUFFERING;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
LOGD("ENTER");
- player_msg_event1(api, ev, client, INT, percent);
+ player_msg_event1(api, ev, module, INT, percent);
}
static void _completed_cb(void *user_data)
{
_player_event_e ev = _PLAYER_EVENT_TYPE_COMPLETE;
- __player_callback(ev, (Client)user_data);
+ __player_callback(ev, (muse_module_h)user_data);
}
static void _interrupted_cb(player_interrupted_code_e code, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_INTERRUPT;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
LOGD("ENTER");
- player_msg_event1(api, ev, client, INT, code);
+ player_msg_event1(api, ev, module, INT, code);
}
static void _error_cb(int code, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_ERROR;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
LOGD("ENTER");
- player_msg_event1(api, ev, client, INT, code);
+ player_msg_event1(api, ev, module, INT, code);
}
static void _subtitle_updated_cb(unsigned long duration, char *text, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_SUBTITLE;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
LOGD("ENTER");
- player_msg_event2(api, ev, client, INT, duration, STRING, text);
+ player_msg_event2(api, ev, module, INT, duration, STRING, text);
}
static void _capture_video_cb(unsigned char *data, int width, int height,
unsigned int size, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_CAPTURE;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
tbm_bo bo;
tbm_bo_handle thandle;
tbm_key key;
/* mark to write */
*((char *)thandle.ptr+size) = 1;
- player_msg_event4(api, ev, client, INT, width, INT, height,
+ player_msg_event4(api, ev, module, INT, width, INT, height,
INT, size, INT, key);
capture_event_exit2:
static void _pd_msg_cb(player_pd_message_type_e type, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_PD;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
LOGD("ENTER");
- player_msg_event1(api, ev, client, INT, type);
+ player_msg_event1(api, ev, module, INT, type);
}
static void _media_packet_video_decoded_cb(media_packet_h pkt, void *user_data)
{
int ret;
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
tbm_surface_h suf;
tbm_bo bo[4];
int bo_num;
}
media_packet_get_format(pkt, &fmt);
media_format_get_video_info(fmt, &mimetype, NULL, NULL, NULL, NULL);
- player_msg_event6_array(api, ev, client,
+ player_msg_event6_array(api, ev, module,
INT, key[0],
INT, key[1],
INT, key[2],
static void _audio_frame_decoded_cb(player_audio_raw_data_s *audio_frame, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_AUDIO_FRAME;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
tbm_bo bo;
tbm_bo_handle thandle;
tbm_key key;
tbm_bo_unmap(bo);
- player_msg_event2_array(api, ev, client, INT, key, INT, size,
+ player_msg_event2_array(api, ev, module, INT, key, INT, size,
audio_frame, sizeof(player_audio_raw_data_s), sizeof(char));
while(checker && expired--) {
static void _video_stream_changed_cb(
int width, int height, int fps, int bit_rate, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
- player_msg_event4(api, ev, client,
+ player_msg_event4(api, ev, module,
INT, width, INT, height, INT, fps, INT, bit_rate);
}
static void _media_stream_audio_buffer_status_cb(
player_media_stream_buffer_status_e status, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
- player_msg_event1(api, ev, client, INT, status);
+ player_msg_event1(api, ev, module, INT, status);
}
static void _media_stream_video_buffer_status_cb(
player_media_stream_buffer_status_e status, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
- player_msg_event1(api, ev, client, INT, status);
+ player_msg_event1(api, ev, module, INT, status);
}
static void _media_stream_audio_seek_cb(
unsigned long long offset, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_SEEK;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
-#if 0
- unsigned upper_offset = (unsigned)((offset >> 32) & 0xffffffff);
- unsigned lower_offset = (unsigned)(offset & 0xffffffff);
-
- player_msg_event2(api, ev, client,
- INT, upper_offset, INT, lower_offset);
-#else
- player_msg_event1(api, ev, client,
+ player_msg_event1(api, ev, module,
INT64, offset);
-#endif
-
}
static void _media_stream_video_seek_cb(
unsigned long long offset, void *user_data)
{
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_SEEK;
- Client client = (Client)user_data;
+ muse_module_h module = (muse_module_h)user_data;
-#if 0
- unsigned upper_offset = (unsigned)((offset >> 32) & 0xffffffff);
- unsigned lower_offset = (unsigned)(offset & 0xffffffff);
-
- player_msg_event2(api, ev, client,
- INT, upper_offset, INT, lower_offset);
-#else
- player_msg_event1(api, ev, client,
+ player_msg_event1(api, ev, module,
INT64, offset);
-#endif
}
-static void _set_completed_cb(player_h player, void *client, bool set)
+static void _set_completed_cb(player_h player, void *module, bool set)
{
if(set)
- player_set_completed_cb(player, _completed_cb, client);
+ player_set_completed_cb(player, _completed_cb, module);
else
player_unset_completed_cb(player);
}
-static void _set_interrupted_cb(player_h player, void *client, bool set)
+static void _set_interrupted_cb(player_h player, void *module, bool set)
{
if(set)
- player_set_interrupted_cb(player, _interrupted_cb, client);
+ player_set_interrupted_cb(player, _interrupted_cb, module);
else
player_unset_interrupted_cb(player);
}
-static void _set_error_cb(player_h player, void *client, bool set)
+static void _set_error_cb(player_h player, void *module, bool set)
{
if(set)
- player_set_error_cb(player, _error_cb, client);
+ player_set_error_cb(player, _error_cb, module);
else
player_unset_error_cb(player);
}
-static void _set_subtitle_cb(player_h player, void *client, bool set)
+static void _set_subtitle_cb(player_h player, void *module, bool set)
{
if(set)
- player_set_subtitle_updated_cb(player, _subtitle_updated_cb, client);
+ player_set_subtitle_updated_cb(player, _subtitle_updated_cb, module);
else
player_unset_subtitle_updated_cb(player);
}
-static void _set_buffering_cb(player_h player, void *client, bool set)
+static void _set_buffering_cb(player_h player, void *module, bool set)
{
if(set)
- player_set_buffering_cb(player, _buffering_cb, client);
+ player_set_buffering_cb(player, _buffering_cb, module);
else
player_unset_buffering_cb(player);
}
-static void _set_pd_msg_cb(player_h player, void *client, bool set)
+static void _set_pd_msg_cb(player_h player, void *module, bool set)
{
if(set)
- player_set_progressive_download_message_cb(player, _pd_msg_cb, client);
+ player_set_progressive_download_message_cb(player, _pd_msg_cb, module);
else
player_unset_progressive_download_message_cb(player);
}
void *data, bool set)
{
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
- Client client = (Client)data;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
+ muse_module_h module = (muse_module_h)data;
if(set){
ret = player_set_media_packet_video_frame_decoded_cb(
- player, _media_packet_video_decoded_cb, client);
+ player, _media_packet_video_decoded_cb, module);
} else {
ret = player_unset_media_packet_video_frame_decoded_cb(player);
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
}
static void _set_video_stream_changed_cb(player_h player,
void *data, bool set)
{
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
- Client client = (Client)data;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
+ muse_module_h module = (muse_module_h)data;
if(set){
ret = player_set_video_stream_changed_cb(
- player, _video_stream_changed_cb, client);
+ player, _video_stream_changed_cb, module);
} else {
ret = player_unset_video_stream_changed_cb(player);
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
}
static void _set_media_stream_audio_seek_cb(player_h player,
void *data, bool set)
{
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
- Client client = (Client)data;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
+ muse_module_h module = (muse_module_h)data;
if(set){
ret = player_set_media_stream_seek_cb(
player, PLAYER_STREAM_TYPE_AUDIO,
- _media_stream_audio_seek_cb, client);
+ _media_stream_audio_seek_cb, module);
} else {
ret = player_unset_media_stream_seek_cb(
player, PLAYER_STREAM_TYPE_AUDIO);
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
}
static void _set_media_stream_video_seek_cb(player_h player,
void *data, bool set)
{
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
- Client client = (Client)data;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
+ muse_module_h module = (muse_module_h)data;
if(set){
ret = player_set_media_stream_seek_cb(
player, PLAYER_STREAM_TYPE_VIDEO,
- _media_stream_video_seek_cb, client);
+ _media_stream_video_seek_cb, module);
} else {
ret = player_unset_media_stream_seek_cb(
player, PLAYER_STREAM_TYPE_VIDEO);
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
}
static void _set_media_stream_audio_buffer_cb(player_h player,
void *data, bool set)
{
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
- Client client = (Client)data;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
+ muse_module_h module = (muse_module_h)data;
if(set){
ret = player_set_media_stream_buffer_status_cb(
player, PLAYER_STREAM_TYPE_AUDIO,
- _media_stream_audio_buffer_status_cb, client);
+ _media_stream_audio_buffer_status_cb, module);
} else {
ret = player_unset_media_stream_buffer_status_cb(
player, PLAYER_STREAM_TYPE_AUDIO);
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
}
static void _set_media_stream_video_buffer_cb(player_h player,
void *data, bool set)
{
int ret = PLAYER_ERROR_NONE;
- mm_player_api_e api = MM_PLAYER_API_SET_CALLBACK;
- Client client = (Client)data;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
+ muse_module_h module = (muse_module_h)data;
if(set){
ret = player_set_media_stream_buffer_status_cb(
player, PLAYER_STREAM_TYPE_VIDEO,
- _media_stream_video_buffer_status_cb, client);
+ _media_stream_video_buffer_status_cb, module);
} else {
ret = player_unset_media_stream_buffer_status_cb(
player, PLAYER_STREAM_TYPE_VIDEO);
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
}
static void (*set_callback_func[_PLAYER_EVENT_TYPE_NUM])
NULL, /*_PLAYER_EVENT_TYPE_VIDEO_BIN_CREATED*/
};
-static int player_disp_set_callback(Client client)
+static int player_disp_set_callback(muse_module_h module)
{
intptr_t handle;
_player_event_e type;
int set;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
- player_msg_get(set, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
+ player_msg_get(set, muse_core_client_get_msg(module));
if(type < _PLAYER_EVENT_TYPE_NUM && set_callback_func[type] != NULL){
- set_callback_func[type]((player_h)handle, client, set);
+ set_callback_func[type]((player_h)handle, module, set);
}
return PLAYER_ERROR_NONE;
}
-static int player_disp_create(Client client)
+static int player_disp_create(muse_module_h module)
{
int ret = -1;
player_h player;
- mm_player_api_e api = MM_PLAYER_API_CREATE;
+ muse_player_api_e api = MUSE_PLAYER_API_CREATE;
intptr_t handle = 0;
- intptr_t client_addr = (intptr_t)client;
+ intptr_t module_addr = (intptr_t)module;
data_thread_info_t *thread_i;
static guint stream_id = 0;
char stream_path[STREAM_PATH_LENGTH];
int pid;
ret = player_create(&player);
- LOGD("handle : %p, client : %p", player, client);
+ LOGD("handle : %p, module : %p", player, module);
- player_msg_get(pid, mmsvc_core_client_get_msg(client));
+ player_msg_get(pid, muse_core_client_get_msg(module));
if(ret == PLAYER_ERROR_NONE)
ret = player_sound_register(player, pid);
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
if(ret == PLAYER_ERROR_NONE) {
+ handle = (intptr_t)player;
+ muse_core_ipc_set_handle(module, handle);
thread_i = g_new(data_thread_info_t, 1);
thread_i->running = 1;
g_mutex_init(&thread_i->mutex);
g_cond_init(&thread_i->cond);
thread_i->queue = g_queue_new();
thread_i->thread = (gpointer) g_thread_new("push_media",
- _player_push_media_stream_handler, client);
+ _player_push_media_stream_handler, module);
- mmsvc_core_client_set_cust_data(client, thread_i);
+ muse_core_client_set_cust_data(module, thread_i);
- bufmgr = tbm_bufmgr_init (-1);
+ muse_core_ipc_get_bufmgr(&bufmgr);
- stream_id = mmsvc_core_get_atomic_uint();
+ stream_id = muse_core_get_atomic_uint();
snprintf(stream_path, STREAM_PATH_LENGTH, STREAM_PATH_BASE, stream_id);
unlink(stream_path);
ret = player_set_shm_stream_path_for_mused(player, stream_path);
- handle = (intptr_t)player;
- player_msg_return3(api, ret, client,
- POINTER, handle, POINTER, client_addr, STRING, stream_path);
+ player_msg_return2(api, ret, module,
+ POINTER, module_addr, STRING, stream_path);
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_set_uri(Client client)
+static int player_disp_set_uri(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_URI;
- char uri[MM_URI_MAX_LENGTH] = { 0, };
+ muse_player_api_e api = MUSE_PLAYER_API_SET_URI;
+ char uri[MUSE_URI_MAX_LENGTH] = { 0, };
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get_string(uri, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get_string(uri, muse_core_client_get_msg(module));
ret = player_set_uri((player_h) handle, uri);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_prepare(Client client)
+static int player_disp_prepare(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_PREPARE;
+ muse_player_api_e api = MUSE_PLAYER_API_PREPARE;
player_h player;
char *caps = NULL;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
player = (player_h) handle;
if(ret == PLAYER_ERROR_NONE) {
ret = player_get_raw_video_caps(player, &caps);
if(ret == PLAYER_ERROR_NONE && caps) {
- player_msg_return1(api, ret, client, STRING, caps);
+ player_msg_return1(api, ret, module, STRING, caps);
g_free(caps);
- return 1;
+ return ret;
}
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_prepare_async(Client client)
+static int player_disp_prepare_async(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_PREPARE_ASYNC;
+ muse_player_api_e api = MUSE_PLAYER_API_PREPARE_ASYNC;
player_h player;
prepare_data_t *prepare_data;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
player = (player_h) handle;
prepare_data = g_new(prepare_data_t, 1);
prepare_data->player = player;
- prepare_data->client = client;
+ prepare_data->module = module;
ret = player_prepare_async(player, _prepare_async_cb, prepare_data);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_unprepare(Client client)
+static int player_disp_unprepare(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_UNPREPARE;
+ muse_player_api_e api = MUSE_PLAYER_API_UNPREPARE;
player_h player;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
player = (player_h) handle;
ret = player_unprepare(player);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_destroy(Client client)
+static int player_disp_destroy(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_DESTROY;
+ muse_player_api_e api = MUSE_PLAYER_API_DESTROY;
data_thread_info_t *thread_i;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_destroy((player_h) handle);
- thread_i = (data_thread_info_t *)mmsvc_core_client_get_cust_data(client);
+ thread_i = (data_thread_info_t *)muse_core_client_get_cust_data(module);
thread_i->running = 0;
g_cond_signal(&thread_i->cond);
g_mutex_clear(&thread_i->mutex);
g_cond_clear(&thread_i->cond);
g_free(thread_i);
- mmsvc_core_client_set_cust_data(client, NULL);
+ muse_core_client_set_cust_data(module, NULL);
- tbm_bufmgr_deinit (bufmgr);
if(audio_format) {
media_format_unref(audio_format);
audio_format = NULL;
video_format = NULL;
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_start(Client client)
+static int player_disp_start(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_START;
+ muse_player_api_e api = MUSE_PLAYER_API_START;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_start((player_h) handle);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_stop(Client client)
+static int player_disp_stop(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_STOP;
+ muse_player_api_e api = MUSE_PLAYER_API_STOP;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_stop((player_h) handle);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_pause(Client client)
+static int player_disp_pause(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_PAUSE;
+ muse_player_api_e api = MUSE_PLAYER_API_PAUSE;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_pause((player_h) handle);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_memory_buffer(Client client)
+static int player_disp_set_memory_buffer(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_MEMORY_BUFFER;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEMORY_BUFFER;
tbm_bo bo;
tbm_bo_handle thandle;
tbm_key key;
int size;
intptr_t bo_addr;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(key, mmsvc_core_client_get_msg(client));
- player_msg_get(size, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(key, muse_core_client_get_msg(module));
+ player_msg_get(size, muse_core_client_get_msg(module));
bo = tbm_bo_import(bufmgr, key);
if(bo == NULL) {
LOGE("TBM get error : bo is NULL");
ret = PLAYER_ERROR_INVALID_OPERATION;
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
thandle = tbm_bo_map (bo, TBM_DEVICE_CPU, TBM_OPTION_READ);
{
LOGE("TBM get error : handle pointer is NULL");
ret = PLAYER_ERROR_INVALID_OPERATION;
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
bo_addr = (intptr_t)bo;
ret = player_set_memory_buffer((player_h) handle, thandle.ptr, size);
- player_msg_return1(api, ret, client, INT, bo_addr);
+ player_msg_return1(api, ret, module, INT, bo_addr);
return ret;
}
-static int player_disp_deinit_memory_buffer(Client client)
+static int player_disp_deinit_memory_buffer(muse_module_h module)
{
- intptr_t handle;
intptr_t bo_addr;
tbm_bo bo;
- if( player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER)
- && player_msg_get(bo_addr, mmsvc_core_client_get_msg(client))) {
+ if(player_msg_get(bo_addr, muse_core_client_get_msg(module))) {
bo = (tbm_bo)bo_addr;
return PLAYER_ERROR_NONE;
}
-static int player_disp_set_volume(Client client)
+static int player_disp_set_volume(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_VOLUME;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_VOLUME;
double left, right;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(left, mmsvc_core_client_get_msg(client));
- player_msg_get(right, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(left, muse_core_client_get_msg(module));
+ player_msg_get(right, muse_core_client_get_msg(module));
ret = player_set_volume((player_h) handle, (float)left, (float)right);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_get_volume(Client client)
+static int player_disp_get_volume(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_VOLUME;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_VOLUME;
float left, right;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_volume((player_h) handle, &left, &right);
- player_msg_return2(api, ret, client, DOUBLE, left, DOUBLE, right);
+ player_msg_return2(api, ret, module, DOUBLE, left, DOUBLE, right);
- return 1;
+ return ret;
}
-static int player_disp_get_state(Client client)
+static int player_disp_get_state(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_STATE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_STATE;
player_state_e state;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_state((player_h) handle, &state);
- player_msg_return1(api, ret, client, INT, state);
+ player_msg_return1(api, ret, module, INT, state);
- return 1;
+ return ret;
}
-static int player_disp_set_play_position(Client client)
+static int player_disp_set_play_position(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_PLAY_POSITION;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_PLAY_POSITION;
int pos;
int accurate;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(pos, mmsvc_core_client_get_msg(client));
- player_msg_get(accurate, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(pos, muse_core_client_get_msg(module));
+ player_msg_get(accurate, muse_core_client_get_msg(module));
- ret = player_set_play_position((player_h) handle, pos, accurate, _seek_complate_cb ,client);
+ ret = player_set_play_position((player_h) handle, pos, accurate, _seek_complate_cb ,module);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_get_play_position(Client client)
+static int player_disp_get_play_position(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_PLAY_POSITION;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_PLAY_POSITION;
int pos;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_play_position((player_h) handle, &pos);
- player_msg_return1(api, ret, client, INT, pos);
+ player_msg_return1(api, ret, module, INT, pos);
- return 1;
+ return ret;
}
-static int player_disp_set_display(Client client)
+static int player_disp_set_display(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_DISPLAY;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY;
#ifdef HAVE_WAYLAND
wl_win_msg_type wl_win;
char *wl_win_msg = (char *)&wl_win;
unsigned int xhandle;
#endif
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
#ifdef HAVE_WAYLAND
- player_msg_get_array(wl_win_msg, mmsvc_core_client_get_msg(client));
+ player_msg_get_array(wl_win_msg, muse_core_client_get_msg(module));
ret = player_set_display_wl_for_mused((player_h) handle, wl_win.type, wl_win.surface,
wl_win.wl_window_x, wl_win.wl_window_y, wl_win.wl_window_width, wl_win.wl_window_height);
#else
- player_msg_get(type, mmsvc_core_client_get_msg(client));
- player_msg_get(xhandle, mmsvc_core_client_get_msg(client));
+ player_msg_get(type, muse_core_client_get_msg(module));
+ player_msg_get(xhandle, muse_core_client_get_msg(module));
ret = player_set_display_for_mused((player_h) handle, type, xhandle);
#endif
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_set_mute(Client client)
+static int player_disp_set_mute(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_MUTE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MUTE;
int mute;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(mute, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(mute, muse_core_client_get_msg(module));
ret = player_set_mute((player_h) handle, (bool)mute);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_is_muted(Client client)
+static int player_disp_is_muted(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_IS_MUTED;
+ muse_player_api_e api = MUSE_PLAYER_API_IS_MUTED;
bool mute;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_is_muted((player_h) handle, &mute);
- player_msg_return1(api, ret, client, INT, mute);
+ player_msg_return1(api, ret, module, INT, mute);
return ret;
}
-static int player_disp_get_duration(Client client)
+static int player_disp_get_duration(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_DURATION;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_DURATION;
int duration = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_duration((player_h) handle, &duration);
- player_msg_return1(api, ret, client, INT, duration);
+ player_msg_return1(api, ret, module, INT, duration);
return ret;
}
-static int player_disp_set_sound_type(Client client)
+static int player_disp_set_sound_type(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_SOUND_TYPE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_SOUND_TYPE;
int type;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
ret = player_set_sound_type((player_h) handle, (sound_type_e)type);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_audio_policy_info(Client client)
+static int player_disp_set_audio_policy_info(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_AUDIO_POLICY_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_POLICY_INFO;
int stream_index;
- char stream_type[MM_URI_MAX_LENGTH] = { 0, };
+ char stream_type[MUSE_URI_MAX_LENGTH] = { 0, };
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(stream_index, mmsvc_core_client_get_msg(client));
- player_msg_get_string(stream_type, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(stream_index, muse_core_client_get_msg(module));
+ player_msg_get_string(stream_type, muse_core_client_get_msg(module));
ret = player_set_audio_policy_info_for_mused((player_h) handle,
stream_type, stream_index);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_latency_mode(Client client)
+static int player_disp_set_latency_mode(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_AUDIO_LATENCY_MODE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_LATENCY_MODE;
int latency_mode;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(latency_mode, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(latency_mode, muse_core_client_get_msg(module));
ret = player_set_audio_latency_mode((player_h) handle,
(audio_latency_mode_e)latency_mode);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_latency_mode(Client client)
+static int player_disp_get_latency_mode(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_AUDIO_LATENCY_MODE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_AUDIO_LATENCY_MODE;
audio_latency_mode_e latency_mode;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_audio_latency_mode((player_h) handle, &latency_mode);
- player_msg_return1(api, ret, client, INT, latency_mode);
+ player_msg_return1(api, ret, module, INT, latency_mode);
return ret;
}
-static int player_disp_set_looping(Client client)
+static int player_disp_set_looping(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_LOOPING;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_LOOPING;
int looping;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(looping, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(looping, muse_core_client_get_msg(module));
ret = player_set_looping((player_h) handle, (bool)looping);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_is_looping(Client client)
+static int player_disp_is_looping(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_IS_LOOPING;
+ muse_player_api_e api = MUSE_PLAYER_API_IS_LOOPING;
bool looping;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_is_looping((player_h) handle, &looping);
- player_msg_return1(api, ret, client, INT, looping);
+ player_msg_return1(api, ret, module, INT, looping);
return ret;
}
-static int player_disp_set_display_mode(Client client)
+static int player_disp_set_display_mode(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_DISPLAY_MODE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_MODE;
int mode = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(mode, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(mode, muse_core_client_get_msg(module));
ret = player_set_display_mode((player_h) handle, (player_display_mode_e)mode);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_display_mode(Client client)
+static int player_disp_get_display_mode(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_DISPLAY_MODE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_DISPLAY_MODE;
player_display_mode_e mode = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_display_mode((player_h) handle, &mode);
- player_msg_return1(api, ret, client, INT, mode);
+ player_msg_return1(api, ret, module, INT, mode);
return ret;
}
-static int player_disp_set_playback_rate(Client client)
+static int player_disp_set_playback_rate(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_PLAYBACK_RATE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_PLAYBACK_RATE;
double rate = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(rate, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(rate, muse_core_client_get_msg(module));
ret = player_set_playback_rate((player_h) handle, (float)rate);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_display_rotation(Client client)
+static int player_disp_set_display_rotation(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_DISPLAY_ROTATION;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_ROTATION;
int rotation = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(rotation, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(rotation, muse_core_client_get_msg(module));
ret = player_set_display_rotation((player_h) handle,
(player_display_rotation_e)rotation);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_display_rotation(Client client)
+static int player_disp_get_display_rotation(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_DISPLAY_ROTATION;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_DISPLAY_ROTATION;
player_display_rotation_e rotation;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_display_rotation((player_h) handle, &rotation);
- player_msg_return1(api, ret, client, INT, rotation);
+ player_msg_return1(api, ret, module, INT, rotation);
return ret;
}
-static int player_disp_set_display_visible(Client client)
+static int player_disp_set_display_visible(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_DISPLAY_VISIBLE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_VISIBLE;
int visible = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(visible, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(visible, muse_core_client_get_msg(module));
ret = player_set_display_visible((player_h) handle, visible);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_is_display_visible(Client client)
+static int player_disp_is_display_visible(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_IS_DISPLAY_VISIBLE;
+ muse_player_api_e api = MUSE_PLAYER_API_IS_DISPLAY_VISIBLE;
bool visible = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_is_display_visible((player_h) handle, &visible);
- player_msg_return1(api, ret, client, INT, visible);
+ player_msg_return1(api, ret, module, INT, visible);
return ret;
}
-static int player_disp_get_content_info(Client client)
+static int player_disp_get_content_info(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_CONTENT_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_CONTENT_INFO;
char *value;
player_content_info_e key;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(key, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(key, muse_core_client_get_msg(module));
ret = player_get_content_info((player_h) handle, key, &value);
if(ret == PLAYER_ERROR_NONE) {
- player_msg_return1(api, ret, client, STRING, value);
+ player_msg_return1(api, ret, module, STRING, value);
free(value);
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_get_codec_info(Client client)
+static int player_disp_get_codec_info(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_CODEC_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_CODEC_INFO;
char *video_codec;
char *audio_codec;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_codec_info((player_h) handle, &audio_codec, &video_codec);
if(ret == PLAYER_ERROR_NONE) {
- player_msg_return2(api, ret, client,
+ player_msg_return2(api, ret, module,
STRING, audio_codec, STRING, video_codec);
free(audio_codec);
free(video_codec);
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_get_audio_stream_info(Client client)
+static int player_disp_get_audio_stream_info(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_AUDIO_STREAM_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_AUDIO_STREAM_INFO;
int sample_rate = 0;
int channel = 0;
int bit_rate = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_audio_stream_info((player_h) handle,
&sample_rate, &channel, &bit_rate);
- player_msg_return3(api, ret, client,
+ player_msg_return3(api, ret, module,
INT, sample_rate, INT, channel, INT, bit_rate);
- return 1;
+ return ret;
}
-static int player_disp_get_video_stream_info(Client client)
+static int player_disp_get_video_stream_info(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_VIDEO_STREAM_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_STREAM_INFO;
int fps = 0;
int bit_rate = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_video_stream_info((player_h) handle, &fps, &bit_rate);
- player_msg_return2(api, ret, client,
+ player_msg_return2(api, ret, module,
INT, fps, INT, bit_rate);
- return 1;
+ return ret;
}
-static int player_disp_get_video_size(Client client)
+static int player_disp_get_video_size(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_VIDEO_SIZE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_SIZE;
int width = 0;
int height = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_video_size((player_h) handle, &width, &height);
- player_msg_return2(api, ret, client,
+ player_msg_return2(api, ret, module,
INT, width, INT, height);
- return 1;
+ return ret;
}
-static int player_disp_get_album_art(Client client)
+static int player_disp_get_album_art(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_ALBUM_ART;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_ALBUM_ART;
void *album_art;
int size;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_album_art((player_h) handle, &album_art, &size);
if(ret == PLAYER_ERROR_NONE) {
- player_msg_return_array(api, ret, client,
+ player_msg_return_array(api, ret, module,
album_art, size, sizeof(char));
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
- return 1;
+ return ret;
}
-static int player_disp_get_eq_bands_count(Client client)
+static int player_disp_get_eq_bands_count(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BANDS_COUNT;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BANDS_COUNT;
int count;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_audio_effect_get_equalizer_bands_count((player_h) handle, &count);
- player_msg_return1(api, ret, client, INT, count);
+ player_msg_return1(api, ret, module, INT, count);
return ret;
}
-static int player_disp_set_eq_all_bands(Client client)
+static int player_disp_set_eq_all_bands(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_ALL_BANDS;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_ALL_BANDS;
int *band_levels;
int length;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(length, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(length, muse_core_client_get_msg(module));
band_levels = (int *)g_try_new(int, length);
if(band_levels) {
- player_msg_get_array(band_levels, mmsvc_core_client_get_msg(client));
+ player_msg_get_array(band_levels, muse_core_client_get_msg(module));
ret = player_audio_effect_set_equalizer_all_bands((player_h) handle, band_levels, length);
g_free(band_levels);
}
else
ret = PLAYER_ERROR_INVALID_OPERATION;
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_eq_band_level(Client client)
+static int player_disp_set_eq_band_level(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_BAND_LEVEL;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_BAND_LEVEL;
int index, level;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(index, mmsvc_core_client_get_msg(client));
- player_msg_get(level, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(index, muse_core_client_get_msg(module));
+ player_msg_get(level, muse_core_client_get_msg(module));
ret = player_audio_effect_set_equalizer_band_level((player_h) handle, index, level);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_eq_band_level(Client client)
+static int player_disp_get_eq_band_level(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_LEVEL;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_LEVEL;
int index, level;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(index, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(index, muse_core_client_get_msg(module));
ret = player_audio_effect_get_equalizer_band_level((player_h) handle, index, &level);
- player_msg_return1(api, ret, client, INT, level);
+ player_msg_return1(api, ret, module, INT, level);
return ret;
}
-static int player_disp_get_eq_level_range(Client client)
+static int player_disp_get_eq_level_range(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_LEVEL_RANGE;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_LEVEL_RANGE;
int min, max;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_audio_effect_get_equalizer_level_range((player_h) handle, &min, &max);
- player_msg_return2(api, ret, client, INT, min, INT, max);
+ player_msg_return2(api, ret, module, INT, min, INT, max);
return ret;
}
-static int player_disp_get_eq_band_frequency(Client client)
+static int player_disp_get_eq_band_frequency(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY;
int index, frequency;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(index, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(index, muse_core_client_get_msg(module));
ret = player_audio_effect_get_equalizer_band_frequency((player_h) handle, index, &frequency);
- player_msg_return1(api, ret, client, INT, frequency);
+ player_msg_return1(api, ret, module, INT, frequency);
return ret;
}
-static int player_disp_get_eq_band_frequency_range(Client client)
+static int player_disp_get_eq_band_frequency_range(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY_RANGE;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY_RANGE;
int index, range;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(index, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(index, muse_core_client_get_msg(module));
ret = player_audio_effect_get_equalizer_band_frequency_range((player_h) handle,
index, &range);
- player_msg_return1(api, ret, client, INT, range);
+ player_msg_return1(api, ret, module, INT, range);
return ret;
}
-static int player_disp_eq_clear(Client client)
+static int player_disp_eq_clear(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_EQUALIZER_CLEAR;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_CLEAR;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_audio_effect_equalizer_clear((player_h) handle);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_eq_is_available(Client client)
+static int player_disp_eq_is_available(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_AUDIO_EFFECT_EQUALIZER_IS_AVAILABLE;
+ muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_IS_AVAILABLE;
bool available;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_audio_effect_equalizer_is_available((player_h) handle, &available);
- player_msg_return1(api, ret, client, INT, available);
+ player_msg_return1(api, ret, module, INT, available);
return ret;
}
-static int player_disp_set_subtitle_path(Client client)
+static int player_disp_set_subtitle_path(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_SUBTITLE_PATH;
- char path[MM_URI_MAX_LENGTH] = { 0, };
+ muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_PATH;
+ char path[MUSE_URI_MAX_LENGTH] = { 0, };
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get_string(path, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get_string(path, muse_core_client_get_msg(module));
ret = player_set_subtitle_path((player_h) handle, path);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_subtitle_position_offset(Client client)
+static int player_disp_set_subtitle_position_offset(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_SUBTITLE_POSITION_OFFSET;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_POSITION_OFFSET;
int millisecond;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(millisecond, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(millisecond, muse_core_client_get_msg(module));
ret = player_set_subtitle_position_offset((player_h) handle, millisecond);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
static void _video_bin_created_cb(const char *caps, void *user_data)
{
- Client client = (Client)user_data;
- mm_player_cb_e api = MM_PLAYER_CB_EVENT;
+ muse_module_h module = (muse_module_h)user_data;
+ muse_player_cb_e api = MUSE_PLAYER_CB_EVENT;
_player_event_e ev = _PLAYER_EVENT_TYPE_VIDEO_BIN_CREATED;
LOGD("Enter");
- player_msg_event1(api, ev, client, STRING, caps);
+ player_msg_event1(api, ev, module, STRING, caps);
}
-static int player_disp_set_progressive_download_path(Client client)
+static int player_disp_set_progressive_download_path(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_PROGRESSIVE_DOWNLOAD_PATH;
- char path[MM_URI_MAX_LENGTH] = { 0, };
+ muse_player_api_e api = MUSE_PLAYER_API_SET_PROGRESSIVE_DOWNLOAD_PATH;
+ char path[MUSE_URI_MAX_LENGTH] = { 0, };
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get_string(path, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get_string(path, muse_core_client_get_msg(module));
ret = player_set_progressive_download_path((player_h) handle, path);
if(ret == PLAYER_ERROR_NONE) {
player_set_video_bin_created_cb((player_h) handle,
- _video_bin_created_cb, client);
+ _video_bin_created_cb, module);
}
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_progressive_download_status(Client client)
+static int player_disp_get_progressive_download_status(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_PROGRESSIVE_DOWNLOAD_STATUS;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_PROGRESSIVE_DOWNLOAD_STATUS;
unsigned long current = 0;
unsigned long total_size = 0;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_progressive_download_status((player_h) handle,
¤t, &total_size);
- player_msg_return2(api, ret, client, POINTER, current, POINTER, total_size);
+ player_msg_return2(api, ret, module, POINTER, current, POINTER, total_size);
return ret;
}
-static int player_disp_capture_video(Client client)
+static int player_disp_capture_video(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_CAPTURE_VIDEO;
+ muse_player_api_e api = MUSE_PLAYER_API_CAPTURE_VIDEO;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
- ret = player_capture_video((player_h) handle, _capture_video_cb, client);
+ ret = player_capture_video((player_h) handle, _capture_video_cb, module);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_streaming_cookie(Client client)
+static int player_disp_set_streaming_cookie(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_STREAMING_COOKIE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_COOKIE;
char *cookie = NULL;
int size;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(size, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(size, muse_core_client_get_msg(module));
cookie = (char *)g_try_new(char, size+1);
if(cookie) {
- player_msg_get_string(cookie, mmsvc_core_client_get_msg(client));
+ player_msg_get_string(cookie, muse_core_client_get_msg(module));
ret = player_set_streaming_cookie((player_h) handle, cookie, size);
g_free(cookie);
}
else
ret = PLAYER_ERROR_INVALID_OPERATION;
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_streaming_user_agent(Client client)
+static int player_disp_set_streaming_user_agent(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_STREAMING_USER_AGENT;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_USER_AGENT;
char *user_agent;
int size;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(size, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(size, muse_core_client_get_msg(module));
user_agent = (char *)g_try_new(char, size+1);
if(user_agent) {
- player_msg_get_string(user_agent, mmsvc_core_client_get_msg(client));
+ player_msg_get_string(user_agent, muse_core_client_get_msg(module));
ret = player_set_streaming_user_agent((player_h) handle, user_agent, size);
g_free(user_agent);
}
else
ret = PLAYER_ERROR_INVALID_OPERATION;
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_streaming_download_progress(Client client)
+static int player_disp_get_streaming_download_progress(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_STREAMING_DOWNLOAD_PROGRESS;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_STREAMING_DOWNLOAD_PROGRESS;
int start, current;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
+ handle = muse_core_ipc_get_handle(module);
ret = player_get_streaming_download_progress((player_h) handle, &start, ¤t);
- player_msg_return2(api, ret, client, INT, start, INT, current);
+ player_msg_return2(api, ret, module, INT, start, INT, current);
return ret;
}
static gpointer _player_push_media_stream_handler(gpointer param)
{
- Client client = (Client)param;
+ muse_module_h module = (muse_module_h)param;
char *buf;
push_data_q_t *qData;
player_push_media_msg_type push_media;
LOGD("Enter");
- if(!client){
+ if(!module){
LOGE("Null parameter");
return NULL;
}
data_thread_info_t *thread_i =
- (data_thread_info_t *)mmsvc_core_client_get_cust_data(client);
+ (data_thread_info_t *)muse_core_client_get_cust_data(module);
if(!thread_i){
LOGE("Null parameter");
return NULL;
push_media.mimetype = qData->mimetype;
push_media.pts = qData->pts;
push_media.size = qData->size;
- buf = mmsvc_core_ipc_get_data(client);
+ buf = muse_core_ipc_get_data(module);
if(buf) {
_push_media_stream(qData->handle, &push_media, buf);
- mmsvc_core_ipc_delete_data(buf);
+ muse_core_ipc_delete_data(buf);
}
g_free(qData);
} else {
return ret;
}
-static int player_disp_push_media_stream(Client client)
+static int player_disp_push_media_stream(muse_module_h module)
{
int ret = MEDIA_FORMAT_ERROR_NONE;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_PUSH_MEDIA_STREAM;
+ muse_player_api_e api = MUSE_PLAYER_API_PUSH_MEDIA_STREAM;
player_push_media_msg_type push_media;
char *push_media_msg = (char *)&push_media;
tbm_bo bo = NULL;
tbm_bo_handle thandle;
char *buf = NULL;
- if(!player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER) ||
- !player_msg_get_array(push_media_msg, mmsvc_core_client_get_msg(client))) {
+ handle = muse_core_ipc_get_handle(module);
+ if(!player_msg_get_array(push_media_msg, muse_core_client_get_msg(module))) {
ret = PLAYER_ERROR_INVALID_OPERATION;
goto push_media_stream_exit1;
}
ret = PLAYER_ERROR_OUT_OF_MEMORY;
goto push_media_stream_exit1;
}
- player_msg_get_array(buf, mmsvc_core_client_get_msg(client));
+ player_msg_get_array(buf, muse_core_client_get_msg(module));
} else if(push_media.buf_type == PUSH_MEDIA_BUF_TYPE_RAW) {
push_data_q_t *qData = g_new(push_data_q_t, 1);
data_thread_info_t *thread_i =
- (data_thread_info_t *)mmsvc_core_client_get_cust_data(client);
+ (data_thread_info_t *)muse_core_client_get_cust_data(module);
if(!qData) {
ret = PLAYER_ERROR_OUT_OF_MEMORY;
goto push_media_stream_exit1;
g_free(buf);
push_media_stream_exit1:
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_media_stream_info(Client client)
+static int player_disp_set_media_stream_info(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_MEDIA_STREAM_INFO;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_INFO;
media_format_mimetype_e mimetype;
player_stream_type_e type;
int width;
int bit;
media_format_h format;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(mimetype, mmsvc_core_client_get_msg(client));
- player_msg_get(type, mmsvc_core_client_get_msg(client));
- player_msg_get(avg_bps, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(mimetype, muse_core_client_get_msg(module));
+ player_msg_get(type, muse_core_client_get_msg(module));
+ player_msg_get(avg_bps, muse_core_client_get_msg(module));
if(type == PLAYER_STREAM_TYPE_VIDEO) {
- player_msg_get(width, mmsvc_core_client_get_msg(client));
- player_msg_get(height, mmsvc_core_client_get_msg(client));
- player_msg_get(max_bps, mmsvc_core_client_get_msg(client));
+ player_msg_get(width, muse_core_client_get_msg(module));
+ player_msg_get(height, muse_core_client_get_msg(module));
+ player_msg_get(max_bps, muse_core_client_get_msg(module));
} else if(type == PLAYER_STREAM_TYPE_AUDIO) {
- player_msg_get(channel, mmsvc_core_client_get_msg(client));
- player_msg_get(samplerate, mmsvc_core_client_get_msg(client));
- player_msg_get(bit, mmsvc_core_client_get_msg(client));
+ player_msg_get(channel, muse_core_client_get_msg(module));
+ player_msg_get(samplerate, muse_core_client_get_msg(module));
+ player_msg_get(bit, muse_core_client_get_msg(module));
} else {
ret = PLAYER_ERROR_INVALID_PARAMETER;
goto set_media_stream_info_exit;
ret = player_set_media_stream_info((player_h)handle, type, format);
set_media_stream_info_exit:
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_media_packet_finalize_cb(Client client)
+static int player_disp_media_packet_finalize_cb(muse_module_h module)
{
media_packet_h packet;
- player_msg_get_type(packet, mmsvc_core_client_get_msg(client), POINTER);
+ player_msg_get_type(packet, muse_core_client_get_msg(module), POINTER);
media_packet_destroy(packet);
return PLAYER_ERROR_NONE;
}
-static int player_disp_set_media_stream_buffer_max_size(Client client)
+static int player_disp_set_media_stream_buffer_max_size(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE;
player_stream_type_e type;
unsigned long long max_size;
//unsigned upper_max_size, lower_max_size;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
#if 0
- player_msg_get(upper_max_size, mmsvc_core_client_get_msg(client));
- player_msg_get(lower_max_size, mmsvc_core_client_get_msg(client));
+ player_msg_get(upper_max_size, muse_core_client_get_msg(module));
+ player_msg_get(lower_max_size, muse_core_client_get_msg(module));
max_size = (((unsigned long long)upper_max_size << 32) & 0xffffffff00000000)
| (lower_max_size & 0xffffffff);
#else
- player_msg_get_type(max_size, mmsvc_core_client_get_msg(client), INT64);
+ player_msg_get_type(max_size, muse_core_client_get_msg(module), INT64);
#endif
ret = player_set_media_stream_buffer_max_size((player_h) handle, type, max_size);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_media_stream_buffer_max_size(Client client)
+static int player_disp_get_media_stream_buffer_max_size(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MAX_SIZE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MAX_SIZE;
player_stream_type_e type;
unsigned long long max_size;
//unsigned upper_max_size, lower_max_size;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
ret = player_get_media_stream_buffer_max_size((player_h) handle, type, &max_size);
if(ret == PLAYER_ERROR_NONE) {
#if 0
upper_max_size = (unsigned)((max_size >> 32) & 0xffffffff);
lower_max_size = (unsigned)(max_size & 0xffffffff);
- player_msg_return2(api, ret, client,
+ player_msg_return2(api, ret, module,
INT, upper_max_size, INT, lower_max_size);
#else
- player_msg_return1(api, ret, client,
+ player_msg_return1(api, ret, module,
INT64, max_size);
#endif
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_media_stream_buffer_min_threshold(Client client)
+static int player_disp_set_media_stream_buffer_min_threshold(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
player_stream_type_e type;
unsigned percent;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
- player_msg_get(percent, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
+ player_msg_get(percent, muse_core_client_get_msg(module));
ret = player_set_media_stream_buffer_min_threshold((player_h) handle, type, percent);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_media_stream_buffer_min_threshold(Client client)
+static int player_disp_get_media_stream_buffer_min_threshold(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
player_stream_type_e type;
unsigned percent;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
ret = player_get_media_stream_buffer_min_threshold((player_h) handle, type, &percent);
if(ret == PLAYER_ERROR_NONE) {
- player_msg_return1(api, ret, client, INT, percent);
+ player_msg_return1(api, ret, module, INT, percent);
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_track_count(Client client)
+static int player_disp_get_track_count(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_TRACK_COUNT;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_TRACK_COUNT;
player_stream_type_e type;
int count;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
ret = player_get_track_count((player_h) handle, type, &count);
if(ret == PLAYER_ERROR_NONE) {
- player_msg_return1(api, ret, client, INT, count);
+ player_msg_return1(api, ret, module, INT, count);
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_current_track(Client client)
+static int player_disp_get_current_track(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_CURRENT_TRACK;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_CURRENT_TRACK;
player_stream_type_e type;
int index;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
ret = player_get_current_track((player_h) handle, type, &index);
if(ret == PLAYER_ERROR_NONE) {
- player_msg_return1(api, ret, client, INT, index);
+ player_msg_return1(api, ret, module, INT, index);
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_select_track(Client client)
+static int player_disp_select_track(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SELECT_TRACK;
+ muse_player_api_e api = MUSE_PLAYER_API_SELECT_TRACK;
player_stream_type_e type;
int index;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
- player_msg_get(index, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
+ player_msg_get(index, muse_core_client_get_msg(module));
ret = player_select_track((player_h) handle, type, index);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_get_track_language_code(Client client)
+static int player_disp_get_track_language_code(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_GET_TRACK_LANGUAGE_CODE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_TRACK_LANGUAGE_CODE;
player_stream_type_e type;
int index;
char *code;
const int code_len=2;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(type, mmsvc_core_client_get_msg(client));
- player_msg_get(index, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(type, muse_core_client_get_msg(module));
+ player_msg_get(index, muse_core_client_get_msg(module));
ret = player_get_track_language_code((player_h) handle, type, index, &code);
if(ret == PLAYER_ERROR_NONE) {
- player_msg_return_array(api, ret, client, code, code_len, sizeof(char));
+ player_msg_return_array(api, ret, module, code, code_len, sizeof(char));
}
else
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_pcm_extraction_mode(Client client)
+static int player_disp_set_pcm_extraction_mode(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_PCM_EXTRACTION_MODE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_PCM_EXTRACTION_MODE;
int sync;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get(sync, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get(sync, muse_core_client_get_msg(module));
ret = player_set_pcm_extraction_mode((player_h) handle,
- sync, _audio_frame_decoded_cb, client);
+ sync, _audio_frame_decoded_cb, module);
- player_msg_return(api, ret, client);
+ player_msg_return(api, ret, module);
return ret;
}
-static int player_disp_set_pcm_spec(Client client)
+static int player_disp_set_pcm_spec(muse_module_h module)
{
int ret = -1;
intptr_t handle;
- mm_player_api_e api = MM_PLAYER_API_SET_PCM_SPEC;
- char format[MM_URI_MAX_LENGTH] = { 0, };
+ muse_player_api_e api = MUSE_PLAYER_API_SET_PCM_SPEC;
+ char format[MUSE_URI_MAX_LENGTH] = { 0, };
int samplerate;
int channel;
- player_msg_get_type(handle, mmsvc_core_client_get_msg(client), POINTER);
- player_msg_get_string(format, mmsvc_core_client_get_msg(client));
- player_msg_get(samplerate, mmsvc_core_client_get_msg(client));
- player_msg_get(channel, mmsvc_core_client_get_msg(client));
+ handle = muse_core_ipc_get_handle(module);
+ player_msg_get_string(format, muse_core_client_get_msg(module));
+ player_msg_get(samplerate, muse_core_client_get_msg(module));
+ player_msg_get(channel, muse_core_client_get_msg(module));
ret = player_set_pcm_spec((player_h)handle, format, samplerate, channel);
- player_msg_return(api, ret, client);
-
- return ret;
-}
-
-int (*dispatcher[MM_PLAYER_API_MAX]) (Client client) = {
- player_disp_create, /* MM_PLAYER_API_CREATE */
- player_disp_destroy, /* MM_PLAYER_API_DESTROY */
- player_disp_prepare, /* MM_PLAYER_API_PREPARE */
- player_disp_prepare_async, /* MM_PLAYER_API_PREPARE_ASYNC */
- player_disp_unprepare, /* MM_PLAYER_API_UNPREPARE */
- player_disp_set_uri, /* MM_PLAYER_API_SET_URI */
- player_disp_start, /* MM_PLAYER_API_START */
- player_disp_stop, /* MM_PLAYER_API_STOP */
- player_disp_pause, /* MM_PLAYER_API_PAUSE */
- player_disp_set_memory_buffer, /* MM_PLAYER_API_SET_MEMORY_BUFFER */
- player_disp_deinit_memory_buffer, /* MM_PLAYER_API_DEINIT_MEMORY_BUFFER */
- player_disp_get_state, /* MM_PLAYER_API_GET_STATE */
- player_disp_set_volume, /* MM_PLAYER_API_SET_VOLUME */
- player_disp_get_volume, /* MM_PLAYER_API_GET_VOLUME */
- player_disp_set_sound_type, /* MM_PLAYER_API_SET_SOUND_TYPE */
-#ifndef USE_ASM
- player_disp_set_audio_policy_info, /* MM_PLAYER_API_SET_AUDIO_POLICY_INFO */
-#endif
- player_disp_set_latency_mode, /* MM_PLAYER_API_SET_AUDIO_LATENCY_MODE */
- player_disp_get_latency_mode, /* MM_PLAYER_API_GET_AUDIO_LATENCY_MODE */
- player_disp_set_play_position, /* MM_PLAYER_API_SET_PLAY_POSITION */
- player_disp_get_play_position, /* MM_PLAYER_API_GET_PLAY_POSITION */
- player_disp_set_mute, /* MM_PLAYER_API_SET_MUTE */
- player_disp_is_muted, /* MM_PLAYER_API_IS_MUTED */
- player_disp_set_looping, /* MM_PLAYER_API_SET_LOOPING */
- player_disp_is_looping, /* MM_PLAYER_API_IS_LOOPING */
- player_disp_get_duration, /* MM_PLAYER_API_GET_DURATION */
- player_disp_set_display, /* MM_PLAYER_API_SET_DISPLAY */
- player_disp_set_display_mode, /* MM_PLAYER_API_SET_DISPLAY_MODE */
- player_disp_get_display_mode, /* MM_PLAYER_API_GET_DISPLAY_MODE */
- player_disp_set_playback_rate, /* MM_PLAYER_API_SET_PLAYBACK_RATE */
- player_disp_set_display_rotation, /* MM_PLAYER_API_SET_DISPLAY_ROTATION */
- player_disp_get_display_rotation, /* MM_PLAYER_API_GET_DISPLAY_ROTATION */
- player_disp_set_display_visible, /* MM_PLAYER_API_SET_DISPLAY_VISIBLE */
- player_disp_is_display_visible, /* MM_PLAYER_API_IS_DISPLAY_VISIBLE */
- player_disp_get_content_info, /* MM_PLAYER_API_GET_CONTENT_INFO */
- player_disp_get_codec_info, /* MM_PLAYER_API_GET_CODEC_INFO */
- player_disp_get_audio_stream_info, /* MM_PLAYER_API_GET_AUDIO_STREAM_INFO */
- player_disp_get_video_stream_info, /* MM_PLAYER_API_GET_VIDEO_STREAM_INFO */
- player_disp_get_video_size, /* MM_PLAYER_API_GET_VIDEO_SIZE */
- player_disp_get_album_art, /* MM_PLAYER_API_GET_ALBUM_ART */
- player_disp_get_eq_bands_count, /* MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BANDS_COUNT */
- player_disp_set_eq_all_bands, /* MM_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_ALL_BANDS */
- player_disp_set_eq_band_level, /* MM_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_BAND_LEVEL */
- player_disp_get_eq_band_level, /* MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_LEVEL */
- player_disp_get_eq_level_range, /* MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_LEVEL_RANGE */
- player_disp_get_eq_band_frequency, /* MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY */
- player_disp_get_eq_band_frequency_range, /* MM_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY_RANGE */
- player_disp_eq_clear, /* MM_PLAYER_API_AUDIO_EFFECT_EQUALIZER_CLEAR */
- player_disp_eq_is_available, /* MM_PLAYER_API_AUDIO_EFFECT_EQUALIZER_IS_AVAILABLE */
- player_disp_set_progressive_download_path, /* MM_PLAYER_API_SET_PROGRESSIVE_DOWNLOAD_PATH */
- player_disp_get_progressive_download_status, /* MM_PLAYER_API_GET_PROGRESSIVE_DOWNLOAD_STATUS */
- player_disp_capture_video, /* MM_PLAYER_API_CAPTURE_VIDEO */
- player_disp_set_streaming_cookie, /* MM_PLAYER_API_SET_STREAMING_COOKIE */
- player_disp_set_streaming_user_agent, /* MM_PLAYER_API_SET_STREAMING_USER_AGENT */
- player_disp_get_streaming_download_progress, /* MM_PLAYER_API_GET_STREAMING_DOWNLOAD_PROGRESS */
- player_disp_set_subtitle_path, /* MM_PLAYER_API_SET_SUBTITLE_PATH */
- player_disp_set_subtitle_position_offset, /* MM_PLAYER_API_SET_SUBTITLE_POSITION_OFFSET */
- player_disp_push_media_stream, /* MM_PLAYER_API_PUSH_MEDIA_STREAM */
- player_disp_set_media_stream_info, /* MM_PLAYER_API_SET_MEDIA_STREAM_INFO */
- player_disp_set_callback, /* MM_PLAYER_API_SET_CALLBACK */
- player_disp_media_packet_finalize_cb, /* MM_PLAYER_API_MEDIA_PACKET_FINALIZE_CB */
- player_disp_set_media_stream_buffer_max_size, /* MM_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE */
- player_disp_get_media_stream_buffer_max_size, /* MM_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MAX_SIZE */
- player_disp_set_media_stream_buffer_min_threshold, /* MM_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD */
- player_disp_get_media_stream_buffer_min_threshold, /* MM_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD */
- player_disp_get_track_count, /* MM_PLAYER_API_GET_TRACK_COUNT */
- player_disp_get_current_track, /* MM_PLAYER_API_GET_CURRENT_TRACK */
- player_disp_select_track, /* MM_PLAYER_API_SELECT_TRACK */
- player_disp_get_track_language_code, /* MM_PLAYER_API_GET_TRACK_LANGUAGE_CODE */
- player_disp_set_pcm_extraction_mode, /* MM_PLAYER_API_SET_PCM_EXTRACTION_MODE */
- player_disp_set_pcm_spec, /* MM_PLAYER_API_SET_PCM_SPEC */
+ player_msg_return(api, ret, module);
+
+ return ret;
+}
+
+int (*dispatcher[MUSE_PLAYER_API_MAX]) (muse_module_h module) = {
+ player_disp_create, /* MUSE_PLAYER_API_CREATE */
+ player_disp_destroy, /* MUSE_PLAYER_API_DESTROY */
+ player_disp_prepare, /* MUSE_PLAYER_API_PREPARE */
+ player_disp_prepare_async, /* MUSE_PLAYER_API_PREPARE_ASYNC */
+ player_disp_unprepare, /* MUSE_PLAYER_API_UNPREPARE */
+ player_disp_set_uri, /* MUSE_PLAYER_API_SET_URI */
+ player_disp_start, /* MUSE_PLAYER_API_START */
+ player_disp_stop, /* MUSE_PLAYER_API_STOP */
+ player_disp_pause, /* MUSE_PLAYER_API_PAUSE */
+ player_disp_set_memory_buffer, /* MUSE_PLAYER_API_SET_MEMORY_BUFFER */
+ player_disp_deinit_memory_buffer, /* MUSE_PLAYER_API_DEINIT_MEMORY_BUFFER */
+ player_disp_get_state, /* MUSE_PLAYER_API_GET_STATE */
+ player_disp_set_volume, /* MUSE_PLAYER_API_SET_VOLUME */
+ player_disp_get_volume, /* MUSE_PLAYER_API_GET_VOLUME */
+ player_disp_set_sound_type, /* MUSE_PLAYER_API_SET_SOUND_TYPE */
+ player_disp_set_audio_policy_info, /* MUSE_PLAYER_API_SET_AUDIO_POLICY_INFO */
+ player_disp_set_latency_mode, /* MUSE_PLAYER_API_SET_AUDIO_LATENCY_MODE */
+ player_disp_get_latency_mode, /* MUSE_PLAYER_API_GET_AUDIO_LATENCY_MODE */
+ player_disp_set_play_position, /* MUSE_PLAYER_API_SET_PLAY_POSITION */
+ player_disp_get_play_position, /* MUSE_PLAYER_API_GET_PLAY_POSITION */
+ player_disp_set_mute, /* MUSE_PLAYER_API_SET_MUTE */
+ player_disp_is_muted, /* MUSE_PLAYER_API_IS_MUTED */
+ player_disp_set_looping, /* MUSE_PLAYER_API_SET_LOOPING */
+ player_disp_is_looping, /* MUSE_PLAYER_API_IS_LOOPING */
+ player_disp_get_duration, /* MUSE_PLAYER_API_GET_DURATION */
+ player_disp_set_display, /* MUSE_PLAYER_API_SET_DISPLAY */
+ player_disp_set_display_mode, /* MUSE_PLAYER_API_SET_DISPLAY_MODE */
+ player_disp_get_display_mode, /* MUSE_PLAYER_API_GET_DISPLAY_MODE */
+ player_disp_set_playback_rate, /* MUSE_PLAYER_API_SET_PLAYBACK_RATE */
+ player_disp_set_display_rotation, /* MUSE_PLAYER_API_SET_DISPLAY_ROTATION */
+ player_disp_get_display_rotation, /* MUSE_PLAYER_API_GET_DISPLAY_ROTATION */
+ player_disp_set_display_visible, /* MUSE_PLAYER_API_SET_DISPLAY_VISIBLE */
+ player_disp_is_display_visible, /* MUSE_PLAYER_API_IS_DISPLAY_VISIBLE */
+ player_disp_get_content_info, /* MUSE_PLAYER_API_GET_CONTENT_INFO */
+ player_disp_get_codec_info, /* MUSE_PLAYER_API_GET_CODEC_INFO */
+ player_disp_get_audio_stream_info, /* MUSE_PLAYER_API_GET_AUDIO_STREAM_INFO */
+ player_disp_get_video_stream_info, /* MUSE_PLAYER_API_GET_VIDEO_STREAM_INFO */
+ player_disp_get_video_size, /* MUSE_PLAYER_API_GET_VIDEO_SIZE */
+ player_disp_get_album_art, /* MUSE_PLAYER_API_GET_ALBUM_ART */
+ player_disp_get_eq_bands_count, /* MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BANDS_COUNT */
+ player_disp_set_eq_all_bands, /* MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_ALL_BANDS */
+ player_disp_set_eq_band_level, /* MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_BAND_LEVEL */
+ player_disp_get_eq_band_level, /* MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_LEVEL */
+ player_disp_get_eq_level_range, /* MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_LEVEL_RANGE */
+ player_disp_get_eq_band_frequency, /* MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY */
+ player_disp_get_eq_band_frequency_range, /* MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY_RANGE */
+ player_disp_eq_clear, /* MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_CLEAR */
+ player_disp_eq_is_available, /* MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_IS_AVAILABLE */
+ player_disp_set_progressive_download_path, /* MUSE_PLAYER_API_SET_PROGRESSIVE_DOWNLOAD_PATH */
+ player_disp_get_progressive_download_status, /* MUSE_PLAYER_API_GET_PROGRESSIVE_DOWNLOAD_STATUS */
+ player_disp_capture_video, /* MUSE_PLAYER_API_CAPTURE_VIDEO */
+ player_disp_set_streaming_cookie, /* MUSE_PLAYER_API_SET_STREAMING_COOKIE */
+ player_disp_set_streaming_user_agent, /* MUSE_PLAYER_API_SET_STREAMING_USER_AGENT */
+ player_disp_get_streaming_download_progress, /* MUSE_PLAYER_API_GET_STREAMING_DOWNLOAD_PROGRESS */
+ player_disp_set_subtitle_path, /* MUSE_PLAYER_API_SET_SUBTITLE_PATH */
+ player_disp_set_subtitle_position_offset, /* MUSE_PLAYER_API_SET_SUBTITLE_POSITION_OFFSET */
+ player_disp_push_media_stream, /* MUSE_PLAYER_API_PUSH_MEDIA_STREAM */
+ player_disp_set_media_stream_info, /* MUSE_PLAYER_API_SET_MEDIA_STREAM_INFO */
+ player_disp_set_callback, /* MUSE_PLAYER_API_SET_CALLBACK */
+ player_disp_media_packet_finalize_cb, /* MUSE_PLAYER_API_MEDIA_PACKET_FINALIZE_CB */
+ player_disp_set_media_stream_buffer_max_size, /* MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE */
+ player_disp_get_media_stream_buffer_max_size, /* MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MAX_SIZE */
+ player_disp_set_media_stream_buffer_min_threshold, /* MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD */
+ player_disp_get_media_stream_buffer_min_threshold, /* MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD */
+ player_disp_get_track_count, /* MUSE_PLAYER_API_GET_TRACK_COUNT */
+ player_disp_get_current_track, /* MUSE_PLAYER_API_GET_CURRENT_TRACK */
+ player_disp_select_track, /* MUSE_PLAYER_API_SELECT_TRACK */
+ player_disp_get_track_language_code, /* MUSE_PLAYER_API_GET_TRACK_LANGUAGE_CODE */
+ player_disp_set_pcm_extraction_mode, /* MUSE_PLAYER_API_SET_PCM_EXTRACTION_MODE */
+ player_disp_set_pcm_spec, /* MUSE_PLAYER_API_SET_PCM_SPEC */
};