From: Seungbae Shin Date: Thu, 22 Sep 2016 03:41:50 +0000 (+0900) Subject: Apply DEPRECATION macro X-Git-Tag: submit/tizen/20160928.043825~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0eb5c0584c427bcc4f0b6704454e8cc06c60ba1d;p=platform%2Fcore%2Fapi%2Fwav-player.git Apply DEPRECATION macro [Version] 0.1.21 [Profile] Common [Issue Type] Deprecation Change-Id: I27a6f56915d82db7b6489561712b79a61c6e06ee --- diff --git a/include/wav_player.h b/include/wav_player.h index cb03f8b..bf056b3 100644 --- a/include/wav_player.h +++ b/include/wav_player.h @@ -98,7 +98,7 @@ typedef void (*wav_player_playback_completed_cb)(int id, void *user_data); * @see wav_player_stop() * @see wav_player_playback_completed_cb() */ -int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb callback, void *user_data, int *id); +int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb callback, void *user_data, int *id) TIZEN_DEPRECATED_API; /** * @brief Plays a WAV file with stream information of sound-manager. diff --git a/packaging/capi-media-wav-player.spec b/packaging/capi-media-wav-player.spec index 1758108..373c4ba 100755 --- a/packaging/capi-media-wav-player.spec +++ b/packaging/capi-media-wav-player.spec @@ -1,6 +1,6 @@ Name: capi-media-wav-player Summary: A wav player library in Tizen C API -Version: 0.1.20 +Version: 0.1.21 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/wav_player.c b/src/wav_player.c index eaf5ee2..2d4b96d 100755 --- a/src/wav_player.c +++ b/src/wav_player.c @@ -29,7 +29,11 @@ #include "wav_player.h" #include "wav_player_private.h" -int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb cb, void *user_data, int * id) +#define DEPRECATED_WARN_INSTEAD(msg) do { \ + LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use %s() instead.", __func__, msg); \ +} while (0) + +int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb cb, void *user_data, int *id) { int ret = MM_ERROR_NONE; int player = -1; @@ -38,6 +42,8 @@ int wav_player_start(const char *path, sound_type_e type, wav_player_playback_co _completed_cb = NULL; _cb_data *cb_data = NULL; + DEPRECATED_WARN_INSTEAD("wav_player_start_with_stream_info"); + if (path == NULL) return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER); @@ -46,7 +52,6 @@ int wav_player_start(const char *path, sound_type_e type, wav_player_playback_co m_path[0] = '\0'; if (path[0] != '/') { - if (getcwd(m_path, PATH_MAX) != NULL) strncat(m_path, "/", PATH_MAX-strlen(m_path)); } @@ -62,7 +67,6 @@ int wav_player_start(const char *path, sound_type_e type, wav_player_playback_co } ret = mm_sound_play_sound(m_path, type, _completed_cb , cb_data, &player); - if (ret == 0 && id != NULL) *id = player;