typedef struct {
tbm_fd tfd[MUSE_NUM_FD];
- char* buffer;
+ char *buffer;
} _player_recv_data;
typedef struct {
bool use_tsurf_pool;
} _media_pkt_fin_data;
-static int _player_deinit_memory_buffer(player_cli_s * pc);
-static void _player_event_queue_add(player_event_queue * ev, _player_cb_data * data);
+static int _player_deinit_memory_buffer(player_cli_s *pc);
+static void _player_event_queue_add(player_event_queue *ev, _player_cb_data *data);
static bool _player_need_sync_context(int event_id);
static void _player_remove_idle_event(callback_cb_info_s *cb_info, muse_player_event_e event_type, bool remove_all);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
static int __player_set_retrieve_buffer_cb(player_h player, player_retrieve_buffer_cb callback, void *user_data);
static int __player_unset_retrieve_buffer_cb(player_h player);
#endif
-static void _player_release_internal_memory(player_cli_s * pc, bool deinit_server_mem);
+static void _player_release_internal_memory(player_cli_s *pc, bool deinit_server_mem);
/*
* Internal Implementation
return ret;
}
-int _player_send_msg_async(int send_fd, char* msg)
+int _player_send_msg_async(int send_fd, char *msg)
{
int send_len = 0;
return ret;
}
-static bool _player_get_param_value(char* buf, ...)
+static bool _player_get_param_value(char *buf, ...)
{
muse_core_msg_parse_err_e err = MUSE_MSG_PARSE_ERROR_NONE;
bool ret = true;
{
int ret = MEDIA_PACKET_FINALIZE;
muse_player_api_e api = MUSE_PLAYER_API_RETURN_VIDEO_DATA;
- _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 v_data = 0;
char *snd_msg = NULL;
int snd_len = 0;
return TRUE;
}
-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, tbm_fd *tfd)
+static int player_recv_msg(callback_cb_info_s *cb_info, tbm_fd *tfd)
{
int recvLen = 0;
msg_buff_s *buff = &cb_info->buff;
- memset(buff->recvMsg, 0x00, sizeof(char)*buff->bufLen);
+ memset(buff->recvMsg, 0x00, sizeof(char) * buff->bufLen);
memset(tfd, INVALID_DEFAULT_VALUE, sizeof(*tfd) * MUSE_NUM_FD);
recvLen = muse_core_msg_recv_fd(cb_info->fd, buff->recvMsg, MUSE_MSG_MAX_LENGTH, tfd);
if (recvLen <= 0) {
g_free(tmp);
return 0;
}
- memset(buff->recvMsg, 0x00, sizeof(char)*buff->bufLen);
+ memset(buff->recvMsg, 0x00, sizeof(char) * buff->bufLen);
}
g_snprintf(buff->recvMsg, buff->bufLen, "%s%s", buff->part_of_msg, tmp);
recvLen += strlen(buff->part_of_msg);
return recvLen;
}
-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;
/* Notice : have to be called via API to avoid deadlock
* to clear the cb setting at the cb thread, set_null_user_cb() have to be called instead.
*/
-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 = false;
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, _player_recv_data *recv_data)
+static void __prepare_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
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, _player_recv_data *recv_data)
+static void __complete_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
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]);
}
#ifdef TIZEN_FEATURE_EVAS_RENDERER
-static void __retrieve_buffer_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __retrieve_buffer_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_RETURN_BUFFER;
- ((player_retrieve_buffer_cb) cb_info->user_cb[ev]) (cb_info->user_data[ev]);
+ ((player_retrieve_buffer_cb)cb_info->user_cb[ev])(cb_info->user_data[ev]);
}
#endif
-static void __interrupt_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __interrupt_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_INTERRUPT;
- ((player_interrupted_cb) cb_info->user_cb[ev]) (PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT, cb_info->user_data[ev]);
+ ((player_interrupted_cb)cb_info->user_cb[ev])(PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT, cb_info->user_data[ev]);
}
-static void __error_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __error_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
int code;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_ERROR;
set_null_user_cb(cb_info, MUSE_PLAYER_EVENT_TYPE_PREPARE);
}
}
- ((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 __disconnected_error_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __disconnected_error_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_ERROR;
- ((player_error_cb) cb_info->user_cb[ev]) (PLAYER_ERROR_SERVICE_DISCONNECTED, cb_info->user_data[ev]);
+ ((player_error_cb)cb_info->user_cb[ev])(PLAYER_ERROR_SERVICE_DISCONNECTED, cb_info->user_data[ev]);
}
-static void __buffering_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __buffering_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
int percent;
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_BUFFERING;
if (player_msg_get(percent, recv_data->buffer))
- ((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, _player_recv_data *recv_data)
+static void __subtitle_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
int duration = 0;
char text[MUSE_URI_MAX_LENGTH] = { 0, };
MUSE_TYPE_STRING, "text", (void *)text,
INVALID_MUSE_TYPE_VALUE);
if (ret)
- ((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, _player_recv_data *recv_data)
+static void __capture_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
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
+ } else {
LOGE("g_new failure");
+ }
tbm_bo_unmap(bo);
}
set_null_user_cb(cb_info, MUSE_PLAYER_EVENT_TYPE_CAPTURE);
}
-static void __seek_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __seek_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_SEEK;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
}
#endif
LOGD("call seek cb");
- ((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);
break;
g_mutex_unlock(&cb_info->seek_cb_mutex);
}
-static void __player_remove_tsurf_list(player_cli_s * pc)
+static void __player_remove_tsurf_list(player_cli_s *pc)
{
GList *l = NULL;
LOGD("total num of tsurf list = %d", g_list_length(pc->cb_info->tsurf_list));
for (l = g_list_first(pc->cb_info->tsurf_list); l; l = g_list_next(l)) {
- player_tsurf_info_t* tmp = (player_tsurf_info_t *)l->data;
+ player_tsurf_info_t *tmp = (player_tsurf_info_t *)l->data;
LOGD("%p will be removed", tmp);
if (tmp) {
return;
}
-static player_tsurf_info_t* __player_get_tsurf_from_list(callback_cb_info_s * cb_info, int *key, int height, int width)
+static player_tsurf_info_t *__player_get_tsurf_from_list(callback_cb_info_s *cb_info, int *key, int height, int width)
{
GList *l = NULL;
return rotate;
}
-static void __media_packet_video_frame_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __media_packet_video_frame_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
tbm_bo bo[4] = { NULL, };
int key[4] = { INVALID_DEFAULT_VALUE, };
/* Keep the fd id to check validation when the pkt is destroyed. */
fin_data->fd_id = muse_client_get_fd_id_value(fin_data->fd);
- 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 || !pkt) {
LOGE("media_packet_create_from_tbm_surface failed %d %p", ret, pkt);
goto ERROR;
}
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");
}
if (cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_VIDEO_FRAME]) {
/* 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]);
} else {
LOGE("_video_decoded_cb is not set");
media_packet_destroy(pkt);
return;
}
-static void __audio_frame_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __audio_frame_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
tbm_bo bo = NULL;
tbm_bo_handle thandle;
audio.data = thandle.ptr + sizeof(player_audio_raw_data_s);
/* 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]);
tbm_bo_unmap(bo);
EXIT:
}
}
-static void __video_frame_render_error_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __video_frame_render_error_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
}
-static void __supported_audio_effect_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __supported_audio_effect_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
}
-static void __supported_audio_effect_preset_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __supported_audio_effect_preset_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
}
-static void __missed_plugin_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __missed_plugin_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
}
-static void __media_stream_video_buffer_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __media_stream_video_buffer_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
/* player_media_stream_buffer_status_e status; */
int status;
if (player_msg_get(status, recv_data->buffer)) {
((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, _player_recv_data *recv_data)
+static void __media_stream_audio_buffer_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
/* player_media_stream_buffer_status_e status; */
int status;
if (player_msg_get(status, recv_data->buffer)) {
((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, _player_recv_data *recv_data)
+static void __media_stream_video_buffer_cb_handler_ex(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
/* player_media_stream_buffer_status_e status; */
int status;
}
}
-static void __media_stream_audio_buffer_cb_handler_ex(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __media_stream_audio_buffer_cb_handler_ex(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
/* player_media_stream_buffer_status_e status; */
int status;
}
-static void __media_stream_video_seek_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __media_stream_video_seek_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
unsigned long long offset;
}
}
-static void __media_stream_audio_seek_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __media_stream_audio_seek_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
unsigned long long offset;
}
}
-static void __video_stream_changed_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data)
+static void __video_stream_changed_cb_handler(callback_cb_info_s *cb_info, _player_recv_data *recv_data)
{
int width;
int height;
MUSE_TYPE_INT, "bit_rate", (void *)&bit_rate,
INVALID_MUSE_TYPE_VALUE);
if (ret_val) {
- ((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, _player_recv_data *recv_data) = {
+static void (*_user_callbacks[MUSE_PLAYER_EVENT_TYPE_NUM])(callback_cb_info_s *cb_info, _player_recv_data *recv_data) = {
__prepare_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_PREPARE */
__complete_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_COMPLETE */
__interrupt_cb_handler, /* MUSE_PLAYER_EVENT_TYPE_INTERRUPT */
g_mutex_unlock(&data->cb_info->event_queue.idle_ev_mutex);
if (data->cb_info->user_cb[ev])
- _user_callbacks[ev] (data->cb_info, data->recv_data);
+ _user_callbacks[ev](data->cb_info, data->recv_data);
else
LOGW("user callback is unset. type : %d", 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) {
muse_player_event_e event_type = ((_player_cb_data *)event_data)->int_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->idle_ev_mutex);
- 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);
return;
}
-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;
ev->thread = NULL;
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->recv_data->buffer);
g_free(event_data->recv_data);
g_mutex_clear(&ev->idle_ev_mutex);
}
-static void _player_event_queue_remove(player_event_queue * ev_queue, int ev)
+static void _player_event_queue_remove(player_event_queue *ev_queue, int ev)
{
GList *item;
g_mutex_unlock(&ev_queue->qlock);
}
-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 bool _user_callback_handler(callback_cb_info_s * cb_info, muse_player_event_e event, _player_recv_data *recv_data)
+static bool _user_callback_handler(callback_cb_info_s *cb_info, muse_player_event_e event, _player_recv_data *recv_data)
{
/* LOGD("get event %d", event); */
return false;
}
-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 _remove_all_ret_msg(callback_cb_info_s * cb_info)
+static void _remove_all_ret_msg(callback_cb_info_s *cb_info)
{
ret_msg_s *msg = cb_info->buff.retMsgHead;
ret_msg_s *prev = NULL;
}
}
-static void _notify_disconnected(callback_cb_info_s * cb_info)
+static void _notify_disconnected(callback_cb_info_s *cb_info)
{
muse_player_event_e event = MUSE_PLAYER_EVENT_TYPE_SERVICE_DISCONNECTED;
if (!cb_info || !cb_info->user_cb[MUSE_PLAYER_EVENT_TYPE_ERROR])
while (offset < len) {
api = MUSE_PLAYER_API_MAX;
// LOGD(">>>>>> [%d/%d] %p, %s", offset, len, recvMsg + offset, recvMsg + offset);
-// usleep(10*1000);
+// usleep(10 * 1000);
void *jobj = muse_core_msg_object_new(recvMsg + offset, &parse_len, &err);
if (jobj) {
recv_data = g_new0(_player_recv_data, 1);
if (recv_data != NULL) {
memcpy(recv_data->tfd, tfd, sizeof(recv_data->tfd));
- recv_data->buffer = g_strndup(recvMsg+offset, parse_len);
+ recv_data->buffer = g_strndup(recvMsg + offset, parse_len);
} else {
LOGE("failed to alloc recv_data.");
g_mutex_unlock(&cb_info->player_mutex);
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->buff.recvMsg);
_remove_all_ret_msg(cb_info);
- if (cb_info->buff.part_of_msg)
- g_free(cb_info->buff.part_of_msg);
+ g_free(cb_info->buff.part_of_msg);
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; /* ms */
}
-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_MILLISECOND;
return ret;
}
-int client_wait_for_server_ack(muse_player_api_e api, callback_cb_info_s * cb_info, int time_out)
+int client_wait_for_server_ack(muse_player_api_e api, callback_cb_info_s *cb_info, int time_out)
{
int ret = PLAYER_ERROR_NONE;
gint64 end_time = g_get_monotonic_time() + time_out * G_TIME_SPAN_MILLISECOND;
* 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 * 2);
if (ret == PLAYER_ERROR_NONE) {
intptr_t module_addr = 0;
- *player = (player_h) pc;
+ *player = (player_h)pc;
if (player_msg_get_type(module_addr, ret_buf, POINTER)) {
pc->cb_info->data_fd = muse_client_new_data_ch();
if ((pc->cb_info->data_fd < 0) || (!muse_core_fd_is_valid(pc->cb_info->data_fd))) {
LOGD("LEAVE 0x%X", ret);
return ret;
- ERROR:
+ERROR:
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;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
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 %p", pc);
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;
int (*p_disp_evas_display_retrieve_all_packets)(void *, bool) = NULL;
player_state_e state = PLAYER_STATE_NONE;
if (storage_get_origin_internal_path((file_path) ? (file_path) : (uri), MAX_URL_LEN, valid_path) < 0) {
/* cannot convert path. use the original one. */
- strncpy(valid_path, (file_path) ? (file_path) : (uri), MAX_URL_LEN-1);
+ strncpy(valid_path, (file_path) ? (file_path) : (uri), MAX_URL_LEN - 1);
} else {
/* need to use converted path. */
SECURE_LOGD("Converted path : %s -> %s", uri, valid_path);
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;
char path[MAX_URL_LEN] = {0, };
SECURE_LOGD("new path : %s", path);
- PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_STRING, "path", (const char*)path);
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_STRING, "path", (const char *)path);
pc->push_media_stream = FALSE;
g_free(ret_buf);
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 = NULL;
tbm_bo_handle thandle;
return ret;
}
-static void _player_release_internal_memory(player_cli_s * pc, bool deinit_server_mem)
+static void _player_release_internal_memory(player_cli_s *pc, bool deinit_server_mem)
{
if (!pc)
return;
_player_deinit_memory_buffer(pc);
}
-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;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pstate);
int ret = PLAYER_ERROR_NONE;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
LOGD("ENTER");
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(pleft && 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);
muse_player_api_e api = MUSE_PLAYER_API_SET_SOUND_STREAM_INFO;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
bool is_available = false;
char *ret_buf = NULL;
ret = sound_manager_get_index_from_stream_information(stream_info, &stream_index);
if (ret == SOUND_MANAGER_ERROR_NONE)
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
- MUSE_TYPE_STRING, "stream_type", (const char*)stream_type,
+ MUSE_TYPE_STRING, "stream_type", (const char *)stream_type,
MUSE_TYPE_INT, "stream_index", stream_index);
else
ret = PLAYER_ERROR_INVALID_OPERATION;
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 %p", pc);
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;
player_state_e state = PLAYER_STATE_NONE;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
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 %p", pc);
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;
LOGD("ENTER %p", pc);
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;
char *ret_buf = NULL;
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
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;
return ret;
}
-int player_is_muted(player_h player, bool * muted)
+int player_is_muted(player_h player, bool *muted)
{
PLAYER_INSTANCE_CHECK(player);
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_SEND_MSG(api, pc, ret_buf, ret);
if (ret == PLAYER_ERROR_NONE) {
player_msg_get(mute, ret_buf);
- *muted = (bool) mute;
+ *muted = (bool)mute;
}
g_free(ret_buf);
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;
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;
LOGD("ENTER");
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;
wl_win_msg_type wl_win;
char *wl_win_msg = (char *)&wl_win;
wl_win.type = conv_type;
}
- arr_msg_len = (sizeof(wl_win_msg_type)/sizeof(int) + (sizeof(wl_win_msg_type)%sizeof(int) ? 1 : 0));
+ arr_msg_len = (sizeof(wl_win_msg_type) / sizeof(int) + (sizeof(wl_win_msg_type) % sizeof(int) ? 1 : 0));
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
- MUSE_TYPE_ARRAY, "wl_win_msg", arr_msg_len, (int*)wl_win_msg);
+ MUSE_TYPE_ARRAY, "wl_win_msg", arr_msg_len, (int *)wl_win_msg);
g_free(ret_buf);
return ret;
PLAYER_CHECK_CONDITION(PLAYER_DISPLAY_MODE_LETTER_BOX <= mode && mode < PLAYER_DISPLAY_MODE_NUM, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
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;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int (*p_disp_set_evas_display_disp_mode)(void *, int) = NULL;
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;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_VIDEO_ROI_AREA;
- 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_GET_VIDEO_ROI_AREA;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
double scale_x = 0, scale_y = 0, scale_w = 0, scale_h = 0;
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY_ROI_AREA;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
wl_win_msg_type wl_win;
char *wl_win_msg = (char *)&wl_win;
wl_win.win_roi_width = width;
wl_win.win_roi_height = height;
- arr_msg_len = (sizeof(wl_win_msg_type)/sizeof(int) + (sizeof(wl_win_msg_type)%sizeof(int) ? 1 : 0));
+ arr_msg_len = (sizeof(wl_win_msg_type) / sizeof(int) + (sizeof(wl_win_msg_type) % sizeof(int) ? 1 : 0));
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
- MUSE_TYPE_ARRAY, "wl_win_msg", arr_msg_len, (int*)wl_win_msg);
+ MUSE_TYPE_ARRAY, "wl_win_msg", arr_msg_len, (int *)wl_win_msg);
g_free(ret_buf);
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");
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;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
int (*p_disp_set_evas_display_rotation)(void *, int) = NULL;
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;
{
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;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
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;
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, };
PLAYER_NULL_ARG_CHECK(paudio_codec || 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, };
PLAYER_NULL_ARG_CHECK(psample_rate || pchannel || 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(pfps || 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(pwidth && 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(palbum_art && 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;
if (jobj)
muse_core_msg_object_free(jobj);
- if (ret_buf)
- g_free(ret_buf);
+ g_free(ret_buf);
if (tfd > INVALID_DEFAULT_VALUE)
close(tfd);
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(pmin && 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 = 0, max = 0;
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");
return ret;
}
-int player_audio_effect_equalizer_is_available(player_h player, bool * pavailable)
+int player_audio_effect_equalizer_is_available(player_h player, bool *pavailable)
{
PLAYER_INSTANCE_CHECK(player);
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;
char subtitle_path[MAX_URL_LEN] = {0, };
if (path && _player_get_valid_path(path, subtitle_path) != PLAYER_ERROR_NONE)
return PLAYER_ERROR_INVALID_PARAMETER;
- PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_STRING, "subtitle_path", (const char*)subtitle_path);
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_STRING, "subtitle_path", (const char *)subtitle_path);
g_free(ret_buf);
return ret;
}
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(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(start && end);
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_pos = 0, end_pos = 0;
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;
LOGD("ENTER");
- if (stream_type == PLAYER_STREAM_TYPE_VIDEO)
+ if (stream_type == PLAYER_STREAM_TYPE_VIDEO) {
type = MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS;
- else if (stream_type == PLAYER_STREAM_TYPE_AUDIO)
+ } else if (stream_type == PLAYER_STREAM_TYPE_AUDIO) {
type = MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS;
- else {
+ } else {
LOGE("PLAYER_ERROR_INVALID_PARAMETER(type : %d)", stream_type);
return PLAYER_ERROR_INVALID_PARAMETER;
}
{
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;
LOGD("ENTER");
- if (stream_type == PLAYER_STREAM_TYPE_VIDEO)
+ if (stream_type == PLAYER_STREAM_TYPE_VIDEO) {
type = MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_BUFFER_STATUS;
- else if (stream_type == PLAYER_STREAM_TYPE_AUDIO)
+ } else if (stream_type == PLAYER_STREAM_TYPE_AUDIO) {
type = MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_BUFFER_STATUS;
- else {
+ } else {
LOGE("PLAYER_ERROR_INVALID_PARAMETER(type : %d)", stream_type);
return PLAYER_ERROR_INVALID_PARAMETER;
}
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;
LOGD("ENTER");
- if (stream_type == PLAYER_STREAM_TYPE_VIDEO)
+ if (stream_type == PLAYER_STREAM_TYPE_VIDEO) {
type = MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_SEEK;
- else if (stream_type == PLAYER_STREAM_TYPE_AUDIO)
+ } else if (stream_type == PLAYER_STREAM_TYPE_AUDIO) {
type = MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_SEEK;
- else {
+ } else {
LOGE("PLAYER_ERROR_INVALID_PARAMETER(type : %d)", stream_type);
return PLAYER_ERROR_INVALID_PARAMETER;
}
{
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;
LOGD("ENTER");
- if (stream_type == PLAYER_STREAM_TYPE_VIDEO)
+ if (stream_type == PLAYER_STREAM_TYPE_VIDEO) {
type = MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_VIDEO_SEEK;
- else if (stream_type == PLAYER_STREAM_TYPE_AUDIO)
+ } else if (stream_type == PLAYER_STREAM_TYPE_AUDIO) {
type = MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_SEEK;
- else {
+ } else {
LOGE("PLAYER_ERROR_INVALID_PARAMETER(type : %d)", stream_type);
return PLAYER_ERROR_INVALID_PARAMETER;
}
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;
arr_msg_len = (msg_size / sizeof(int) + (msg_size % sizeof(int) ? 1 : 0));
arr_buf_len = (buf_size / sizeof(int) + (buf_size % sizeof(int) ? 1 : 0));
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
- MUSE_TYPE_ARRAY, "push_media_msg", arr_msg_len, (int*)push_media_msg,
- MUSE_TYPE_ARRAY, "buf", arr_buf_len, (int*)buf);
+ MUSE_TYPE_ARRAY, "push_media_msg", arr_msg_len, (int *)push_media_msg,
+ MUSE_TYPE_ARRAY, "buf", arr_buf_len, (int *)buf);
} else
#endif
arr_msg_len = (msg_size / sizeof(int) + (msg_size % sizeof(int) ? 1 : 0));
PLAYER_SEND_MSG(api, pc, ret_buf, ret,
- MUSE_TYPE_ARRAY, "push_media_msg", arr_msg_len, (int*)push_media_msg);
+ MUSE_TYPE_ARRAY, "push_media_msg", arr_msg_len, (int *)push_media_msg);
}
LOGD("ret_buf %s", ret_buf);
#ifdef __UN_USED
- ERROR:
+ERROR:
if (tfd > INVALID_DEFAULT_VALUE)
close(tfd);
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;
PLAYER_CHECK_CONDITION(max_size > 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
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_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;
PLAYER_CHECK_CONDITION(PLAYER_STREAM_TYPE_DEFAULT <= type && type <= PLAYER_STREAM_TYPE_TEXT, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
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_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, };
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_GET_ADAPTIVE_VARIANT_INFO;
char *ret_buf = NULL;
char var_info[MUSE_MSG_MAX_LENGTH] = { 0, };
PLAYER_INSTANCE_CHECK(player);
PLAYER_CHECK_CONDITION(bandwidth >= -1 && width >= -1 && height >= -1,
PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- 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_MAX_ADAPTIVE_VARIANT_LIMIT;
char *ret_buf = NULL;
PLAYER_INSTANCE_CHECK(player);
PLAYER_NULL_ARG_CHECK(pbandwidth || pwidth || pheight);
- 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_MAX_ADAPTIVE_VARIANT_LIMIT;
char *ret_buf = NULL;
int bandwidth = -1, width = -1, height = -1;
{
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_AUDIO_ONLY;
char *ret_buf = NULL;
player_state_e state = PLAYER_STATE_NONE;
PLAYER_NULL_ARG_CHECK(paudio_only);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_IS_AUDIO_ONLY;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int audio_only = 0;
PLAYER_INSTANCE_CHECK(player);
PLAYER_CHECK_CONDITION(buffer_ms >= 0 && rebuffer_ms >= 0, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- 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_STREAMING_BUFFERING_TIME;
char *ret_buf = NULL;
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_GET_STREAMING_BUFFERING_TIME;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
int buffering_time = 0, rebuffering_time = 0;
char *ret_buf = NULL;
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_IS_CONTENT_SPHERICAL;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = 0;
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ENABLED;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = (int)enabled;
PLAYER_NULL_ARG_CHECK(enabled);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_IS_ENABLED;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = 0;
PLAYER_INSTANCE_CHECK(player);
PLAYER_CHECK_CONDITION(yaw >= (float)-M_PI && yaw <= (float)M_PI, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
- PLAYER_CHECK_CONDITION(pitch >= (float)-M_PI/2 && pitch <= (float)M_PI/2, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+ PLAYER_CHECK_CONDITION(pitch >= (float)-M_PI / 2 && pitch <= (float)M_PI / 2, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_DIRECTION_OF_VIEW;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
LOGD("ENTER %f %f", yaw, pitch);
PLAYER_NULL_ARG_CHECK(yaw && pitch);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_GET_DIRECTION_OF_VIEW;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
double yaw_val = -1;
double pitch_val = -1;
char *ret_buf = NULL;
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ZOOM;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
LOGD("ENTER %f", level);
PLAYER_NULL_ARG_CHECK(level);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_GET_ZOOM;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
double zoom = -1;
char *ret_buf = NULL;
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_FIELD_OF_VIEW;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
LOGD("ENTER %d %d", horizontal_degrees, vertical_degrees);
PLAYER_NULL_ARG_CHECK(horizontal_degrees && vertical_degrees);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_GET_FIELD_OF_VIEW;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
int h_val = -1;
int v_val = -1;
char *ret_buf = NULL;
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_360_SET_ZOOM_WITH_FIELD_OF_VIEW;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
LOGD("ENTER %f %d %d", level, horizontal_degrees, vertical_degrees);
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_REPLAYGAIN_ENABLED;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = (int)enabled;
PLAYER_NULL_ARG_CHECK(enabled);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_IS_REPLAYGAIN_ENABLED;
- player_cli_s *pc = (player_cli_s *) player;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
int val = -1;
PLAYER_SEND_MSG(api, pc, ret_buf, ret);
if (ret == PLAYER_ERROR_NONE) {
player_msg_get(val, ret_buf);
- *enabled = (bool) val;
+ *enabled = (bool)val;
}
g_free(ret_buf);