From: Eunhye Choi Date: Mon, 29 Jul 2019 09:20:07 +0000 (+0900) Subject: [0.2.121] remove deprecated internal api X-Git-Tag: submit/tizen/20190813.062516~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08c9b4abd17c966b68b5ec53bad6b1cfd212911f;p=platform%2Fcore%2Fmultimedia%2Fmmsvc-player.git [0.2.121] remove deprecated internal api - remove internal api to extract audio pcm which was replaced with public api. refer: MUSE_PLAYER_API_SET_MEDIA_PACKET_AUDIO_FRAME_DECODED_CB MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_AUDIO_FRAME Change-Id: If198555544a03741ba52ae57a50d1f8c3914e90b --- diff --git a/legacy/include/legacy_player_internal.h b/legacy/include/legacy_player_internal.h index 5b7aa24..fb71d67 100644 --- a/legacy/include/legacy_player_internal.h +++ b/legacy/include/legacy_player_internal.h @@ -48,45 +48,6 @@ typedef enum typedef void (*legacy_player_media_stream_buffer_status_cb_ex)(muse_player_event_e type, player_media_stream_buffer_status_e status, unsigned long long bytes, void *user_data); -/** - * @brief Registers a callback function to be invoked when audio frame is decoded. Audio only contents is possible. If included video, error happens. - * @since_tizen 2.4 - * @param[in] player The handle to the media player - * @param[in] sync Sync on the clock - * @param[in] format Audio format of output pcm - * @param[in] callback The callback function to register - * @param[in] user_data The user data to be passed to the callback function - * @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 - * @retval #PLAYER_ERROR_NOT_SUPPORTD Not supported - * @pre The player state must be #PLAYER_STATE_IDLE by legacy_player_create() or legacy_player_unprepare(). - * @post legacy_player_media_packet_audio_decoded_cb() will be invoked. - */ -int legacy_player_set_pcm_extraction_mode(legacy_player_h player, bool sync, - legacy_player_media_packet_audio_decoded_cb callback, void *user_data); - -/** - * @brief Set pcm mode spec. Samplerate, channel is needed. - * @since_tizen 2.4 - * @param[in] player The handle to the media player - * @param[in] samplerate Samplerate - * @param[in] channel Channel - * @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 - * @retval #PLAYER_ERROR_NOT_SUPPORTD Not supported - * @pre The player state must be #PLAYER_STATE_IDLE by legacy_player_create() or legacy_player_unprepare(). - * @see legacy_player_set_pcm_extraction_mode() - */ -int legacy_player_set_pcm_spec(legacy_player_h player, const char *format, int samplerate, int channel); - /** * @brief Sets the playback rate include streaming mode. * @since_tizen 3.0 diff --git a/legacy/src/legacy_player_internal.c b/legacy/src/legacy_player_internal.c index e95633b..2d2b363 100644 --- a/legacy/src/legacy_player_internal.c +++ b/legacy/src/legacy_player_internal.c @@ -30,57 +30,6 @@ /* * Internal Macros */ - -/* DEPRECATED_PLAYER_INTERNAL_API */ -int legacy_player_set_pcm_extraction_mode(legacy_player_h player, bool sync, legacy_player_media_packet_audio_decoded_cb callback, void *user_data) -{ - legacy_player_t *handle = (legacy_player_t *)player; - PLAYER_INSTANCE_CHECK(player); - PLAYER_NULL_ARG_CHECK(callback); - mmplayer_audio_extract_opt_e opt = MM_PLAYER_AUDIO_EXTRACT_DEINTERLEAVE; /* sync is true */ - - PLAYER_STATE_CHECK(handle, PLAYER_STATE_IDLE); - - if (!sync) - opt = MM_PLAYER_AUDIO_EXTRACT_NO_SYNC_WITH_CLOCK | MM_PLAYER_AUDIO_EXTRACT_DEINTERLEAVE; - - handle->pcm_extract_opt = opt; - handle->user_cb[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_AUDIO_FRAME] = callback; - handle->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_PACKET_AUDIO_FRAME] = user_data; - - return PLAYER_ERROR_NONE; -} - -/* DEPRECATED_PLAYER_INTERNAL_API */ -int legacy_player_set_pcm_spec(legacy_player_h player, const char *format, int samplerate, int channel) -{ - legacy_player_t *handle = (legacy_player_t *)player; - int ret = MM_ERROR_NONE; - PLAYER_INSTANCE_CHECK(player); - - LOGD("format: %s, rate: %d, ch: %d", format, samplerate, channel); - - if (format) { - ret = mm_player_set_attribute(handle->mm_handle, NULL, MM_PLAYER_PCM_EXT_FORMAT, format, strlen(format), NULL); - if (ret != MM_ERROR_NONE) - return _lplayer_convert_error_code(ret, (char *)__FUNCTION__); - } - - if (samplerate > 0) { - ret = mm_player_set_attribute(handle->mm_handle, NULL, MM_PLAYER_PCM_EXT_SAMPLERATE, samplerate, NULL); - if (ret != MM_ERROR_NONE) - return _lplayer_convert_error_code(ret, (char *)__FUNCTION__); - } - - if (channel > 0) { - ret = mm_player_set_attribute(handle->mm_handle, NULL, MM_PLAYER_PCM_EXT_CHANNELS, channel, NULL); - if (ret != MM_ERROR_NONE) - return _lplayer_convert_error_code(ret, (char *)__FUNCTION__); - } - - return PLAYER_ERROR_NONE; -} - int legacy_player_set_streaming_playback_rate(legacy_player_h player, float rate) { legacy_player_t *handle = (legacy_player_t *)player; diff --git a/muse/api.list b/muse/api.list index 130d251..c07e630 100644 --- a/muse/api.list +++ b/muse/api.list @@ -67,8 +67,6 @@ get_track_count get_current_track select_track get_track_language_code -set_pcm_extraction_mode -set_pcm_spec set_streaming_playback_rate return_buffer set_media_stream_dynamic_resolution diff --git a/muse/include/muse_player.h b/muse/include/muse_player.h index 3e383ab..ed3498b 100644 --- a/muse/include/muse_player.h +++ b/muse/include/muse_player.h @@ -85,7 +85,6 @@ typedef enum { MUSE_PLAYER_EVENT_TYPE_RETURN_BUFFER, #endif MUSE_PLAYER_EVENT_TYPE_SERVICE_DISCONNECTED, - MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME, /* DEPRECATED_PLAYER_INTERNAL_API */ MUSE_PLAYER_EVENT_TYPE_NUM } muse_player_event_e; diff --git a/muse/src/muse_player.c b/muse/src/muse_player.c index b09089f..37c5f18 100644 --- a/muse/src/muse_player.c +++ b/muse/src/muse_player.c @@ -893,7 +893,6 @@ static void *__mplayer_callback_function[MUSE_PLAYER_EVENT_TYPE_NUM] = { __mplayer_default_callback, /* MUSE_PLAYER_EVENT_TYPE_RETURN_BUFFER */ #endif NULL, /* MUSE_PLAYER_EVENT_TYPE_SERVICE_DISCONNECTED */ - NULL, /* MUSE_PLAYER_EVENT_TYPE_AUDIO_FRAME, DEPRECATED_PLAYER_INTERNAL_API */ }; static int __mplayer_set_callback_func(muse_player_handle_t *muse_player, muse_player_event_e type, bool set, void *user_data) @@ -2798,51 +2797,6 @@ int player_disp_get_track_language_code(muse_module_h module) return ret; } -int player_disp_set_pcm_extraction_mode(muse_module_h module) /* DEPRECATED_PLAYER_INTERNAL_API */ -{ - int ret = PLAYER_ERROR_NONE; - muse_player_handle_t *muse_player = NULL; - muse_player_api_e api = MUSE_PLAYER_API_SET_PCM_EXTRACTION_MODE; - int sync; - - muse_player = (muse_player_handle_t *)muse_server_ipc_get_handle(module); - player_msg_get(sync, muse_server_module_get_msg(module)); - - muse_player->export_audio_data = true; - ret = legacy_player_set_pcm_extraction_mode(muse_player->player_handle, sync, __mplayer_audio_decoded_cb, module); - - PLAYER_RETURN_MSG(api, ret, module); - - return ret; -} - -int player_disp_set_pcm_spec(muse_module_h module) /* DEPRECATED_PLAYER_INTERNAL_API */ -{ - int ret = PLAYER_ERROR_NONE; - muse_player_handle_t *muse_player = NULL; - muse_player_api_e api = MUSE_PLAYER_API_SET_PCM_SPEC; - char format[MUSE_URI_MAX_LENGTH] = { 0, }; - int samplerate = 0; - int channel = 0; - bool ret_val = true; - - ret_val = __mplayer_disp_get_param_value(muse_server_module_get_msg(module), - MUSE_TYPE_INT, "samplerate", (void *)&samplerate, - MUSE_TYPE_INT, "channel", (void *)&channel, - MUSE_TYPE_STRING, "format", (void *)format, - INVALID_MUSE_TYPE_VALUE); - if (ret_val) { - muse_player = (muse_player_handle_t *)muse_server_ipc_get_handle(module); - ret = legacy_player_set_pcm_spec(muse_player->player_handle, format, samplerate, channel); - } else { - ret = PLAYER_ERROR_INVALID_OPERATION; - } - - PLAYER_RETURN_MSG(api, ret, module); - - return ret; -} - int player_disp_set_streaming_playback_rate(muse_module_h module) { int ret = PLAYER_ERROR_NONE; diff --git a/packaging/mmsvc-player.spec b/packaging/mmsvc-player.spec index fe41fe6..168ca42 100644 --- a/packaging/mmsvc-player.spec +++ b/packaging/mmsvc-player.spec @@ -1,6 +1,6 @@ Name: mmsvc-player Summary: A Media Player module for muse server -Version: 0.2.120 +Version: 0.2.121 Release: 0 Group: Multimedia/Libraries License: Apache-2.0