[0.3.123] remove deprecated internal api
[platform/core/api/player.git] / src / player_internal.c
index 5f2ef00..7bf25a2 100644 (file)
 #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_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "sync", 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_SEND_MSG(api, pc, ret_buf, ret,
-                                       MUSE_TYPE_STRING, "format", format,
-                                       MUSE_TYPE_INT, "samplerate", samplerate,
-                                       MUSE_TYPE_INT, "channel", channel);
-
-       g_free(ret_buf);
-       return ret;
-}
-
 int player_set_streaming_playback_rate(player_h player, float rate)
 {
        PLAYER_INSTANCE_CHECK(player);
@@ -192,9 +149,9 @@ int player_set_ecore_wl_display(player_h player, player_display_type_e type, voi
        char *ret_buf = NULL;
        wl_win_msg_type wl_win;
        char *wl_win_msg = (char *)&wl_win;
-       unsigned int wl_surface_id;
+       int wl_surface_id;
        player_private_display_type_e conv_type;
-       unsigned int (*p_disp_set_wl_display)(int, void *) = NULL;
+       int (*p_disp_set_wl_display)(int, void *) = NULL;
        int arr_msg_len = 0;
 
        LOGD("ENTER");
@@ -390,20 +347,20 @@ int player_enable_media_packet_video_frame_decoded_cb(player_h player, bool enab
        return ret;
 }
 
-int player_set_codec_type(player_h player, player_stream_type_e stream_type, player_codec_type_e codec_type)
+int player_set_video_codec_type_ex(player_h player, player_video_codec_type_ex_e codec_type)
 {
        PLAYER_INSTANCE_CHECK(player);
-       PLAYER_CHECK_CONDITION(stream_type == PLAYER_STREAM_TYPE_AUDIO || stream_type == PLAYER_STREAM_TYPE_VIDEO, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
+       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_CODEC_TYPE;
        player_cli_s *pc = (player_cli_s *)player;
        char *ret_buf = NULL;
 
-       LOGD("ENTER stream: %d, codec: %d", stream_type, codec_type);
+       LOGD("ENTER codec: %d", codec_type);
 
        PLAYER_SEND_MSG(api, pc, ret_buf, ret,
-                                       MUSE_TYPE_INT, "stream_type", stream_type,
+                                       MUSE_TYPE_INT, "stream_type", PLAYER_STREAM_TYPE_VIDEO,
                                        MUSE_TYPE_INT, "codec_type", codec_type);
 
        g_free(ret_buf);
@@ -411,11 +368,10 @@ int player_set_codec_type(player_h player, player_stream_type_e stream_type, pla
        return ret;
 }
 
-int player_get_codec_type(player_h player, player_stream_type_e stream_type, player_codec_type_e *pcodec_type)
+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(pcodec_type);
-       PLAYER_CHECK_CONDITION(stream_type == PLAYER_STREAM_TYPE_AUDIO || stream_type == PLAYER_STREAM_TYPE_VIDEO, PLAYER_ERROR_INVALID_PARAMETER, "PLAYER_ERROR_INVALID_PARAMETER");
 
        int ret = PLAYER_ERROR_NONE;
        muse_player_api_e api = MUSE_PLAYER_API_GET_CODEC_TYPE;
@@ -423,53 +379,15 @@ int player_get_codec_type(player_h player, player_stream_type_e stream_type, pla
        char *ret_buf = NULL;
        int codec_type = 0;
 
-       LOGD("ENTER stream_type: %d", stream_type);
+       LOGD("ENTER");
 
-       PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "stream_type", stream_type);
+       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(codec_type, ret_buf);
                *pcodec_type = codec_type;
        }
 
        g_free(ret_buf);
-       LOGD("LEAVE");
-       return ret;
-}
-
-int player_set_audio_offload_enabled(player_h player, bool enabled)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       int ret = PLAYER_ERROR_NONE;
-       muse_player_api_e api = MUSE_PLAYER_API_SET_AUDIO_OFFLOAD_ENABLED;
-       player_cli_s *pc = (player_cli_s *)player;
-       char *ret_buf = NULL;
-       int val = (int)enabled;
-
-       LOGD("ENTER");
-
-       PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "val", val);
-       g_free(ret_buf);
-       return ret;
-}
-
-int player_is_audio_offload_enabled(player_h player, bool *enabled)
-{
-       PLAYER_INSTANCE_CHECK(player);
-       PLAYER_NULL_ARG_CHECK(enabled);
-       int ret = PLAYER_ERROR_NONE;
-       muse_player_api_e api = MUSE_PLAYER_API_IS_AUDIO_OFFLOAD_ENABLED;
-       player_cli_s *pc = (player_cli_s *)player;
-       char *ret_buf = NULL;
-       int val = -1;
-
-       LOGD("ENTER");
-
-       PLAYER_SEND_MSG(api, pc, ret_buf, ret);
-       if (ret == PLAYER_ERROR_NONE) {
-               player_msg_get(val, ret_buf);
-               *enabled = (bool)val;
-       }
-
-       g_free(ret_buf);
+       LOGD("LEAVE codec: %d", *pcodec_type);
        return ret;
 }