/*
* Internal Implementation
*/
-static int _player_deinit_memory_buffer(player_cli_s *pc);
+static int _player_deinit_memory_buffer(player_cli_s * pc);
int _player_media_packet_finalize(media_packet_h pkt, int error_code, void *user_data)
{
int ret = 0;
tbm_surface_h tsurf = NULL;
muse_player_api_e api = MUSE_PLAYER_API_MEDIA_PACKET_FINALIZE_CB;
- _media_pkt_fin_data *fin_data = (_media_pkt_fin_data *)user_data;
+ _media_pkt_fin_data *fin_data = (_media_pkt_fin_data *) user_data;
intptr_t packet;
char *sndMsg;
return ret;
}
-static void *_get_mem(player_cli_s *player, int size)
+static void *_get_mem(player_cli_s * player, int size)
{
player_data_s *mem = g_new(player_data_s, sizeof(player_data_s));
if (mem) {
return NULL;
}
-static void _del_mem(player_cli_s *player)
+static void _del_mem(player_cli_s * player)
{
player_data_s *mem;
while (player->head) {
}
}
-static int player_recv_msg(callback_cb_info_s *cb_info, int len)
+static int player_recv_msg(callback_cb_info_s * cb_info, int len)
{
int recvLen;
msg_buff_s *buff = &cb_info->buff;
return len;
}
-static void set_null_user_cb(callback_cb_info_s *cb_info, muse_player_event_e event)
+static void set_null_user_cb(callback_cb_info_s * cb_info, muse_player_event_e event)
{
if (cb_info && event < MUSE_PLAYER_EVENT_TYPE_NUM) {
cb_info->user_cb[event] = NULL;
}
}
-static void set_null_user_cb_lock(callback_cb_info_s *cb_info, muse_player_event_e event)
+static void set_null_user_cb_lock(callback_cb_info_s * cb_info, muse_player_event_e event)
{
bool lock = g_thread_self() != cb_info->event_queue.thread;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
int set = 1;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
int set = 0;
return ret;
}
-static void __prepare_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __prepare_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_PREPARE;
- ((player_prepared_cb)cb_info->user_cb[ev])(cb_info->user_data[ev]);
+ ((player_prepared_cb) cb_info->user_cb[ev]) (cb_info->user_data[ev]);
set_null_user_cb(cb_info, ev);
}
-static void __complete_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __complete_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_COMPLETE;
- ((player_completed_cb)cb_info->user_cb[ev])(cb_info->user_data[ev]);
+ ((player_completed_cb) cb_info->user_cb[ev]) (cb_info->user_data[ev]);
}
-static void __interrupt_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __interrupt_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
int code;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_INTERRUPT;
if (player_msg_get(code, recvMsg))
- ((player_interrupted_cb)cb_info->user_cb[ev])(code, cb_info->user_data[ev]);
+ ((player_interrupted_cb) cb_info->user_cb[ev]) (code, cb_info->user_data[ev]);
}
-static void __error_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __error_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
int code;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_ERROR;
if (player_msg_get(code, recvMsg))
- ((player_error_cb)cb_info->user_cb[ev])(code, cb_info->user_data[ev]);
+ ((player_error_cb) cb_info->user_cb[ev]) (code, cb_info->user_data[ev]);
}
-static void __buffering_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __buffering_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
int percent;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_BUFFERING;
if (player_msg_get(percent, recvMsg))
- ((player_buffering_cb)cb_info->user_cb[ev])(percent, cb_info->user_data[ev]);
+ ((player_buffering_cb) cb_info->user_cb[ev]) (percent, cb_info->user_data[ev]);
}
-static void __subtitle_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __subtitle_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
int duration = 0;
char text[MUSE_URI_MAX_LENGTH] = { 0, };
if (player_msg_get(duration, recvMsg)
&& player_msg_get_string(text, recvMsg)) {
- ((player_subtitle_updated_cb)cb_info->user_cb[ev])(duration, text, cb_info->user_data[ev]);
+ ((player_subtitle_updated_cb) cb_info->user_cb[ev]) (duration, text, cb_info->user_data[ev]);
}
}
-static void __capture_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __capture_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
unsigned char *data = NULL;
int width = 0;
data = g_new(unsigned char, size);
if (data) {
memcpy(data, thandle.ptr, size);
- ((player_video_captured_cb)cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_CAPTURE])(data, width, height, size, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_CAPTURE]);
+ ((player_video_captured_cb) cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_CAPTURE]) (data, width, height, size, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_CAPTURE]);
g_free(data);
} else
LOGE("g_new failure");
*((char *)thandle.ptr + size) = 0;
tbm_bo_unmap(bo);
-capture_event_exit2:
+ capture_event_exit2:
tbm_bo_unref(bo);
}
-capture_event_exit1:
+ capture_event_exit1:
set_null_user_cb(cb_info, MUSE_PLAYER_EVENT_TYPE_CAPTURE);
}
-static void __seek_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __seek_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_SEEK;
- ((player_seek_completed_cb)cb_info->user_cb[ev])(cb_info->user_data[ev]);
+ ((player_seek_completed_cb) cb_info->user_cb[ev]) (cb_info->user_data[ev]);
set_null_user_cb(cb_info, ev);
}
-static void __media_packet_video_frame_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __media_packet_video_frame_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
tbm_bo bo[4] = { NULL, };
tbm_key key[4] = { 0, };
fin_data = g_new(_media_pkt_fin_data, 1);
fin_data->remote_pkt = packet;
fin_data->cb_info = cb_info;
- ret = media_packet_create_from_tbm_surface(cb_info->pkt_fmt, tsurf, (media_packet_finalize_cb)_player_media_packet_finalize, (void *)fin_data, &pkt);
+ ret = media_packet_create_from_tbm_surface(cb_info->pkt_fmt, tsurf, (media_packet_finalize_cb) _player_media_packet_finalize, (void *)fin_data, &pkt);
if (ret != MEDIA_PACKET_ERROR_NONE) {
LOGE("media_packet_create_from_tbm_surface failed");
tbm_surface_destroy(tsurf);
}
if (pkt) {
if (pts != 0) {
- ret = media_packet_set_pts(pkt, (uint64_t)pts);
+ ret = media_packet_set_pts(pkt, (uint64_t) pts);
if (ret != MEDIA_PACKET_ERROR_NONE)
LOGE("media_packet_set_pts failed");
}
/* call media packet callback */
- ((player_media_packet_video_decoded_cb)cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME])(pkt, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME]);
+ ((player_media_packet_video_decoded_cb) cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME]) (pkt, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME]);
}
for (i = 0; i < bo_num; i++) {
if (bo[i])
}
}
-static void __audio_frame_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __audio_frame_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
unsigned char *data = NULL;
unsigned int size = 0;
audio.data = data;
audio.size = size;
LOGD("user callback data %p, size %d", audio.data, audio.size);
- ((player_audio_pcm_extraction_cb)cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME])(&audio, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME]);
+ ((player_audio_pcm_extraction_cb) cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME]) (&audio, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME]);
g_free(data);
} else
LOGE("g_new failure");
}
}
-static void __video_frame_render_error_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __video_frame_render_error_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
}
-static void __pd_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __pd_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
int type;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_PD;
if (player_msg_get(type, recvMsg))
- ((player_pd_message_cb)cb_info->user_cb[ev])(type, cb_info->user_data[ev]);
+ ((player_pd_message_cb) cb_info->user_cb[ev]) (type, cb_info->user_data[ev]);
}
-static void __supported_audio_effect_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __supported_audio_effect_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
}
-static void __supported_audio_effect_freset_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __supported_audio_effect_freset_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
}
-static void __missed_plugin_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __missed_plugin_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
}
-static void __media_stream_video_buffer_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __media_stream_video_buffer_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
/* player_media_stream_buffer_status_e status; */
int status;
if (player_msg_get(status, recvMsg)) {
((player_media_stream_buffer_status_cb)
- cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS])((player_media_stream_buffer_status_e)status, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS]);
+ cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS]) ((player_media_stream_buffer_status_e) status, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS]);
}
}
-static void __media_stream_audio_buffer_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __media_stream_audio_buffer_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
/* player_media_stream_buffer_status_e status; */
int status;
if (player_msg_get(status, recvMsg)) {
((player_media_stream_buffer_status_cb)
cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS])
- ((player_media_stream_buffer_status_e)status, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS]);
+ ((player_media_stream_buffer_status_e) status, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS]);
}
}
-static void __media_stream_video_buffer_cb_handler_ex(callback_cb_info_s *cb_info, char *recvMsg)
+static void __media_stream_video_buffer_cb_handler_ex(callback_cb_info_s * cb_info, char *recvMsg)
{
/* player_media_stream_buffer_status_e status; */
int status;
if (player_msg_get(status, recvMsg) && player_msg_get_type(bytes, recvMsg, INT64)) {
((player_media_stream_buffer_status_cb_ex)
cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS_WITH_INFO])
- ((player_media_stream_buffer_status_e)status, bytes, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS_WITH_INFO]);
+ ((player_media_stream_buffer_status_e) status, bytes, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS_WITH_INFO]);
}
}
-static void __media_stream_audio_buffer_cb_handler_ex(callback_cb_info_s *cb_info, char *recvMsg)
+static void __media_stream_audio_buffer_cb_handler_ex(callback_cb_info_s * cb_info, char *recvMsg)
{
/* player_media_stream_buffer_status_e status; */
int status;
if (player_msg_get(status, recvMsg) && player_msg_get_type(bytes, recvMsg, INT64)) {
((player_media_stream_buffer_status_cb_ex)
cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS_WITH_INFO])
- ((player_media_stream_buffer_status_e)status, bytes, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS_WITH_INFO]);
+ ((player_media_stream_buffer_status_e) status, bytes, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS_WITH_INFO]);
}
}
-static void __media_stream_video_seek_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __media_stream_video_seek_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
unsigned long long offset;
}
}
-static void __media_stream_audio_seek_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __media_stream_audio_seek_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
unsigned long long offset;
}
}
-static void __video_stream_changed_cb_handler(callback_cb_info_s *cb_info, char *recvMsg)
+static void __video_stream_changed_cb_handler(callback_cb_info_s * cb_info, char *recvMsg)
{
int width;
int height;
&& player_msg_get(height, recvMsg)
&& player_msg_get(fps, recvMsg)
&& player_msg_get(bit_rate, recvMsg)) {
- ((player_video_stream_changed_cb)cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED])
+ ((player_video_stream_changed_cb) cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED])
(width, height, fps, bit_rate, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED]);
}
}
-static void (*_user_callbacks[MUSE_PLAYER_EVENT_TYPE_NUM])(callback_cb_info_s *cb_info, char *recvMsg) = {
- __prepare_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_PREPARE */
+static void (*_user_callbacks[MUSE_PLAYER_EVENT_TYPE_NUM]) (callback_cb_info_s * cb_info, char *recvMsg) = {
+ __prepare_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_PREPARE */
__complete_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_COMPLETE */
__interrupt_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_INTERRUPT */
- __error_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_ERROR */
+ __error_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_ERROR */
__buffering_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_BUFFERING */
__subtitle_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_SUBTITLE */
__capture_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_CAPTURE */
- __seek_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_SEEK*/
+ __seek_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_SEEK */
__media_packet_video_frame_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME */
__audio_frame_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME */
__video_frame_render_error_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_VIDEO_FRAME_RENDER_ERROR */
- __pd_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_PD */
+ __pd_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_PD */
__supported_audio_effect_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT */
__supported_audio_effect_freset_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_SUPPORTED_AUDIO_EFFECT_PRESET */
__missed_plugin_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_MISSED_PLUGIN */
__media_stream_video_seek_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_SEEK */
__media_stream_audio_seek_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_SEEK */
NULL, /* MUSE_PLAYER_EVENT_TYPE_AUDIO_STREAM_CHANGED */
- __video_stream_changed_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED */
+ __video_stream_changed_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED */
};
-static void _player_event_job_function(_player_cb_data *data)
+static void _player_event_job_function(_player_cb_data * data)
{
muse_player_event_e ev = data->int_data;
if (data->cb_info->user_cb[ev])
while (1) {
g_mutex_lock(&ev->qlock);
- event_data = (_player_cb_data *)g_queue_pop_head(ev->queue);
+ event_data = (_player_cb_data *) g_queue_pop_head(ev->queue);
g_mutex_unlock(&ev->qlock);
if (event_data)
_player_event_job_function(event_data);
return NULL;
}
-static gboolean _player_event_queue_new(callback_cb_info_s *cb_info)
+static gboolean _player_event_queue_new(callback_cb_info_s * cb_info)
{
g_return_val_if_fail(cb_info, FALSE);
player_event_queue *ev = &cb_info->event_queue;
g_mutex_init(&ev->mutex);
g_cond_init(&ev->cond);
ev->running = TRUE;
- ev->thread = g_thread_new("cb_event_thread", _player_event_queue_loop, (gpointer)cb_info);
+ ev->thread = g_thread_new("cb_event_thread", _player_event_queue_loop, (gpointer) cb_info);
g_return_val_if_fail(ev->thread, FALSE);
LOGI("event queue thread %p", ev->thread);
}
-static void _player_event_queue_destroy(callback_cb_info_s *cb_info)
+static void _player_event_queue_destroy(callback_cb_info_s * cb_info)
{
g_return_if_fail(cb_info);
player_event_queue *ev = &cb_info->event_queue;
g_thread_unref(ev->thread);
while (!g_queue_is_empty(ev->queue)) {
- event_data = (_player_cb_data *)g_queue_pop_head(ev->queue);
+ event_data = (_player_cb_data *) g_queue_pop_head(ev->queue);
if (event_data) {
g_free(event_data->buf);
g_free(event_data);
}
-static void _player_event_queue_add(player_event_queue *ev, _player_cb_data *data)
+static void _player_event_queue_add(player_event_queue * ev, _player_cb_data * data)
{
if (ev->running) {
g_mutex_lock(&ev->qlock);
- g_queue_push_tail(ev->queue, (gpointer)data);
+ g_queue_push_tail(ev->queue, (gpointer) data);
g_mutex_unlock(&ev->qlock);
g_cond_signal(&ev->cond);
}
}
-static void _user_callback_handler(callback_cb_info_s *cb_info, muse_player_event_e event, char *buffer)
+static void _user_callback_handler(callback_cb_info_s * cb_info, muse_player_event_e event, char *buffer)
{
LOGD("get event %d", event);
}
}
-static void _add_ret_msg(muse_player_api_e api, callback_cb_info_s *cb_info, int offset, int parse_len)
+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;
ret_msg_s *last = cb_info->buff.retMsgHead;
LOGE("g_new failure");
}
-static ret_msg_s *_get_ret_msg(muse_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;
return NULL;
}
-static void _notify_disconnected(callback_cb_info_s *cb_info)
+static void _notify_disconnected(callback_cb_info_s * cb_info)
{
int code = PLAYER_ERROR_SERVICE_DISCONNECTED;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_ERROR;
g_atomic_int_set(&cb_info->running, 1);
cb_info->fd = sockfd;
- cb_info->thread = g_thread_new("callback_thread", client_cb_handler, (gpointer)cb_info);
+ cb_info->thread = g_thread_new("callback_thread", client_cb_handler, (gpointer) cb_info);
return cb_info;
}
-static void callback_destroy(callback_cb_info_s *cb_info)
+static void callback_destroy(callback_cb_info_s * cb_info)
{
int i;
g_return_if_fail(cb_info);
g_free(cb_info);
}
-int client_get_api_timeout(player_cli_s *pc, muse_player_api_e api)
+int client_get_api_timeout(player_cli_s * pc, muse_player_api_e api)
{
int timeout = 0;
return timeout;
}
-int client_wait_for_cb_return(muse_player_api_e api, callback_cb_info_s *cb_info, char **ret_buf, int time_out)
+int client_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;
gint64 end_time = g_get_monotonic_time() + time_out * G_TIME_SPAN_SECOND;
* Public Implementation
*/
-int player_create(player_h *player)
+int player_create(player_h * player)
{
PLAYER_INSTANCE_CHECK(player);
ret = client_wait_for_cb_return(api, pc->cb_info, &ret_buf, CALLBACK_TIME_OUT);
if (ret == PLAYER_ERROR_NONE) {
intptr_t module_addr;
- *player = (player_h)pc;
+ *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);
}
- SERVER_TIMEOUT(pc) = MAX_SERVER_TIME_OUT; /* will be update after prepare phase. */
+ SERVER_TIMEOUT(pc) = MAX_SERVER_TIME_OUT; /* will be update after prepare phase. */
} else
goto ErrorExit;
g_free(ret_buf);
return ret;
-ErrorExit:
+ ErrorExit:
if (pc && pc->cb_info) {
if (pc->cb_info->event_queue.running)
_player_event_queue_destroy(pc->cb_info);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_DESTROY;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
player_msg_send(api, pc, ret_buf, ret);
- if(player_unset_evas_object_cb(player) != MM_ERROR_NONE)
+ if (player_unset_evas_object_cb(player) != MM_ERROR_NONE)
LOGW("fail to unset evas object callback");
if (CALLBACK_INFO(pc)) {
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PREPARE_ASYNC;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PREPARE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_UNPREPARE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(uri);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_URI;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(data);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEMORY_BUFFER;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
tbm_bo bo;
tbm_bo_handle thandle;
if (ret == PLAYER_ERROR_NONE) {
intptr_t bo_addr = 0;
if (player_msg_get_type(bo_addr, ret_buf, POINTER))
- SERVER_TBM_BO(pc) = (intptr_t)bo_addr;
+ SERVER_TBM_BO(pc) = (intptr_t) bo_addr;
}
g_free(ret_buf);
return ret;
}
-static int _player_deinit_memory_buffer(player_cli_s *pc)
+static int _player_deinit_memory_buffer(player_cli_s * pc)
{
PLAYER_INSTANCE_CHECK(pc);
int ret = PLAYER_ERROR_NONE;
return ret;
}
-int player_get_state(player_h player, player_state_e *pstate)
+int player_get_state(player_h player, player_state_e * pstate)
{
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pstate);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_STATE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
int state;
char *ret_buf = NULL;
PLAYER_CHECK_CONDITION(right >= 0 && right <= 1.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_VOLUME;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(pright);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_VOLUME;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
double left = -1;
double right = -1;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_SOUND_TYPE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_POLICY_INFO;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
/* check if stream_info is valid */
int ret = __player_convert_error_code(
- sound_manager_is_available_stream_information(
- stream_info, NATIVE_API_PLAYER, &is_available), (char *)__FUNCTION__);
+ sound_manager_is_available_stream_information(
+ stream_info, NATIVE_API_PLAYER, &is_available), (char *)__FUNCTION__);
if (ret == PLAYER_ERROR_NONE) {
if (is_available == false)
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_LATENCY_MODE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
return ret;
}
-int player_get_audio_latency_mode(player_h player, audio_latency_mode_e *platency_mode)
+int player_get_audio_latency_mode(player_h player, audio_latency_mode_e * platency_mode)
{
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(platency_mode);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_AUDIO_LATENCY_MODE;
- player_cli_s *pc = (player_cli_s *)player;
+ 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;
muse_player_api_e api = MUSE_PLAYER_API_START;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
- if (INT_HANDLE(pc))
- {
+ if (INT_HANDLE(pc)) {
ret = player_update_video_param(INT_HANDLE(pc));
if (ret != PLAYER_ERROR_NONE)
return ret;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_STOP;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_PAUSE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_PLAY_POSITION;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int pos = millisecond;
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_PLAY_POSITION;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
int pos;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_MUTE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int mute = (int)muted;
PLAYER_NULL_ARG_CHECK(muted);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_IS_MUTED;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int mute = -1;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_LOOPING;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
return ret;
}
-int player_is_looping(player_h player, bool *plooping)
+int player_is_looping(player_h player, bool * plooping)
{
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(plooping);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_IS_LOOPING;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int looping = 0;
PLAYER_NULL_ARG_CHECK(pduration);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_DURATION;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int duration = 0;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
Evas_Object *obj = NULL;
const char *object_type = NULL;
LOGD("ENTER");
if (type != PLAYER_DISPLAY_TYPE_NONE) {
- obj = (Evas_Object *)display;
+ obj = (Evas_Object *) display;
if (!obj)
return PLAYER_ERROR_INVALID_PARAMETER;
evas_object_geometry_get(obj, &wl_win.wl_window_x, &wl_win.wl_window_y, &wl_win.wl_window_width, &wl_win.wl_window_height);
- if(player_set_evas_object_cb(player, obj) != MM_ERROR_NONE){
+ if (player_set_evas_object_cb(player, obj) != MM_ERROR_NONE) {
LOGW("fail to set evas object callback");
}
wl_window = elm_win_wl_window_get(obj);
- wl_surface = (struct wl_surface *) ecore_wl_window_surface_get(wl_window);
+ wl_surface = (struct wl_surface *)ecore_wl_window_surface_get(wl_window);
/* get wl_display */
- wl_display = (struct wl_display *) ecore_wl_display_get();
+ wl_display = (struct wl_display *)ecore_wl_display_get();
if (!pc->wlclient) {
ret = _wlclient_create(&pc->wlclient);
- if ( ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE) {
LOGE("Wayland client create failure");
return ret;
}
}
- if (wl_surface && wl_display){
- LOGD ("surface = %p, wl_display = %p", wl_surface, wl_display);
- wl_surface_id = _wlclient_get_wl_window_wl_surface_id (pc->wlclient, wl_surface, wl_display);
- LOGD ("wl_surface_id = %d", wl_surface_id);
+ if (wl_surface && wl_display) {
+ LOGD("surface = %p, wl_display = %p", wl_surface, wl_display);
+ wl_surface_id = _wlclient_get_wl_window_wl_surface_id(pc->wlclient, wl_surface, wl_display);
+ LOGD("wl_surface_id = %d", wl_surface_id);
wl_win.wl_surface_id = wl_surface_id;
- LOGD ("wl_win.wl_surface_id = %d", wl_win.wl_surface_id);
+ LOGD("wl_win.wl_surface_id = %d", wl_win.wl_surface_id);
}
if (pc->wlclient) {
g_free(pc->wlclient);
evas_object_geometry_get(obj, &wl_win.wl_window_x, &wl_win.wl_window_y,
&wl_win.wl_window_width, &wl_win.wl_window_height);
- if(INT_HANDLE(pc)) {
+ if (INT_HANDLE(pc)) {
LOGW("evas client already exists");
if (player_unset_evas_info(INT_HANDLE(pc)) != MM_ERROR_NONE)
LOGW("fail to unset evas client");
}
- if(player_set_evas_info(&INT_HANDLE(pc), obj) != MM_ERROR_NONE) {
+ if (player_set_evas_info(&INT_HANDLE(pc), obj) != MM_ERROR_NONE) {
LOGW("fail to set evas client");
}
- if(player_set_media_packet_video_frame_decoded_cb(player, decoded_callback_for_evas , (void*) INT_HANDLE(pc)) != PLAYER_ERROR_NONE) {
+ if (player_set_media_packet_video_frame_decoded_cb(player, decoded_callback_for_evas, (void *)INT_HANDLE(pc)) != PLAYER_ERROR_NONE) {
LOGW("fail to set decoded callback");
}
}
return PLAYER_ERROR_INVALID_PARAMETER;
}
#ifdef HAVE_WAYLAND
- else { /* PLAYER_DISPLAY_TYPE_NONE */
+ else { /* PLAYER_DISPLAY_TYPE_NONE */
LOGI("Wayland surface type is NONE");
wl_win.type = type;
wl_win.wl_window_x = 0;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_MODE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
- ret = player_set_geometry_evas_info (INT_HANDLE(pc), mode);
+ ret = player_set_geometry_evas_info(INT_HANDLE(pc), mode);
+ /* FIXME : devide server and client and consider which error code will be returned */
if (ret == PLAYER_ERROR_NONE) {
return ret;
- }/* FIXME : devide server and client and consider which error code will be returned */
+ }
player_msg_send1(api, pc, ret_buf, ret, INT, mode);
g_free(ret_buf);
return ret;
}
-int player_get_display_mode(player_h player, player_display_mode_e *pmode)
+int player_get_display_mode(player_h player, player_display_mode_e * pmode)
{
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pmode);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_DISPLAY_MODE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int mode = -1;
LOGD("ENTER");
- ret = player_get_geometry_evas_info (INT_HANDLE(pc), &mode);
+ ret = player_get_geometry_evas_info(INT_HANDLE(pc), &mode);
if (ret == PLAYER_ERROR_NONE && mode != -1) {
*pmode = (player_display_mode_e) mode;
return ret;
PLAYER_CHECK_CONDITION(rate >= -5.0 && rate <= 5.0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_PLAYBACK_RATE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_ROTATION;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
- ret = player_set_rotation_evas_info (INT_HANDLE(pc), rotation);
+ ret = player_set_rotation_evas_info(INT_HANDLE(pc), rotation);
if (ret == PLAYER_ERROR_NONE) {
return ret;
}
return ret;
}
-int player_get_display_rotation(player_h player, player_display_rotation_e *protation)
+int player_get_display_rotation(player_h player, player_display_rotation_e * protation)
{
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(protation);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_GET_DISPLAY_ROTATION;
char *ret_buf = NULL;
int rotation = -1;
LOGD("ENTER");
- ret = player_get_rotation_evas_info (INT_HANDLE(pc), &rotation);
+ ret = player_get_rotation_evas_info(INT_HANDLE(pc), &rotation);
if (ret == PLAYER_ERROR_NONE && rotation != -1) {
*protation = (player_display_rotation_e) rotation;
return ret;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_VISIBLE;
char *ret_buf = NULL;
return ret;
}
-int player_is_display_visible(player_h player, bool *pvisible)
+int player_is_display_visible(player_h player, bool * pvisible)
{
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pvisible);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_IS_DISPLAY_VISIBLE;
char *ret_buf = NULL;
int value = -1;
LOGD("ENTER");
- ret = player_get_visible_evas_info (INT_HANDLE(pc), &visible);
+ ret = player_get_visible_evas_info(INT_HANDLE(pc), &visible);
if (ret == PLAYER_ERROR_NONE) {
if (visible)
*pvisible = TRUE;
PLAYER_NULL_ARG_CHECK(pvalue);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_CONTENT_INFO;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
- char value[MUSE_MSG_MAX_LENGTH] = {0, };
+ char value[MUSE_MSG_MAX_LENGTH] = { 0, };
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(pvideo_codec);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_CODEC_INFO;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
- char video_codec[MUSE_MSG_MAX_LENGTH] = {0, };
- char audio_codec[MUSE_MSG_MAX_LENGTH] = {0, };
+ char video_codec[MUSE_MSG_MAX_LENGTH] = { 0, };
+ char audio_codec[MUSE_MSG_MAX_LENGTH] = { 0, };
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(pbit_rate);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_AUDIO_STREAM_INFO;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int sample_rate = 0;
int channel = 0;
PLAYER_NULL_ARG_CHECK(pbit_rate);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_STREAM_INFO;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int fps = 0;
int bit_rate = 0;
PLAYER_NULL_ARG_CHECK(pheight);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_VIDEO_SIZE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int width = 0;
int height = 0;
PLAYER_NULL_ARG_CHECK(psize);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_ALBUM_ART;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
char *album_art;
int size = 0;
*psize = size;
}
-exit:
+ exit:
g_free(ret_buf);
return ret;
PLAYER_NULL_ARG_CHECK(pcount);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BANDS_COUNT;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int count;
PLAYER_NULL_ARG_CHECK(band_levels);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_ALL_BANDS;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_SET_EQUALIZER_BAND_LEVEL;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(plevel);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_LEVEL;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int level;
PLAYER_NULL_ARG_CHECK(pmax);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_LEVEL_RANGE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int min, max;
PLAYER_NULL_ARG_CHECK(pfrequency);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int frequency;
PLAYER_NULL_ARG_CHECK(prange);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_GET_EQUALIZER_BAND_FREQUENCY_RANGE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int range;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_CLEAR;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(pavailable);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_AUDIO_EFFECT_EQUALIZER_IS_AVAILABLE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int available;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_PATH;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_SUBTITLE_POSITION_OFFSET;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(path);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_PROGRESSIVE_DOWNLOAD_PATH;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(ptotal_size);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_PROGRESSIVE_DOWNLOAD_STATUS;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
unsigned long current, total_size;
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_CAPTURE_VIDEO;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_CHECK_CONDITION(size >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_COOKIE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_CHECK_CONDITION(size >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_USER_AGENT;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
LOGD("ENTER");
PLAYER_NULL_ARG_CHECK(pcurrent);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_STREAMING_DOWNLOAD_PROGRESS;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
int start, current;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type = MUSE_PLAYER_EVENT_TYPE_PD;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type = MUSE_PLAYER_EVENT_TYPE_PD;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type = MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type = MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type = MUSE_PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type = MUSE_PLAYER_EVENT_TYPE_VIDEO_STREAM_CHANGED;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(callback);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type;
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_CALLBACK;
char *ret_buf = NULL;
muse_player_event_e type;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(packet);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_PUSH_MEDIA_STREAM;
char *ret_buf = NULL;
player_push_media_msg_type push_media;
LOGD("ret_buf %s", ret_buf);
#ifdef __UN_USED
-push_media_error:
+ push_media_error:
if (push_media.buf_type == PUSH_MEDIA_BUF_TYPE_TBM)
tbm_bo_unref(bo);
#endif
PLAYER_INSTANCE_CHECK(player);
g_return_val_if_fail(format, PLAYER_ERROR_INVALID_OPERATION);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_INFO;
char *ret_buf = NULL;
media_format_mimetype_e mimetype;
{
int ret = PLAYER_ERROR_NONE;
PLAYER_INSTANCE_CHECK(player);
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MAX_SIZE;
char *ret_buf = NULL;
int ret = PLAYER_ERROR_NONE;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pmax_size);
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
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;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
char *ret_buf = NULL;
int ret = PLAYER_ERROR_NONE;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(ppercent);
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_GET_MEDIA_STREAM_BUFFER_MIN_THRESHOLD;
char *ret_buf = NULL;
uint percent;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pcount);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_GET_TRACK_COUNT;
char *ret_buf = NULL;
int count;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pindex);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
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;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_SELECT_TRACK;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pcode);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *)player;
+ player_cli_s *pc = (player_cli_s *) player;
muse_player_api_e api = MUSE_PLAYER_API_GET_TRACK_LANGUAGE_CODE;
char *ret_buf = NULL;
- char code[MUSE_MSG_MAX_LENGTH] = {0, };
+ char code[MUSE_MSG_MAX_LENGTH] = { 0, };
const int code_len = 2;
LOGD("ENTER");