#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <muse_core.h>
-#include <muse_core_msg_json.h>
-#include <muse_core_ipc.h>
#include <mm_error.h>
#include <dlog.h>
-#include <Evas.h>
-#include <Ecore_Evas.h>
-#ifdef HAVE_WAYLAND
-#include <Ecore_Wayland.h>
-#endif
#include <muse_player.h>
#include <muse_player_msg.h>
+#include <storage-internal.h>
#include "player_private.h"
#include "player_msg.h"
#include "player_internal.h"
-int player_set_pcm_extraction_mode(player_h player, bool sync, player_audio_pcm_extraction_cb callback, void *user_data)
-{
- PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(callback);
- int ret = PLAYER_ERROR_NONE;
- muse_player_api_e api = MUSE_PLAYER_API_SET_PCM_EXTRACTION_MODE;
- player_cli_s *pc = (player_cli_s *) player;
- char *ret_buf = NULL;
- muse_player_event_e event = MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME;
-
- LOGD("ENTER");
-
- player_msg_send1(api, pc, ret_buf, ret, INT, sync);
-
- if (ret == PLAYER_ERROR_NONE) {
- pc->cb_info->user_cb[event] = callback;
- pc->cb_info->user_data[event] = user_data;
- LOGI("Event type : %d ", event);
- }
-
- g_free(ret_buf);
- return ret;
-}
-
-int player_set_pcm_spec(player_h player, const char *format, int samplerate, int channel)
-{
- PLAYER_INSTANCE_CHECK(player);
- int ret = PLAYER_ERROR_NONE;
- muse_player_api_e api = MUSE_PLAYER_API_SET_PCM_SPEC;
- player_cli_s *pc = (player_cli_s *) player;
- char *ret_buf = NULL;
-
- LOGD("ENTER");
-
- player_msg_send3(api, pc, ret_buf, ret, STRING, format, INT, samplerate, INT, channel);
-
- g_free(ret_buf);
- return ret;
-}
-
int player_set_streaming_playback_rate(player_h player, float rate)
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_STREAMING_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_msg_send1(api, pc, ret_buf, ret, DOUBLE, rate);
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_DOUBLE, "rate", rate);
g_free(ret_buf);
return ret;
}
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_WITH_INFO;
- 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_WITH_INFO;
- else {
+ } else {
LOGE("PLAYER_ERROR_INVALID_PARAMETER(type : %d)", stream_type);
return PLAYER_ERROR_INVALID_PARAMETER;
}
- player_msg_send2(api, pc, ret_buf, ret, INT, type, INT, set);
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "type", type, MUSE_TYPE_INT, "set", set);
if (ret == PLAYER_ERROR_NONE) {
pc->cb_info->user_cb[type] = callback;
return ret;
}
-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);
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_WITH_INFO;
- 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_WITH_INFO;
- else {
+ } else {
LOGE("PLAYER_ERROR_INVALID_PARAMETER(type : %d)", stream_type);
return PLAYER_ERROR_INVALID_PARAMETER;
}
set_null_user_cb_lock(pc->cb_info, type);
- player_msg_send2(api, pc, ret_buf, ret, INT, type, INT, set);
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "type", type, MUSE_TYPE_INT, "set", set);
g_free(ret_buf);
return ret;
}
-static void __evas_resize_cb(void *data, Evas * e, Evas_Object * eo, void *event_info)
+int player_set_media_stream_dynamic_resolution(player_h player, bool drc)
{
- player_cli_s *pc = (player_cli_s *) data;
- wl_win_msg_type wl_win;
- char *wl_win_msg = (char *)&wl_win;
- char *ret_buf = NULL;
- int rotation;
- Ecore_Evas *ecore_evas;
- muse_player_api_e api = MUSE_PLAYER_API_RESIZE_VIDEO_RENDER_RECT;
+ PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- LOGD("ret =%d", ret);
-
- evas_object_geometry_get(eo, &wl_win.wl_window_x, &wl_win.wl_window_y, &wl_win.wl_window_width, &wl_win.wl_window_height);
- ecore_evas = ecore_evas_ecore_evas_get(e);
- rotation = ecore_evas_rotation_get(ecore_evas);
- LOGD("rotation(%d)", rotation);
- LOGD("get window rectangle: x(%d) y(%d) width(%d) height(%d)",
- wl_win.wl_window_x, wl_win.wl_window_y, wl_win.wl_window_width, wl_win.wl_window_height);
- if (rotation == 270 || rotation == 90) {
- LOGD("swap w and h");
- int temp;
- temp = wl_win.wl_window_width;
- wl_win.wl_window_width = wl_win.wl_window_height;
- wl_win.wl_window_height = temp;
- }
- LOGD("get window rectangle: x(%d) y(%d) width(%d) height(%d)",
- wl_win.wl_window_x, wl_win.wl_window_y, wl_win.wl_window_width, wl_win.wl_window_height);
- wl_win.type = 0; /*init but not use */
- wl_win.wl_surface_id = 0; /*init but not use */
+ muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_DYNAMIC_RESOLUTION;
+ player_cli_s *pc = (player_cli_s *)player;
+ char *ret_buf = NULL;
- player_msg_send_array(api, pc, ret_buf, ret, wl_win_msg, sizeof(wl_win_msg_type), sizeof(char));
+ LOGD("ENTER");
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "drc", drc);
g_free(ret_buf);
- return;
-
+ return ret;
}
-static void __evas_del_cb(void *data, Evas * e, Evas_Object * eo, void *event_info)
+int player_set_ecore_wl_display(player_h player, player_display_type_e type, void *ecore_wl2_window, int x, int y, int width, int height)
{
+ 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;
+ char *ret_buf = NULL;
+ wl_win_msg_type wl_win;
+ char *wl_win_msg = (char *)&wl_win;
+ int wl_surface_id;
+ player_private_display_type_e conv_type;
+ int (*p_disp_set_wl_display)(int, void *) = NULL;
+ int arr_msg_len = 0;
- player_cli_s *pc = (player_cli_s *) data;
+ LOGD("ENTER");
+ PLAYER_VIDEO_SUPPORTABLE_CHECK(pc);
- evas_object_event_callback_del(eo, EVAS_CALLBACK_RESIZE, __evas_resize_cb);
- evas_object_event_callback_del(eo, EVAS_CALLBACK_DEL, __evas_del_cb);
+ ret = _player_convert_display_type(type, &conv_type);
+ if (ret != PLAYER_ERROR_NONE)
+ return ret;
- LOGD("evas callback del %p", eo);
- pc->have_evas_callback = FALSE;
+ if (conv_type != PLAYER_PRIVATE_DISPLAY_TYPE_OVERLAY) {
+ LOGE("Display type(%d) is not overlay", conv_type);
+ return PLAYER_ERROR_INVALID_PARAMETER;
+ }
+ if (!ecore_wl2_window)
+ return PLAYER_ERROR_INVALID_PARAMETER;
- return;
-}
+ PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_wl_display, "disp_set_wl_display");
+ wl_surface_id = p_disp_set_wl_display(ECORE_WAYLAND_WIN, ecore_wl2_window);
+ if (wl_surface_id > 0) {
+ wl_win.surface_id = wl_surface_id;
+ wl_win.type = conv_type;
+ } else {
+ return PLAYER_ERROR_INVALID_OPERATION;
+ }
-int player_set_evas_object_cb(player_h player, Evas_Object * eo)
-{
+ 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);
+ g_free(ret_buf);
+ return ret;
+
+}
+int player_set_next_uri(player_h player, const char *uri)
+{
PLAYER_INSTANCE_CHECK(player);
- return_val_if_fail(eo != NULL, MM_ERROR_INVALID_ARGUMENT);
+ PLAYER_NULL_ARG_CHECK(uri);
+ int ret = PLAYER_ERROR_NONE;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_NEXT_URI;
+ player_cli_s *pc = (player_cli_s *)player;
+ char *ret_buf = NULL;
+ char path[MAX_URL_LEN] = {0, };
- player_cli_s *pc = (player_cli_s *) player;
+ LOGD("ENTER");
- if (pc->have_evas_callback && pc->eo == eo) {
- LOGW("evas object had callback already %p", pc->eo);
- return MM_ERROR_UNKNOWN;
- }
- pc->eo = eo;
- evas_object_event_callback_add(eo, EVAS_CALLBACK_RESIZE, __evas_resize_cb, player);
- evas_object_event_callback_add(eo, EVAS_CALLBACK_DEL, __evas_del_cb, player);
- LOGD("evas callback add %p", pc->eo);
- pc->have_evas_callback = TRUE;
+ if (_player_get_valid_path(uri, path) != PLAYER_ERROR_NONE)
+ return PLAYER_ERROR_INVALID_PARAMETER;
+
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_STRING, "path", path);
- return MM_ERROR_NONE;
+ g_free(ret_buf);
+ return ret;
}
-int player_unset_evas_object_cb(player_h player)
+int player_get_next_uri(player_h player, char **uri)
{
PLAYER_INSTANCE_CHECK(player);
- player_cli_s *pc = (player_cli_s *) player;
- return_val_if_fail(pc->eo != NULL, MM_ERROR_INVALID_ARGUMENT);
+ PLAYER_NULL_ARG_CHECK(uri);
+ int ret = PLAYER_ERROR_NONE;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_NEXT_URI;
+ player_cli_s *pc = (player_cli_s *)player;
+ char *ret_buf = NULL;
+ char next_uri[MUSE_MSG_MAX_LENGTH] = { 0, };
+
+ LOGD("ENTER");
- evas_object_event_callback_del(pc->eo, EVAS_CALLBACK_RESIZE, __evas_resize_cb);
- evas_object_event_callback_del(pc->eo, EVAS_CALLBACK_DEL, __evas_del_cb);
- LOGD("evas callback del %p", pc->eo);
- pc->eo = NULL;
- pc->have_evas_callback = FALSE;
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret);
+ if (ret == PLAYER_ERROR_NONE) {
+ player_msg_get_string(next_uri, ret_buf);
- return MM_ERROR_NONE;
+ char dest[MUSE_MSG_MAX_LENGTH] = {0,};
+ if (storage_get_compat_internal_path(next_uri, sizeof(dest), dest) < 0) {
+ /* cannot convert path. use the original one. */
+ *uri = strndup(next_uri, MUSE_MSG_MAX_LENGTH);
+ } else {
+ /* need to use converted path. */
+ LOGD("Converted path : %s -> %s", next_uri, dest);
+ *uri = strndup(dest, MUSE_MSG_MAX_LENGTH);
+ }
+ }
+ g_free(ret_buf);
+ return ret;
}
-int player_set_media_stream_dynamic_resolution(player_h player, bool drc)
+int player_set_gapless(player_h player, bool gapless)
{
PLAYER_INSTANCE_CHECK(player);
int ret = PLAYER_ERROR_NONE;
- muse_player_api_e api = MUSE_PLAYER_API_SET_MEDIA_STREAM_DYNAMIC_RESOLUTION;
- player_cli_s *pc = (player_cli_s *) player;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_GAPLESS;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
LOGD("ENTER");
- player_msg_send1(api, pc, ret_buf, ret, INT, drc);
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "gapless", gapless);
g_free(ret_buf);
return ret;
}
-#ifdef HAVE_WAYLAND
-int player_set_ecore_wl_display(player_h player, player_display_type_e type, Ecore_Wl_Window *ecore_wl_window, int x, int y, int width, int height)
+int player_is_gapless(player_h player, bool *gapless)
{
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(gapless);
int ret = PLAYER_ERROR_NONE;
- muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY;
- player_cli_s *pc = (player_cli_s *) player;
+ muse_player_api_e api = MUSE_PLAYER_API_IS_GAPLESS;
+ 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;
- unsigned int wl_surface_id;
- struct wl_surface *wl_surface;
- struct wl_display *wl_display;
- Ecore_Wl_Window *wl_window = NULL;
+ int value = 0;
LOGD("ENTER");
- if (type != PLAYER_DISPLAY_TYPE_OVERLAY) {
- LOGE("Display type(%d) is not overlay", type);
- return PLAYER_ERROR_INVALID_PARAMETER;
- }
- if (!ecore_wl_window)
- return PLAYER_ERROR_INVALID_PARAMETER;
- LOGI("Wayland overlay surface type");
- LOGD("Ecore Wayland Window handle(%p), size (%d, %d, %d, %d)", ecore_wl_window, x, y, width, height);
- wl_window = ecore_wl_window;
-
- /* set wl_win */
- wl_win.type = type;
- wl_win.wl_window_x = x;
- wl_win.wl_window_y = y;
- wl_win.wl_window_width = width;
- wl_win.wl_window_height = height;
-
- wl_surface = (struct wl_surface *)ecore_wl_window_surface_get(wl_window);
- /* get wl_display */
- wl_display = (struct wl_display *)ecore_wl_display_get();
-
- if (!pc->wlclient) {
- ret = _wlclient_create(&pc->wlclient);
- if (ret != MM_ERROR_NONE) {
- LOGE("Wayland client create failure");
- return ret;
- }
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret);
+ if (ret == PLAYER_ERROR_NONE) {
+ player_msg_get(value, ret_buf);
+ *gapless = value;
}
+ g_free(ret_buf);
+ return ret;
+}
+
+int player_enable_tsurf_pool(player_h player, bool enable)
+{
+ PLAYER_INSTANCE_CHECK(player);
+ int ret = PLAYER_ERROR_NONE;
+ player_cli_s *pc = (player_cli_s *)player;
- 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("ENTER enable:%d", enable);
+
+ if (pc && pc->cb_info) {
+ pc->cb_info->use_tsurf_pool = enable;
} else {
- LOGE("Fail to get wl_surface or wl_display");
- return PLAYER_ERROR_INVALID_OPERATION;
+ LOGE("failed to enable the tbm surf pool");
+ ret = PLAYER_ERROR_INVALID_OPERATION;
}
- if (pc->wlclient) {
- g_free(pc->wlclient);
- pc->wlclient = NULL;
- }
+ return ret;
+}
- player_msg_send_array(api, pc, ret_buf, ret, wl_win_msg, sizeof(wl_win_msg_type), sizeof(char));
+int player_is_enabled_tsurf_pool(player_h player, bool *enabled)
+{
+ PLAYER_INSTANCE_CHECK(player);
+ PLAYER_NULL_ARG_CHECK(enabled);
+ int ret = PLAYER_ERROR_NONE;
+ player_cli_s *pc = (player_cli_s *)player;
- g_free(ret_buf);
+ LOGD("ENTER");
+ if (pc && pc->cb_info) {
+ *enabled = pc->cb_info->use_tsurf_pool;
+ } else {
+ LOGE("failed to get the tbm surf pool state");
+ ret = PLAYER_ERROR_INVALID_OPERATION;
+ }
return ret;
}
-#endif
-#ifndef TIZEN_TV
-int player_set_next_uri(player_h player, const char *uri)
+int player_get_media_packet_video_frame_pool_size(player_h player, int *size)
{
PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(uri);
+ PLAYER_NULL_ARG_CHECK(size);
+
int ret = PLAYER_ERROR_NONE;
- muse_player_api_e api = MUSE_PLAYER_API_SET_NEXT_URI;
- player_cli_s *pc = (player_cli_s *) player;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_MEDIA_PACKET_VIDEO_FRAME_POOL_SIZE;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
+ int value = 0;
LOGD("ENTER");
- player_msg_send1(api, pc, ret_buf, ret, STRING, uri);
-
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret);
+ if (ret == PLAYER_ERROR_NONE) {
+ player_msg_get(value, ret_buf);
+ *size = value;
+ pc->cb_info->video_frame_pool_size = value;
+ LOGD("packet pool size : %d", *size);
+ }
g_free(ret_buf);
return ret;
}
-int player_get_next_uri (player_h player, char **uri)
+int player_enable_media_packet_video_frame_decoded_cb(player_h player, bool enable)
{
PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(uri);
int ret = PLAYER_ERROR_NONE;
- muse_player_api_e api = MUSE_PLAYER_API_GET_NEXT_URI;
- player_cli_s *pc = (player_cli_s *) player;
+ muse_player_api_e api = MUSE_PLAYER_API_ENABLE_MEDIA_PACKET_VIDEO_FRAME_DECODED_CB;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
- char next_uri[MUSE_MSG_MAX_LENGTH] = { 0, };
- LOGD("ENTER");
+ LOGD("ENTER %d", enable);
- player_msg_send(api, pc, ret_buf, ret);
- if (ret == PLAYER_ERROR_NONE) {
- player_msg_get_string(next_uri, ret_buf);
- *uri = strndup(next_uri, MUSE_MSG_MAX_LENGTH);
- }
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "enable", enable);
g_free(ret_buf);
return ret;
}
-int player_set_gapless(player_h player, bool gapless)
+int player_set_video_codec_type_ex(player_h player, player_video_codec_type_ex_e codec_type)
{
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_RANGE_ARG_CHECK(codec_type, PLAYER_VIDEO_CODEC_TYPE_EX_DEFAULT, PLAYER_VIDEO_CODEC_TYPE_EX_SW);
+
int ret = PLAYER_ERROR_NONE;
- muse_player_api_e api = MUSE_PLAYER_API_SET_GAPLESS;
- player_cli_s *pc = (player_cli_s *) player;
+ muse_player_api_e api = MUSE_PLAYER_API_SET_CODEC_TYPE;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
- LOGD("ENTER");
+ LOGD("ENTER codec: %d", codec_type);
+
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret,
+ MUSE_TYPE_INT, "stream_type", PLAYER_STREAM_TYPE_VIDEO,
+ MUSE_TYPE_INT, "codec_type", codec_type);
- player_msg_send1(api, pc, ret_buf, ret, INT, gapless);
g_free(ret_buf);
+ LOGD("LEAVE");
return ret;
}
-int player_is_gapless(player_h player, bool *gapless)
+int player_get_video_codec_type_ex(player_h player, player_video_codec_type_ex_e *pcodec_type)
{
PLAYER_INSTANCE_CHECK(player);
- PLAYER_NULL_ARG_CHECK(gapless);
+ PLAYER_NULL_ARG_CHECK(pcodec_type);
+
int ret = PLAYER_ERROR_NONE;
- muse_player_api_e api = MUSE_PLAYER_API_IS_GAPLESS;
- player_cli_s *pc = (player_cli_s *) player;
+ muse_player_api_e api = MUSE_PLAYER_API_GET_CODEC_TYPE;
+ player_cli_s *pc = (player_cli_s *)player;
char *ret_buf = NULL;
- int value = 0;
+ int codec_type = 0;
LOGD("ENTER");
- player_msg_send(api, pc, ret_buf, ret);
+ PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "stream_type", PLAYER_STREAM_TYPE_VIDEO);
if (ret == PLAYER_ERROR_NONE) {
- player_msg_get(value, ret_buf);
- *gapless = value;
+ player_msg_get(codec_type, ret_buf);
+ *pcodec_type = codec_type;
}
+
g_free(ret_buf);
+ LOGD("LEAVE codec: %d", *pcodec_type);
return ret;
}
-#endif