From 650fd9bdbcc8804d72990971c02ef5b30cfef4c4 Mon Sep 17 00:00:00 2001 From: Eunhye Choi Date: Mon, 9 Sep 2019 16:13:53 +0900 Subject: [PATCH] [0.3.123] remove deprecated internal api Change-Id: Ie6c1e6d19f55120b0ae33597645c695c355cf766 --- include/player_internal.h | 46 -------------------------------------- packaging/capi-media-player.spec | 2 +- src/player_internal.c | 48 ---------------------------------------- test/player_test.c | 29 ++++++------------------ 4 files changed, 8 insertions(+), 117 deletions(-) diff --git a/include/player_internal.h b/include/player_internal.h index 5464107..078fcdd 100644 --- a/include/player_internal.h +++ b/include/player_internal.h @@ -46,16 +46,6 @@ typedef enum { } player_video_codec_type_ex_e; /** - * @brief Enumeration for codec type. - * @since_tizen 4.0 - */ -typedef enum { - PLAYER_CODEC_TYPE_DEFAULT = 0, /**< This is an optional flag for using codec which has higher priority */ - PLAYER_CODEC_TYPE_HW, /**< This is an optional flag for using the h/w codec */ - PLAYER_CODEC_TYPE_SW, /**< This is an optional flag for using the s/w codec */ -} player_codec_type_e; - -/** * @brief Video stream info in external demux case * @since_tizen @if TV 3.0 @endif */ @@ -479,42 +469,6 @@ int player_get_media_packet_video_frame_pool_size(player_h player, int *size); int player_enable_media_packet_video_frame_decoded_cb(player_h player, bool enable); /** - * @brief Set audio/video codec type as h/w codec or s/w codec. - * @since_tizen 4.0 - * @details The default codec type of the player is #PLAYER_CODEC_TYPE_DEFAULT. - * Usually the H/W codec has higher priority than S/W codec if it exist. - * @param[in] player The handle to the media player - * @param[in] stream_type The stream type and it have to be #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_VIDEO. - * @param[in] codec_type The codec type - * @return @c 0 on success, - * otherwise a negative error value - * @retval #PLAYER_ERROR_NONE Successful - * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - * @pre The player state must be #PLAYER_STATE_IDLE by player_create() or player_unprepare(). - * @see player_get_codec_type() - */ -int player_set_codec_type(player_h player, player_stream_type_e stream_type, player_codec_type_e codec_type); /* Deprecated */ - -/** - * @brief Get video codec type. - * @since_tizen 4.0 - * @param[in] player The handle to the media player - * @param[in] stream_type The stream type and it have to be #PLAYER_STREAM_TYPE_AUDIO or #PLAYER_STREAM_TYPE_VIDEO. - * @param[out] pcodec_type The codec type - * @return @c 0 on success, - * otherwise a negative error value - * @retval #PLAYER_ERROR_NONE Successful - * @retval #PLAYER_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #PLAYER_ERROR_INVALID_OPERATION Invalid operation - * @retval #PLAYER_ERROR_INVALID_STATE Invalid player state - * @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED. - * @see player_set_codec_type() - */ -int player_get_codec_type(player_h player, player_stream_type_e stream_type, player_codec_type_e *pcodec_type); /* Deprecated */ - -/** * @brief Set video codec type as h/w codec or s/w codec. * @since_tizen 5.5 * @details The default codec type of the player is #PLAYER_CODEC_TYPE_DEFAULT. diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index da58586..a462131 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.122 +Version: 0.3.123 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/player_internal.c b/src/player_internal.c index bd74f17..7bf25a2 100644 --- a/src/player_internal.c +++ b/src/player_internal.c @@ -347,54 +347,6 @@ int player_enable_media_packet_video_frame_decoded_cb(player_h player, bool enab return ret; } -/* Deprecated */ -int player_set_codec_type(player_h player, player_stream_type_e stream_type, player_codec_type_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"); - - 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); - - PLAYER_SEND_MSG(api, pc, ret_buf, ret, - MUSE_TYPE_INT, "stream_type", stream_type, - MUSE_TYPE_INT, "codec_type", codec_type); - - g_free(ret_buf); - LOGD("LEAVE"); - return ret; -} - -/* Deprecated */ -int player_get_codec_type(player_h player, player_stream_type_e stream_type, player_codec_type_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; - player_cli_s *pc = (player_cli_s *)player; - char *ret_buf = NULL; - int codec_type = 0; - - LOGD("ENTER stream_type: %d", stream_type); - - PLAYER_SEND_MSG(api, pc, ret_buf, ret, MUSE_TYPE_INT, "stream_type", stream_type); - 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_video_codec_type_ex(player_h player, player_video_codec_type_ex_e codec_type) { PLAYER_INSTANCE_CHECK(player); diff --git a/test/player_test.c b/test/player_test.c index 460a7f7..27302c3 100644 --- a/test/player_test.c +++ b/test/player_test.c @@ -170,7 +170,6 @@ enum { CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV, CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV1, CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV2, - CURRENT_STATUS_AUDIO_CODEC_TYPE, CURRENT_STATUS_VIDEO_CODEC_TYPE, CURRENT_STATUS_REPLAYGAIN_ENABLE, CURRENT_STATUS_AUDIO_OFFLOAD, @@ -1496,14 +1495,11 @@ static void get_duration() g_print(" ==> [Player_Test] Duration: [%d ] msec\n", duration); } -static void set_codec_type(int a_codec_type, int v_codec_type) +static void set_video_codec_type(int v_codec_type) { int ret; - ret = player_set_codec_type(g_player[0], PLAYER_STREAM_TYPE_AUDIO, a_codec_type); - g_print(" ==> [Player_Test] audio codec type (%d) return: %d\n", a_codec_type, ret); - - ret = player_set_codec_type(g_player[0], PLAYER_STREAM_TYPE_VIDEO, v_codec_type); + ret = player_set_video_codec_type_ex(g_player[0], v_codec_type); g_print(" ==> [Player_Test] video codec type (%d) return: %d\n", v_codec_type, ret); } @@ -1511,12 +1507,9 @@ static void set_codec_type(int a_codec_type, int v_codec_type) static void get_codec_type(void) { int ret; - player_codec_type_e atype = 0, vtype = 0; - - ret = player_get_codec_type(g_player[0], PLAYER_STREAM_TYPE_AUDIO, &atype); - g_print(" ==> [Player_Test] Audio Codec type: [%d][ret 0x%X]\n", atype, ret); + player_video_codec_type_ex_e vtype = 0; - ret = player_get_codec_type(g_player[0], PLAYER_STREAM_TYPE_VIDEO, &vtype); + ret = player_get_video_codec_type_ex(g_player[0], &vtype); g_print(" ==> [Player_Test] Video Codec type: [%d][ret 0x%X]\n", vtype, ret); } @@ -2405,7 +2398,7 @@ void _interpret_main_menu(char *cmd) } else if (strncmp(cmd, "bf", 2) == 0) { g_menu_state = CURRENT_STATUS_SET_PRE_BUFFERING_SIZE; } else if (strncmp(cmd, "C1", 2) == 0) { - g_menu_state = CURRENT_STATUS_AUDIO_CODEC_TYPE; + g_menu_state = CURRENT_STATUS_VIDEO_CODEC_TYPE; } else if (strncmp(cmd, "C2", 2) == 0) { get_codec_type(); } else if (!strncmp(cmd, "si", 2)) { @@ -2598,8 +2591,6 @@ static void displaymenu() g_print("*** input horizontal field of view angle (1~360 deg.)\n"); } else if (g_menu_state == CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV2) { g_print("*** input vertical field of view angle (1~180 deg.)\n"); - } else if (g_menu_state == CURRENT_STATUS_AUDIO_CODEC_TYPE) { - g_print("*** set audio codec type (1: HW, 2: SW) \n"); } else if (g_menu_state == CURRENT_STATUS_VIDEO_CODEC_TYPE) { g_print("*** set video codec type (1: HW, 2: SW) \n"); } else if (g_menu_state == CURRENT_STATUS_REPLAYGAIN_ENABLE) { @@ -2943,16 +2934,10 @@ static void interpret(char *cmd) reset_menu_state(); } break; - case CURRENT_STATUS_AUDIO_CODEC_TYPE: - { - value1 = atoi(cmd); - g_menu_state = CURRENT_STATUS_VIDEO_CODEC_TYPE; - } - break; case CURRENT_STATUS_VIDEO_CODEC_TYPE: { - value2 = atoi(cmd); - set_codec_type(value1, value2); + value1 = atoi(cmd); + set_video_codec_type(value1); reset_menu_state(); } break; -- 2.7.4