Removed Deprecated API's 34/211734/4 submit/tizen/20190809.130741 submit/tizen/20190809.134333
authorprachi kumar <prachi.kumar@samsung.com>
Thu, 8 Aug 2019 18:57:40 +0000 (00:27 +0530)
committerAmritanshu <a.pandia1@samsung.com>
Fri, 9 Aug 2019 12:55:41 +0000 (18:25 +0530)
Change-Id: I0d317c0656f29080285a5f978aa42f87be9ea21c

src/common/include/mp-media-info.h
src/common/mp-edit-callback.c
src/common/mp-media-info.c
src/core/mp-player-mgr.c [changed mode: 0644->0755]

index eb439f8..ee0737d 100644 (file)
@@ -24,6 +24,8 @@ extern "C" {
 #include <stdbool.h>
 
 #define MAX_FILTER_LEN 4096
+#define MEDIA_PLAYED_COUNT "played_count"
+#define MEDIA_LAST_PLAYED_TIME "last_played_time"
 
        typedef struct mp_media_list_s *mp_media_list_h;
        typedef struct mp_media_info_s *mp_media_info_h;
@@ -158,7 +160,7 @@ extern "C" {
        int mp_media_info_set_favorite_media_db_only(mp_media_info_h media,
                                                                                                 bool favorite);
        int mp_media_info_set_favorite(mp_media_info_h media, bool favorite);
-       int mp_media_info_set_added_time(mp_media_info_h media, time_t time);
+//     int mp_media_info_set_added_time(mp_media_info_h media, time_t time);
 //int mp_media_info_set_cloud_thumbnail_path(mp_media_info_h media, const char *path);
 
 /*media*/
index d02d635..a868eff 100644 (file)
@@ -581,8 +581,10 @@ inline static int _delete_track(mp_media_info_h item_handle)
                        break;
                }
        case MP_TRACK_BY_ADDED_TIME:{
-                       ret = mp_media_info_set_added_time(item_handle, 0);
-                       MP_CHECK_VAL(ret == 0, -1);
+                       DEBUG_TRACE("API depricated so cannot delete by default added time 0");
+                       return -1;
+                       /*ret = mp_media_info_set_added_time(item_handle, 0);
+                       MP_CHECK_VAL(ret == 0, -1);*/
                        break;
                }
        case MP_TRACK_BY_FAVORITE:{
index 1b6b251..2c38305 100644 (file)
@@ -1609,13 +1609,13 @@ int mp_media_info_set_favorite(mp_media_info_h media, bool favorite)
        return res;
 }
 
-int mp_media_info_set_added_time(mp_media_info_h media, time_t time)
+/*int mp_media_info_set_added_time(mp_media_info_h media, time_t time)
 {
        int res = MEDIA_CONTENT_ERROR_NONE;
        MP_CHECK_VAL(media, -1);
        MP_CHECK_VAL(media->h.media, -1);
 
-       res = media_info_set_added_time(media->h.media, time);
+       res = media_info_set_added_time(media->h.media, time); // API depricated
        if (res != MEDIA_CONTENT_ERROR_NONE) {
                ERROR_TRACE("Error code 0x%x", res);
                return res;
@@ -1625,7 +1625,7 @@ int mp_media_info_set_added_time(mp_media_info_h media, time_t time)
                ERROR_TRACE("Error code 0x%x", res);
        }
        return res;
-}
+}*/
 
 int mp_media_info_group_list_count(mp_group_type_e group_type,
                                                                   const char *type_string,
@@ -2409,6 +2409,7 @@ int mp_media_info_group_get_thumbnail_path(mp_media_info_h media,
                if (res != MEDIA_CONTENT_ERROR_NONE) {
                        mp_error("media_filter_create:error=%d", res);
                        IF_FREE(folde_id);
+                       IF_FREE(type_string);
                        return res;
                }
 
@@ -2553,6 +2554,7 @@ int mp_media_info_group_get_thumbnail_path(mp_media_info_h media,
                        minfo = mp_media_info_list_nth_item(list, 0);
                        if (!minfo) {
                                media_filter_destroy(filter);
+                               IF_FREE(type_string);
                                return -1;
                        }
                        mp_media_info_get_thumbnail_path(minfo, &thumb_path);
@@ -3013,11 +3015,12 @@ int mp_media_info_playlist_get_name_by_id(int playlist_id,
        media = mp_media_info_group_list_nth_item(list, 0);
        if (!media) {
                mp_media_info_group_list_destroy(list);
+               IF_FREE(main_info);
                return -1;
        }
 
        mp_media_info_group_list_destroy(list);
-
+       IF_FREE(main_info);
        return res;
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index e9763fe..82ec51c
@@ -577,15 +577,15 @@ int _mp_player_mgr_create_common(struct appdata *ad, mp_player_type_e type)
 #endif
        }
 
-       if (g_player_apis.set_sound_type) {
+       //if (g_player_apis.set_sound_type) { // SVACE issue, Suspicious comparison with NULL of address of procedure 
                PLAYER_ENTER_LOG("set_sound_type");
                g_player_apis.set_sound_type(_player, ad->stream_info);
                PLAYER_LEAVE_LOG("set_sound_type");
-       }
-       if (g_player_apis.set_audio_latency_mode) {
+       //}
+       //if (g_player_apis.set_audio_latency_mode) { // SVACE issue, Suspicious comparison with NULL of address of procedure
                g_player_apis.set_audio_latency_mode(_player,
                                                                                         AUDIO_LATENCY_MODE_HIGH);
-       }
+       //}
 
        is_seeking = false;
        resume_on_seek_done = false;
@@ -600,22 +600,22 @@ int _mp_player_mgr_create_common(struct appdata *ad, mp_player_type_e type)
                g_player_apis.set_started_cb(_player, _mp_player_mgr_started_cb,
                                                                         NULL);
        }
-       if (g_player_apis.set_completed_cb) {
+       //if (g_player_apis.set_completed_cb) { // SVACE issue, Suspicious comparison with NULL of address of procedure 
                g_player_apis.set_completed_cb(_player,
                                                                           _mp_player_mgr_completed_cb, NULL);
-       }
-       if (g_player_apis.set_interrupted_cb) {
+       //}
+       //if (g_player_apis.set_interrupted_cb) { // SVACE issue, Suspicious comparison with NULL of address of procedure
                g_player_apis.set_interrupted_cb(_player,
                                                                                 _mp_player_mgr_interrupted_cb,
                                                                                 NULL);
-       }
-       if (g_player_apis.set_error_cb) {
+       //}
+       //if (g_player_apis.set_error_cb) { // SVACE issue, Suspicious comparison with NULL of address of procedure
                g_player_apis.set_error_cb(_player, _mp_player_mgr_error_cb, NULL);
-       }
-       if (g_player_apis.set_buffering_cb) {
+       //}
+       //if (g_player_apis.set_buffering_cb) { // SVACE issue, Suspicious comparison with NULL of address of procedure
                g_player_apis.set_buffering_cb(_player,
                                                                           _mp_player_mgr_buffering_cb, NULL);
-       }
+       //}
        if (g_player_apis.set_paused_cb) {
                g_player_apis.set_paused_cb(_player, _mp_player_mgr_paused_cb,
                                                                        NULL);