TFIVE-08-Removed media-content Depricated APIs (video_meta_get_played_position, video... 94/170794/2 submit/tizen/20180223.044729
authorKartik Tidke <kr.tidke@samsung.com>
Wed, 21 Feb 2018 09:49:32 +0000 (15:19 +0530)
committerKartik Tidke <kr.tidke@samsung.com>
Thu, 22 Feb 2018 07:27:20 +0000 (12:57 +0530)
Change-Id: Ic1866799c209359d7857d99b22e3dc6ed9bc8f08

16 files changed:
include/common/mp-util-media-service.h
playview/src/core/include/vp-media-contents.h
playview/src/core/vp-media-contents.c
playview/src/view/vp-play-normal-view.c
src/common/mp-util-media-service.c
src/common/mp-util.c
src/common/mp-video-info-ctrl.c
src/view/mp-video-list-personal-view.c
src/view/mp-video-list-remove-view.c
src/view/mp-video-list-share-via-view.c
src/view/mp-video-list-view-item-of-folder.c
src/view/mp-video-list-view-normal.c
src/view/mp-video-list-view-select.c
src/view/mp-video-list-view-thumbnail.c
src/view/mp-video-search-view.c
src/widget/mp-video-rename-ctrl.c

index bfce881..bb9e76a 100644 (file)
@@ -77,8 +77,6 @@ bool mp_util_svc_remove_item_by_list_index(int nVideoItemIndex);
 bool mp_util_svc_get_video_id_by_video_url(const char *szPath,
                                                                                   char **szVideoID);
 char *mp_util_svc_get_video_Thumbnail_by_video_url(const char *szMediaUri);
-unsigned int mp_util_svc_get_video_last_play_time_by_video_url(const char
-                                                                                                                          *szPath);
 void mp_util_svc_set_video_last_played_time_by_url(char *szMediaUri,
                                                                                                   unsigned int nPosition);
 
@@ -87,7 +85,6 @@ char *mp_util_svc_get_video_url(const int nVideoItemIndex);
 char *mp_util_svc_get_video_thumbnail(const int nVideoItemIndex);
 char *mp_util_svc_get_video_title(const int nVideoItemIndex);
 int mp_util_svc_get_video_duration_time(const int nVideoItemIndex);
-int mp_util_svc_get_video_last_played_pos(const int nVideoItemIndex);
 unsigned long long mp_util_svc_get_video_item_size(const int
                                                                                                   nVideoItemIndex);
 
index 951d4a3..fb4bed7 100644 (file)
@@ -39,12 +39,6 @@ bool vp_media_contents_scan_file(const char *szFilePath);
 bool vp_media_contents_update_db(const char *szMediaURL);
 bool vp_media_contents_refresh_db(const char *szMediaID);
 
-bool vp_media_contents_set_played_position(const char *szFilePath,
-                                                                                  int nPosition);
-bool vp_media_contents_get_played_position(const char *szFilePath,
-                                                                                  int *nPosition);
-bool vp_media_contents_set_played_time(const char *szFilePath);
-
 bool vp_media_contents_get_content_info(const char *szFilePath,
                                                                                char **szTitle, int *nWidth,
                                                                                int *nHeight, int *nDuration,
index f415d9a..6157127 100644 (file)
@@ -597,374 +597,6 @@ bool vp_media_contents_refresh_db(const char *szMediaID)
 
 /**
  *
- * @param szFilePath
- * @return
- */
-bool vp_media_contents_set_played_time(const char *szFilePath)
-{
-       if (szFilePath == NULL) {
-               VideoLogError("szFilePath is NULL");
-               return FALSE;
-       }
-
-       vp_media_contents_connect();
-
-       media_info_h pMediaHandle = NULL;
-       filter_h pFilterHandle = NULL;
-       video_meta_h pVideoHandle = NULL;
-
-       int nRet = MEDIA_CONTENT_ERROR_NONE;
-
-       char szTmpStr[4096] = { 0, };
-       snprintf(szTmpStr, 4096,
-                        "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
-                        szFilePath);
-
-       nRet = media_filter_create(&pFilterHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_create is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       if (pFilterHandle == NULL) {
-               VideoLogError("Filter handle is NULL");
-               goto Exception;
-       }
-
-       nRet =
-               media_filter_set_condition(pFilterHandle, szTmpStr,
-                                                                  MEDIA_CONTENT_COLLATE_DEFAULT);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet =
-               media_info_foreach_media_from_db(pFilterHandle,
-                                                                                __vp_media_contents_info_cb,
-                                                                                &pMediaHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
-                                         nRet);
-               goto Exception;
-       }
-
-       if (pMediaHandle == NULL) {
-               VideoLogError("media info handle is NULL");
-               goto Exception;
-       }
-
-       nRet = media_info_get_video(pMediaHandle, &pVideoHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_get_video is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       if (pVideoHandle == NULL) {
-               VideoLogError("media info handle is NULL");
-               goto Exception;
-       }
-
-       time_t tNowTime = 0;
-       time(&tNowTime);
-
-       nRet = video_meta_set_played_time(pVideoHandle, tNowTime);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError(" video_meta_set_played_time is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = video_meta_update_to_db(pVideoHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("video_meta_update_to_db is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = video_meta_destroy(pVideoHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("video_meta_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = media_info_destroy(pMediaHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = media_filter_destroy(pFilterHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       return TRUE;
-
-  Exception:
-
-       if (pFilterHandle) {
-               media_filter_destroy(pFilterHandle);
-               pFilterHandle = NULL;
-       }
-
-       if (pMediaHandle) {
-               media_info_destroy(pMediaHandle);
-               pMediaHandle = NULL;
-       }
-
-       if (pVideoHandle) {
-               video_meta_destroy(pVideoHandle);
-               pVideoHandle = NULL;
-       }
-       return FALSE;
-}
-
-/**
- *
- * @param szFilePath
- * @param nPosition
- * @return
- */
-bool vp_media_contents_set_played_position(const char *szFilePath,
-                                                                                  int nPosition)
-{
-       if (szFilePath == NULL) {
-               VideoLogError("szFilePath is NULL");
-               return FALSE;
-       }
-
-       vp_media_contents_connect();
-
-       media_info_h pMediaHandle = NULL;
-       filter_h pFilterHandle = NULL;
-       video_meta_h pVideoHandle = NULL;
-
-       int nRet = MEDIA_CONTENT_ERROR_NONE;
-
-       char szTmpStr[4096] = { 0, };
-       snprintf(szTmpStr, 4096,
-                        "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
-                        szFilePath);
-
-       nRet = media_filter_create(&pFilterHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_create is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       if (pFilterHandle == NULL) {
-               VideoLogError("Filter handle is NULL");
-               goto Exception;
-       }
-
-       nRet =
-               media_filter_set_condition(pFilterHandle, szTmpStr,
-                                                                  MEDIA_CONTENT_COLLATE_DEFAULT);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet =
-               media_info_foreach_media_from_db(pFilterHandle,
-                                                                                __vp_media_contents_info_cb,
-                                                                                &pMediaHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
-                                         nRet);
-               goto Exception;
-       }
-
-       if (pMediaHandle == NULL) {
-               VideoLogError("media info handle is NULL");
-               goto Exception;
-       }
-
-       nRet = media_info_get_video(pMediaHandle, &pVideoHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_get_video is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       if (pVideoHandle == NULL) {
-               VideoLogError("media info handle is NULL");
-               goto Exception;
-       }
-
-       nRet = video_meta_set_played_position(pVideoHandle, nPosition);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError(" video_meta_set_played_position is fail : 0x%x",
-                                         nRet);
-               goto Exception;
-       }
-
-       nRet = video_meta_update_to_db(pVideoHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("video_meta_update_to_db is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = video_meta_destroy(pVideoHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("video_meta_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = media_info_destroy(pMediaHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = media_filter_destroy(pFilterHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       return TRUE;
-
-  Exception:
-
-       if (pFilterHandle) {
-               media_filter_destroy(pFilterHandle);
-               pFilterHandle = NULL;
-       }
-
-       if (pMediaHandle) {
-               media_info_destroy(pMediaHandle);
-               pMediaHandle = NULL;
-       }
-
-       if (pVideoHandle) {
-               video_meta_destroy(pVideoHandle);
-               pVideoHandle = NULL;
-       }
-       return FALSE;
-}
-
-/**
- *
- * @param szFilePath
- * @param nPosition
- * @return
- */
-bool vp_media_contents_get_played_position(const char *szFilePath,
-                                                                                  int *nPosition)
-{
-       if (szFilePath == NULL) {
-               VideoLogError("szFilePath is NULL");
-               return FALSE;
-       }
-
-       vp_media_contents_connect();
-
-       media_info_h pMediaHandle = NULL;
-       filter_h pFilterHandle = NULL;
-       video_meta_h pVideoHandle = NULL;
-
-       int nRet = MEDIA_CONTENT_ERROR_NONE;
-
-       char szTmpStr[4096] = { 0, };
-       snprintf(szTmpStr, 4096,
-                        "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101) AND MEDIA_PATH = \"%s\"",
-                        szFilePath);
-
-       nRet = media_filter_create(&pFilterHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_create is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       if (pFilterHandle == NULL) {
-               VideoLogError("Filter handle is NULL");
-               goto Exception;
-       }
-
-       nRet =
-               media_filter_set_condition(pFilterHandle, szTmpStr,
-                                                                  MEDIA_CONTENT_COLLATE_DEFAULT);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_set_condition is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet =
-               media_info_foreach_media_from_db(pFilterHandle,
-                                                                                __vp_media_contents_info_cb,
-                                                                                &pMediaHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_foreach_media_from_db is fail : 0x%x",
-                                         nRet);
-               goto Exception;
-       }
-
-       if (pMediaHandle == NULL) {
-               VideoLogError("media info handle is NULL");
-               goto Exception;
-       }
-
-       nRet = media_info_get_video(pMediaHandle, &pVideoHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_get_video is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       if (pVideoHandle == NULL) {
-               VideoLogError("media info handle is NULL");
-               goto Exception;
-       }
-
-       nRet = video_meta_get_played_position(pVideoHandle, nPosition);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("video_meta_get_played_position is fail : 0x%x",
-                                         nRet);
-               goto Exception;
-       }
-
-       nRet = video_meta_destroy(pVideoHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("video_meta_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = media_info_destroy(pMediaHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_info_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       nRet = media_filter_destroy(pFilterHandle);
-       if (nRet != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("media_filter_destroy is fail : 0x%x", nRet);
-               goto Exception;
-       }
-
-       return TRUE;
-
-  Exception:
-
-       if (pFilterHandle) {
-               media_filter_destroy(pFilterHandle);
-               pFilterHandle = NULL;
-       }
-
-       if (pMediaHandle) {
-               media_info_destroy(pMediaHandle);
-               pMediaHandle = NULL;
-       }
-
-       if (pVideoHandle) {
-               video_meta_destroy(pVideoHandle);
-               pVideoHandle = NULL;
-       }
-       return FALSE;
-
-
-}
-
-/**
- *
  * @param pMediaHandle
  * @param szLastModified
  * @return
index a06d781..2d6b96c 100644 (file)
@@ -4429,13 +4429,7 @@ static void __vp_normal_completed_cb(void *pUserData)
        VP_EVAS_DEL(pNormalView->pFlickJumpSeek);
 #endif
 
-       if (pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_WEB &&
-               pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_PREVIEW &&
-               pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MESSAGE &&
-               pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_EMAIL &&
-               pNormalView->nLaunchingType != VIDEO_PLAY_TYPE_MULTI_PATH) {
-               vp_media_contents_set_played_position(pNormalView->szMediaURL, 0);
-       } else if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
+       if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
                vp_multi_path_set_item_position(pNormalView->szMediaURL, 0,
                                                                                pPlayView->pMultiPathList);
        }
@@ -8400,20 +8394,10 @@ static bool _vp_play_normal_view_play_start(NormalView * pNormalView,
                if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_STORE ||
                        pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_LIST ||
                        pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_OTHER) {
-                       int nStartPos = 0;
-                       if (vp_media_contents_get_played_position
-                               (pNormalView->szMediaURL, &nStartPos)) {
-                               pNormalView->nStartPosition = nStartPos;
-                       }
+                               pNormalView->nStartPosition = 0;
                }
        }
 
-       if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_STORE ||
-               pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_LIST ||
-               pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_OTHER) {
-               vp_media_contents_set_played_time(pNormalView->szMediaURL);
-       }
-
        vp_play_subtitle_set_text(pNormalView->pSubtitle, NULL);
 
        if (bCheckDRM) {
@@ -9223,29 +9207,6 @@ static void _vp_play_normal_view_set_played_time(NormalView * pNormalView)
                if (!vp_mm_player_get_position
                        (pNormalView->pPlayerHandle, &nPosition)) {
                        VideoLogError("vp_mm_player_get_position is fail");
-               } else {
-                       if (nPosition == pNormalView->nDuration) {
-                               vp_media_contents_set_played_position(pNormalView->
-                                                                                                         szMediaURL, 0);
-
-                       } else {
-                               vp_mm_player_state_t nState = VP_MM_PLAYER_STATE_NONE;
-                               if (!vp_mm_player_get_state
-                                       (pNormalView->pPlayerHandle, &nState)) {
-                                       VideoLogWarning("vp_mm_player_get_state is fail");
-                               }
-
-                               if (nState == VP_MM_PLAYER_STATE_PLAYING) {
-                                       nPosition -= 5000;
-                               }
-
-                               if (nPosition < 0) {
-                                       nPosition = 0;
-                               }
-                               vp_media_contents_set_played_position(pNormalView->
-                                                                                                         szMediaURL,
-                                                                                                         nPosition);
-                       }
                }
        } else if (pNormalView->nLaunchingType == VIDEO_PLAY_TYPE_MULTI_PATH) {
                if (!vp_mm_player_get_position
index 6561b08..036c940 100644 (file)
@@ -1037,71 +1037,6 @@ bool mp_util_svc_get_video_id_by_video_url(const char *szPath,
 }
 
 /**
-* Get last played time of a video
-* @param szPath : path of video
-* @return last played time
-*/
-unsigned int mp_util_svc_get_video_last_play_time_by_video_url(const char
-                                                                                                                          *szPath)
-{
-       if (!szPath) {
-               VideoLogError("No exist video path.");
-               return 0;
-       }
-
-       VideoLogInfo("szPath : %s", szPath);
-
-       int nLastPlayedTime = 0;
-       media_info_h pVideoItem = NULL;
-       filter_h m_FilterHandle = NULL;
-       char szTmpStr[STR_LEN_MAX] = { 0, };
-
-       if (media_filter_create(&m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("Fail to create media filter handle.");
-               return FALSE;
-       }
-
-       snprintf(szTmpStr, STR_LEN_MAX,
-                        "MEDIA_TYPE = 1 AND (MEDIA_STORAGE_TYPE=0 OR MEDIA_STORAGE_TYPE=1 OR MEDIA_STORAGE_TYPE=101 OR MEDIA_STORAGE_TYPE=121) AND MEDIA_PATH = \"%s\"",
-                        szPath);
-       if (media_filter_set_condition
-               (m_FilterHandle, szTmpStr,
-                MEDIA_CONTENT_COLLATE_DEFAULT) != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("Fail to set filter condition.");
-               media_filter_destroy(m_FilterHandle);
-               return FALSE;
-       }
-
-       if (media_info_foreach_media_from_db
-               (m_FilterHandle, mp_util_svc_iterate_for_get_video_item_cb,
-                &pVideoItem) != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError
-                       ("Fail to get video item list with filter condition.");
-               media_filter_destroy(m_FilterHandle);
-               return FALSE;
-       }
-
-       if (media_filter_destroy(m_FilterHandle) != MEDIA_CONTENT_ERROR_NONE) {
-               VideoLogError("Fail to destroy media filter handle.");
-               return FALSE;
-       }
-
-       if (pVideoItem) {
-               video_meta_h pVideoMetaHandle = NULL;
-               if (media_info_get_video(pVideoItem, &pVideoMetaHandle) ==
-                       MEDIA_CONTENT_ERROR_NONE) {
-                       video_meta_get_played_position(pVideoMetaHandle,
-                                                                                  &nLastPlayedTime);
-                       VideoLogInfo("Last Played Time : %d", nLastPlayedTime);
-                       video_meta_destroy(pVideoMetaHandle);
-               }
-               media_info_destroy(pVideoItem);
-       }
-
-       return (unsigned int) nLastPlayedTime;
-}
-
-/**
 * Get thumbnail of the video with specified url
 * @param szMediaUri : path of video
 * @return thumbnail path
@@ -1220,8 +1155,6 @@ void mp_util_svc_set_video_last_played_time_by_url(char *szMediaUri,
                        VideoLogError("Fail to get pVideoMetaHandle.");
                } else {
                        if (pVideoMetaHandle) {
-                               video_meta_set_played_position(pVideoMetaHandle,
-                                                                                          nLastPlayedTime);
                                video_meta_update_to_db(pVideoMetaHandle);
                                video_meta_destroy(pVideoMetaHandle);
                        } else {
@@ -1366,38 +1299,6 @@ int mp_util_svc_get_video_duration_time(const int nVideoItemIndex)
 }
 
 /**
-* Get last played position
-* @param nVideoItemIndex : index of the video
-* @return last played position
-*/
-int mp_util_svc_get_video_last_played_pos(const int nVideoItemIndex)
-{
-       if (!VideoItemList) {
-               VideoLogError("Not exist video item list handle.");
-               return 0;
-       }
-
-       int nLastPlayedTime = 0;
-       media_info_h pVideoItem =
-               (media_info_h) eina_list_nth(VideoItemList, nVideoItemIndex);
-
-       if (pVideoItem) {
-               video_meta_h pVideoMetaHandle = NULL;
-               if (media_info_get_video(pVideoItem, &pVideoMetaHandle) ==
-                       MEDIA_CONTENT_ERROR_NONE) {
-                       video_meta_get_played_position(pVideoMetaHandle,
-                                                                                  &nLastPlayedTime);
-
-                       VideoLogInfo("nIndexGenlist : %d==%d", nLastPlayedTime,
-                                                nVideoItemIndex);
-                       video_meta_destroy(pVideoMetaHandle);
-               }
-       }
-
-       return (int) nLastPlayedTime;
-}
-
-/**
 * Get video item size
 * @param nVideoItemIndex : index of the video
 * @return video file size
@@ -2306,10 +2207,7 @@ bool mp_util_svc_get_video_detail_by_video_url(const char *szPath,
                if (media_info_get_video(pVideoItem, &pVideoMetaHandle) ==
                        MEDIA_CONTENT_ERROR_NONE) {
                        //last played time
-                       int nLastPlayedTime = 0;
-                       video_meta_get_played_position(pVideoMetaHandle,
-                                                                                  &nLastPlayedTime);
-                       *nPlayedTime = (unsigned int) nLastPlayedTime;
+                       *nPlayedTime = 0;
 
                        //Duratiom time
                        int duration = 0;
index 2b6b9fb..8ad935c 100644 (file)
@@ -1339,11 +1339,12 @@ bool mp_util_call_off(void)
                        VideoLogError("Cannot get call list information for the sim");
                        return TRUE;
                }
-
-               ret = telephony_call_get_status(*call_list_sim, &status);
-               if (ret != TELEPHONY_ERROR_NONE) {
-                       VideoLogError("getting call status failed");
-                       return TRUE;
+               if (call_list_sim) {
+                       ret = telephony_call_get_status(*call_list_sim, &status);
+                       if (ret != TELEPHONY_ERROR_NONE) {
+                               VideoLogError("getting call status failed");
+                               return TRUE;
+                       }
                }
                VideoLogDebug("call status = %d", status);
 
@@ -2548,38 +2549,10 @@ char *mp_util_get_preview_image_path(const char *szFilePath)
                return NULL;
        }
 
-       char *szVideoID = NULL;
        char *szFileName = NULL;
-       int nPosition = 0;
-
-       nPosition =
-               mp_util_svc_get_video_last_play_time_by_video_url(szFilePath);
-       if (nPosition == 0) {
-               szFileName =
-                       mp_util_svc_get_video_Thumbnail_by_video_url(szFilePath);
-               return szFileName;
-       }
-
-       if (!mp_util_svc_get_video_id_by_video_url(szFilePath, &szVideoID)) {
-               VideoLogError("mp_util_svc_get_video_id_by_video_url is Fail");
-               MP_FREE_STRING(szVideoID);
-               szFileName =
-                       mp_util_svc_get_video_Thumbnail_by_video_url(szFilePath);
-               return szFileName;
-       }
 
        szFileName =
-               g_strdup_printf("%s/%s.jpg", VIDEO_THUMB_DATA_DIR, szVideoID);
-       if (!vp_file_exists(szFileName)) {
-               MP_FREE_STRING(szVideoID);
-               MP_FREE_STRING(szFileName);
-               szFileName =
-                       mp_util_svc_get_video_Thumbnail_by_video_url(szFilePath);
-               return szFileName;
-       }
-
-       MP_FREE_STRING(szVideoID);
-
+               mp_util_svc_get_video_Thumbnail_by_video_url(szFilePath);
        return szFileName;
 }
 
index e743b22..f628058 100644 (file)
@@ -16,6 +16,7 @@
 
 
 #include <metadata_extractor.h>
+#include <stdlib.h>
 #include <mime_type.h>
 
 #include <unicode/utmscale.h>
index 8fd587b..a4d56f4 100644 (file)
@@ -790,8 +790,7 @@ char *mp_personal_view_get_duration_time(int nVideoItemIndex)
 
        unsigned int nVideoInfoDuration =
                mp_util_svc_get_video_duration_time(nVideoItemIndex);
-       unsigned int nVideoInfoLastTime =
-               mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+       unsigned int nVideoInfoLastTime = 0;
 
        mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime, FALSE);
        mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
@@ -988,36 +987,7 @@ Evas_Object *mp_personal_view_get_icon_of_video_item_cb(const void
 
                return pBg;
        } else if (!strcmp(pPart, "elm.progressbar.icon")) {
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime <= 0) {
                        return NULL;
-               }
-
-               double nRatio = 0.0;
-
-               if (nDurationTime > 0) {
-                       nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
-               }
-
-               if (nRatio < 0.05) {
-                       nRatio = 0.05;
-               }
-
-               Evas_Object *pProgressBar = elm_progressbar_add(pObject);
-               elm_object_style_set(pProgressBar, "video/list_progress");
-               elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-               evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
-                                                                               EVAS_HINT_FILL);
-               evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
-                                                                                EVAS_HINT_EXPAND);
-               elm_progressbar_value_set(pProgressBar, nRatio);
-               evas_object_show(pProgressBar);
-
-               return pProgressBar;
        } else if (!strcmp(pPart, "elm.lock.icon")) {
                char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
                bool bRet = mp_util_check_video_personal_status((const char *)
index b187408..79dca2a 100644 (file)
@@ -878,8 +878,7 @@ char *mp_remove_view_get_duration_time(int nVideoItemIndex)
 
        unsigned int nVideoInfoDuration =
                mp_util_svc_get_video_duration_time(nVideoItemIndex);
-       unsigned int nVideoInfoLastTime =
-               mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+       unsigned int nVideoInfoLastTime = 0;
 
        mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime, FALSE);
        mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
@@ -1361,35 +1360,7 @@ static Evas_Object *__mp_remove_view_get_grid_icon_cb(const void
 
                return pBg;
        } else if (!strcmp(pPart, "elm.progressbar.icon")) {
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime <= 0) {
-                       return NULL;
-               }
-
-               double nRatio = 0.0;
-               if (nDurationTime > 0) {
-                       nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
-               }
-
-               if (nRatio < 0.05) {
-                       nRatio = 0.05;
-               }
-
-               Evas_Object *pProgressBar = elm_progressbar_add(pObject);
-               elm_object_style_set(pProgressBar, "video/list_progress");
-               elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-               evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
-                                                                               EVAS_HINT_FILL);
-               evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
-                                                                                EVAS_HINT_EXPAND);
-               elm_progressbar_value_set(pProgressBar, nRatio);
-               evas_object_show(pProgressBar);
-
-               return pProgressBar;
+               return NULL;
        } else if (!strcmp(pPart, "elm.lock.icon")) {
                char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
                bool bRet =
@@ -1491,42 +1462,6 @@ Evas_Object *mp_remove_view_get_icon_of_video_item_cb(const void
 
                MP_FREE_STRING(pThumbIconUri);
 
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime > 0) {
-                       double nRatio = 0.0;
-
-                       if (nDurationTime > 0) {
-                               nRatio = ((double) nLastPlayedTime) /
-                                       ((double) nDurationTime);
-                       }
-
-                       if (nRatio < 0.05) {
-                               nRatio = 0.05;
-                       }
-
-                       Evas_Object *pProgressBar = elm_progressbar_add(pLayout);
-                       elm_object_style_set(pProgressBar,
-                                                                "elm/progressbar/horizontal/default");
-                       elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-                       elm_progressbar_span_size_set(pProgressBar,
-                                                                                 VIDEO_LIST_PROGRESSBAR_LENGTH);
-                       evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
-                                                                                       EVAS_HINT_FILL);
-                       evas_object_size_hint_weight_set(pProgressBar,
-                                                                                        EVAS_HINT_EXPAND,
-                                                                                        EVAS_HINT_EXPAND);
-                       elm_progressbar_value_set(pProgressBar, nRatio);
-                       elm_layout_content_set(pLayout, "elm.progressbar.icon",
-                                                                  pProgressBar);
-
-                       if (pProgressBar)
-                               evas_object_show(pProgressBar);
-               }
-
                if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
                        VideoLogWarning("Local File or Create sub icon is failed.",
                                                        nVideoItemIndex);
index 33e1f9b..c0e98da 100644 (file)
@@ -920,8 +920,7 @@ char *mp_share_view_get_duration_time(int nVideoItemIndex)
 
        unsigned int nVideoInfoDuration =
                mp_util_svc_get_video_duration_time(nVideoItemIndex);
-       unsigned int nVideoInfoLastTime =
-               mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+       unsigned int nVideoInfoLastTime = 0;
 
        mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime, FALSE);
        mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
@@ -1225,35 +1224,7 @@ static Evas_Object *__mp_share_view_get_grid_icon_cb(const void *pUserData,
 
                return pBg;
        } else if (!strcmp(pPart, "elm.progressbar.icon")) {
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime <= 0) {
-                       return NULL;
-               }
-
-               double nRatio = 0.0;
-               if (nDurationTime > 0) {
-                       nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
-               }
-
-               if (nRatio < 0.05) {
-                       nRatio = 0.05;
-               }
-               Evas_Object *pProgressBar = elm_progressbar_add(pObject);
-               elm_object_style_set(pProgressBar, "video/list_progress");
-               elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-               evas_object_size_hint_align_set(pProgressBar,
-                                                                               EVAS_HINT_FILL, EVAS_HINT_FILL);
-               evas_object_size_hint_weight_set(pProgressBar,
-                                                                                EVAS_HINT_EXPAND,
-                                                                                EVAS_HINT_EXPAND);
-               elm_progressbar_value_set(pProgressBar, nRatio);
-               evas_object_show(pProgressBar);
-
-               return pProgressBar;
+               return NULL;
        } else if (!strcmp(pPart, "elm.lock.icon")) {
                char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
                bool bRet = mp_util_check_video_personal_status((const char *)
@@ -1347,41 +1318,6 @@ Evas_Object *mp_share_view_get_icon_of_video_item_cb(const void *pUserData,
 
                MP_FREE_STRING(pThumbIconUri);
 
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime > 0) {
-                       double nRatio = 0.0;
-
-                       if (nDurationTime > 0) {
-                               nRatio = ((double) nLastPlayedTime) /
-                                       ((double) nDurationTime);
-                       }
-
-                       if (nRatio < 0.05) {
-                               nRatio = 0.05;
-                       }
-                       Evas_Object *pProgressBar = elm_progressbar_add(pLayout);
-                       elm_object_style_set(pProgressBar,
-                                                                "elm/progressbar/horizontal/default");
-                       elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-                       elm_progressbar_span_size_set(pProgressBar,
-                                                                                 VIDEO_LIST_PROGRESSBAR_LENGTH);
-                       evas_object_size_hint_align_set(pProgressBar,
-                                                                                       EVAS_HINT_FILL,
-                                                                                       EVAS_HINT_FILL);
-                       evas_object_size_hint_weight_set(pProgressBar,
-                                                                                        EVAS_HINT_EXPAND,
-                                                                                        EVAS_HINT_EXPAND);
-                       elm_progressbar_value_set(pProgressBar, nRatio);
-                       evas_object_show(pProgressBar);
-
-                       elm_layout_content_set(pLayout, "elm.progress.icon",
-                                                                  pProgressBar);
-               }
-
                if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
                        VideoLogWarning("Create sub icon is failed.", nVideoItemIndex);
                }
index 87902fd..3aaffca 100644 (file)
@@ -556,28 +556,6 @@ Evas_Object *__mp_folder_item_view_get_icon_of_video_item_cb(void
 
                MP_FREE_STRING(pThumbIconUri);
 
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime > 0 && nDurationTime > 0) {
-                       double nRatio =
-                               ((double) nLastPlayedTime) / ((double) nDurationTime);
-                       if (nRatio < 0.05) {
-                               nRatio = 0.05;
-                       }
-
-                       Evas_Object *pProgressBar =
-                               mp_widget_ctrl_create_progressbar(pLayout, nRatio);
-                       elm_layout_content_set(pLayout, "elm.progressbar.icon",
-                                                                  pProgressBar);
-
-                       if (pProgressBar) {
-                               evas_object_show(pProgressBar);
-                       }
-               }
-
                if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
                        VideoLogWarning("Local File or Create sub icon is failed.",
                                                        nVideoItemIndex);
@@ -612,36 +590,7 @@ Evas_Object *__mp_folder_item_view_get_icon_of_video_item_cb(void
 
                return thumb;
        } else if (!strcmp(pPart, "elm.progressbar.icon")) {
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime <= 0) {
-                       return NULL;
-               }
-
-               double nRatio = 0.0;
-
-               if (nDurationTime > 0) {
-                       nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
-               }
-
-               if (nRatio < 0.05) {
-                       nRatio = 0.05;
-               }
-
-               Evas_Object *pProgressBar = elm_progressbar_add(pObject);
-               elm_object_style_set(pProgressBar, "video/list_progress");
-               elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-               evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
-                                                                               EVAS_HINT_FILL);
-               evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
-                                                                                EVAS_HINT_EXPAND);
-               elm_progressbar_value_set(pProgressBar, nRatio);
-               evas_object_show(pProgressBar);
-
-               return pProgressBar;
+               return NULL;
        }
 
        MP_DEL_OBJ(pLayout);
@@ -2287,10 +2236,6 @@ void mp_folder_item_view_update_played_item(void)
                if (pTmpVideoGenlistItem) {
                        elm_genlist_item_selected_set(pTmpVideoGenlistItem,
                                                                                  EINA_FALSE);
-                       int nLastPlayedTime =
-                               mp_util_svc_get_video_last_played_pos(nGenItemIndex);
-                       int nDurationTime =
-                               mp_util_svc_get_video_duration_time(nGenItemIndex);
                        Evas_Object *pIconContent =
                                elm_object_item_part_content_get(pTmpVideoGenlistItem,
                                                                                                 "elm.icon.1");
@@ -2302,22 +2247,10 @@ void mp_folder_item_view_update_played_item(void)
                                elm_layout_content_get(pIconContent,
                                                                           "elm.progressbar.icon");
 
-                       if (nLastPlayedTime > 0 && nDurationTime > 0) {
-                               double nRatio =
-                                       ((double) nLastPlayedTime) / ((double) nDurationTime);
-                               if (!pProgressbar) {
-                                       elm_genlist_item_fields_update(pTmpVideoGenlistItem,
-                                                                                                  "elm.icon.1",
-                                                                                                  ELM_GENLIST_ITEM_FIELD_CONTENT);
-                               } else {
-                                       elm_progressbar_value_set(pProgressbar, nRatio);
-                               }
-                       } else {
-                               if (pProgressbar) {
-                                       elm_layout_content_unset(pIconContent,
-                                                                                        "elm.progressbar.icon");
-                                       MP_DEL_OBJ(pProgressbar);
-                               }
+                       if (pProgressbar) {
+                               elm_layout_content_unset(pIconContent,
+                                                                                "elm.progressbar.icon");
+                               MP_DEL_OBJ(pProgressbar);
                        }
 
                        elm_genlist_item_fields_update(pTmpVideoGenlistItem,
index 85a43ab..fda0dd2 100644 (file)
@@ -201,10 +201,6 @@ void mp_normal_view_update_video_items(int nVideoItemIndex)
                                                                                  nVideoItemIndex);
        if (pTmpVideoGenlistItem) {
                elm_genlist_item_selected_set(pTmpVideoGenlistItem, EINA_FALSE);
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
                Evas_Object *pIconContent =
                        elm_object_item_part_content_get(pTmpVideoGenlistItem,
                                                                                         "elm.icon.1");
@@ -214,27 +210,10 @@ void mp_normal_view_update_video_items(int nVideoItemIndex)
                }
                Evas_Object *pProgressbar =
                        elm_layout_content_get(pIconContent, "elm.progressbar.icon");
-               if (nLastPlayedTime > 0) {
-                       double nRatio =
-                               ((double) nLastPlayedTime) / ((double) nDurationTime);
-                       if (nRatio < 0.05) {
-                               nRatio = 0.05;
-                       }
-
-                       if (!pProgressbar) {
-                               elm_genlist_item_fields_update(pTmpVideoGenlistItem,
-                                                                                          "elm.icon.1",
-                                                                                          ELM_GENLIST_ITEM_FIELD_CONTENT);
-                       } else {
-                               elm_progressbar_value_set(pProgressbar, nRatio);
-                       }
-
-               } else {
-                       if (pProgressbar) {
-                               elm_layout_content_unset(pIconContent,
-                                                                                "elm.progressbar.icon");
-                               MP_DEL_OBJ(pProgressbar);
-                       }
+               if (pProgressbar) {
+                       elm_layout_content_unset(pIconContent,
+                                                                        "elm.progressbar.icon");
+                       MP_DEL_OBJ(pProgressbar);
                }
 
                elm_genlist_item_fields_update(pTmpVideoGenlistItem,
@@ -518,28 +497,6 @@ Evas_Object *mp_normal_view_get_icon_of_video_item_cb(const void
 
                MP_FREE_STRING(pThumbIconUri);
 
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime > 0) {
-                       double nRatio =
-                               ((double) nLastPlayedTime) / ((double) nDurationTime);
-                       if (nRatio < 0.05) {
-                               nRatio = 0.05;
-                       }
-
-                       Evas_Object *pProgressBar =
-                               mp_widget_ctrl_create_progressbar(pLayout, nRatio);
-                       elm_layout_content_set(pLayout, "elm.progressbar.icon",
-                                                                  pProgressBar);
-
-                       if (pProgressBar) {
-                               evas_object_show(pProgressBar);
-                       }
-               }
-
                if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
                        VideoLogWarning("Local File or Create sub icon is failed.",
                                                        nVideoItemIndex);
index e772400..fd60b27 100644 (file)
@@ -448,38 +448,6 @@ static Evas_Object *__mp_select_view_get_icon_of_video_item_cb(const void
 
                MP_FREE_STRING(pThumbIconUri);
 
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime > 0) {
-                       double nRatio =
-                               ((double) nLastPlayedTime) / ((double) nDurationTime);
-                       if (nRatio < 0.05) {
-                               nRatio = 0.05;
-                       }
-
-                       Evas_Object *pProgressBar = elm_progressbar_add(pLayout);
-                       elm_object_style_set(pProgressBar,
-                                                                "elm/progressbar/horizontal/default");
-                       elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-                       elm_progressbar_span_size_set(pProgressBar,
-                                                                                 VIDEO_LIST_PROGRESSBAR_LENGTH);
-                       evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
-                                                                                       EVAS_HINT_FILL);
-                       evas_object_size_hint_weight_set(pProgressBar,
-                                                                                        EVAS_HINT_EXPAND,
-                                                                                        EVAS_HINT_EXPAND);
-                       elm_progressbar_value_set(pProgressBar, nRatio);
-                       elm_layout_content_set(pLayout, "elm.progressbar.icon",
-                                                                  pProgressBar);
-
-                       if (pProgressBar) {
-                               evas_object_show(pProgressBar);
-                       }
-               }
-
                if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
                        VideoLogWarning("Local File or Create sub icon is failed.",
                                                        nVideoItemIndex);
@@ -755,35 +723,7 @@ static Evas_Object *__mp_select_view_get_grid_icon_cb(const void
 
                return pBg;
        } else if (!strcmp(pPart, "elm.progressbar.icon")) {
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime <= 0) {
                        return NULL;
-               }
-
-               double nRatio = 0.0;
-               if (nDurationTime > 0) {
-                       nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
-               }
-
-               if (nRatio < 0.05) {
-                       nRatio = 0.05;
-               }
-
-               Evas_Object *pProgressBar = elm_progressbar_add(pObject);
-               elm_object_style_set(pProgressBar, "video/list_progress");
-               elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-               evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
-                                                                               EVAS_HINT_FILL);
-               evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
-                                                                                EVAS_HINT_EXPAND);
-               elm_progressbar_value_set(pProgressBar, nRatio);
-               evas_object_show(pProgressBar);
-
-               return pProgressBar;
        } else if (!strcmp(pPart, "elm.lock.icon")) {
                char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
                bool bRet =
index 53c7449..242ca77 100644 (file)
@@ -1339,35 +1339,8 @@ static Evas_Object *__mp_thumbnail_view_get_grid_icon_cb(const void
                MP_FREE_STRING(pThumbIconUri);
                return thumb;
        } else if (!strcmp(pPart, "elm.progressbar.icon")) {
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime <= 0) {
                        return NULL;
-               }
-
-               double nRatio = 0.0;
-
-               if (nDurationTime > 0) {
-                       nRatio = ((double) nLastPlayedTime) / ((double) nDurationTime);
-               }
-
-               if (nRatio < 0.05) {
-                       nRatio = 0.05;
-               }
-               Evas_Object *pProgressBar = elm_progressbar_add(pObject);
-               elm_object_style_set(pProgressBar, "video/list_progress");
-               elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-               evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
-                                                                               EVAS_HINT_FILL);
-               evas_object_size_hint_weight_set(pProgressBar, EVAS_HINT_EXPAND,
-                                                                                EVAS_HINT_EXPAND);
-               elm_progressbar_value_set(pProgressBar, nRatio);
-               evas_object_show(pProgressBar);
 
-               return pProgressBar;
        } else if (!strcmp(pPart, "elm.lock.icon")) {
                char *pVideoFile = mp_util_svc_get_video_url(nVideoItemIndex);
                bool bRet = mp_util_check_video_personal_status((const char *)
index fe0e63c..6d96416 100644 (file)
@@ -521,8 +521,7 @@ char *mp_search_view_get_duration_time(int nVideoItemIndex)
 
        unsigned int nVideoInfoDuration =
                mp_util_svc_get_video_duration_time(nVideoItemIndex);
-       unsigned int nVideoInfoLastTime =
-               mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
+       unsigned int nVideoInfoLastTime = 0;
 
        mp_util_convert_time(nVideoInfoDuration, szTmpStrDurationTime, FALSE);
        mp_util_convert_time(nVideoInfoLastTime, szTmpStrLastPlayedPos, TRUE);
@@ -640,42 +639,6 @@ Evas_Object *mp_search_view_get_icon_of_video_item_cb(const void
 
                MP_FREE_STRING(pThumbIconUri);
 
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nVideoItemIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nVideoItemIndex);
-
-               if (nLastPlayedTime > 0) {
-                       double nRatio = 0.0;
-
-                       if (nDurationTime > 0) {
-                               nRatio = ((double) nLastPlayedTime) /
-                                       ((double) nDurationTime);
-                       }
-
-                       if (nRatio < 0.05) {
-                               nRatio = 0.05;
-                       }
-
-                       Evas_Object *pProgressBar = elm_progressbar_add(pObject);
-                       elm_object_style_set(pProgressBar, "video/list_progress");
-                       elm_progressbar_horizontal_set(pProgressBar, EINA_TRUE);
-                       evas_object_size_hint_align_set(pProgressBar, EVAS_HINT_FILL,
-                                                                                       EVAS_HINT_FILL);
-                       evas_object_size_hint_weight_set(pProgressBar,
-                                                                                        EVAS_HINT_EXPAND,
-                                                                                        EVAS_HINT_EXPAND);
-                       elm_progressbar_value_set(pProgressBar, nRatio);
-
-                       if (!elm_layout_content_set
-                               (pLayout, "elm.progressbar.icon", pProgressBar))
-                               VideoLogError("elm_layout_content_set() is failed.");
-
-                       if (pProgressBar) {
-                               evas_object_show(pProgressBar);
-                       }
-               }
-
                if (!mp_util_create_video_sub_icon(pLayout, nVideoItemIndex)) {
                        VideoLogWarning("Local File or Create sub icon is failed.",
                                                        nVideoItemIndex);
@@ -1923,10 +1886,6 @@ static void __mp_search_view_update_video_items(Evas_Object * pGenlist,
                                                                 nGenItemIndex);
        if (pTmpVideoGenlistItem) {
                elm_genlist_item_selected_set(pTmpVideoGenlistItem, EINA_FALSE);
-               int nLastPlayedTime =
-                       mp_util_svc_get_video_last_played_pos(nPlayVideoIndex);
-               int nDurationTime =
-                       mp_util_svc_get_video_duration_time(nPlayVideoIndex);
                Evas_Object *pIconContent =
                        elm_object_item_part_content_get(pTmpVideoGenlistItem,
                                                                                         "elm.swallow.icon");
@@ -1937,29 +1896,10 @@ static void __mp_search_view_update_video_items(Evas_Object * pGenlist,
                Evas_Object *pProgressbar =
                        elm_layout_content_get(pIconContent, "elm.progressbar.icon");
 
-               if (nLastPlayedTime > 0) {
-                       double nRatio = 0.0;
-
-                       if (nDurationTime > 0) {
-                               nRatio = ((double) nLastPlayedTime) /
-                                       ((double) nDurationTime);
-                       }
-                       if (nRatio < 0.05) {
-                               nRatio = 0.05;
-                       }
-                       if (!pProgressbar) {
-                               elm_genlist_item_fields_update(pTmpVideoGenlistItem,
-                                                                                          "elm.swallow.icon",
-                                                                                          ELM_GENLIST_ITEM_FIELD_CONTENT);
-                       } else {
-                               elm_progressbar_value_set(pProgressbar, nRatio);
-                       }
-               } else {
-                       if (pProgressbar) {
-                               elm_layout_content_unset(pIconContent,
-                                                                                "elm.progressbar.icon");
-                               MP_DEL_OBJ(pProgressbar);
-                       }
+               if (pProgressbar) {
+                       elm_layout_content_unset(pIconContent,
+                                                                        "elm.progressbar.icon");
+                       MP_DEL_OBJ(pProgressbar);
                }
 
                elm_genlist_item_fields_update(pTmpVideoGenlistItem,
index e2c821c..1387c54 100644 (file)
@@ -150,9 +150,6 @@ static void __mp_rename_ctrl_ok_btn_cb(void *pUserData,
                return;
        }
 
-       int nLastPlayedTime =
-               mp_util_svc_get_video_last_play_time_by_video_url(szFilePath);
-
        char *szLocation = NULL;
        szLocation =
                g_strndup(szFilePath, strlen(szFilePath) - strlen(szFileName));
@@ -204,16 +201,12 @@ static void __mp_rename_ctrl_ok_btn_cb(void *pUserData,
                } else {
                        mp_util_svc_move_to_db(g_pRenameHandle->nVideoIndex,
                                                                   szNewPath);
-                       mp_util_svc_set_video_last_played_time_by_url(szNewFile,
-                                                                                                                 nLastPlayedTime);
                }
 
                char *szMediaUrl = mp_util_config_get_preview();
                if (szMediaUrl) {
                        if (!strcmp(szFilePath, szMediaUrl)) {
                                mp_util_config_set_preview(szNewFile);
-                               mp_util_svc_set_video_last_played_time_by_url(szNewFile,
-                                                                                                                         nLastPlayedTime);
                        }
                }