[0.2.121] remove deprecated internal api 45/211045/1
authorEunhye Choi <eunhae1.choi@samsung.com>
Mon, 29 Jul 2019 09:20:07 +0000 (18:20 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Mon, 29 Jul 2019 09:20:12 +0000 (18:20 +0900)
- 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

legacy/include/legacy_player_internal.h
legacy/src/legacy_player_internal.c
muse/api.list
muse/include/muse_player.h
muse/src/muse_player.c
packaging/mmsvc-player.spec

index 5b7aa24..fb71d67 100644 (file)
@@ -49,45 +49,6 @@ typedef void (*legacy_player_media_stream_buffer_status_cb_ex)(muse_player_event
                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
  * @details The default value is @c 1.0.
index e95633b..2d2b363 100644 (file)
 /*
  * 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;
index 130d251..c07e630 100644 (file)
@@ -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
index 3e383ab..ed3498b 100644 (file)
@@ -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;
 
index b09089f..37c5f18 100644 (file)
@@ -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;
index fe41fe6..168ca42 100644 (file)
@@ -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