From: Minje Ahn Date: Wed, 15 Nov 2017 06:00:26 +0000 (+0900) Subject: [ACR-1112] Remove deprecated APIs X-Git-Tag: submit/tizen/20171215.070645^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F160251%2F9;p=platform%2Fcore%2Fapi%2Fmedia-content.git [ACR-1112] Remove deprecated APIs - media_audio.h int audio_meta_get_played_count(audio_meta_h audio, int *played_count) int audio_meta_get_played_time(audio_meta_h audio, time_t *played_time) int audio_meta_get_played_position(audio_meta_h audio, int *played_position) int audio_meta_set_played_count(audio_meta_h audio, int played_count) int audio_meta_set_played_time(audio_meta_h audio, time_t played_time) int audio_meta_set_played_position(audio_meta_h audio, int played_position) - media_content.h int media_content_set_db_updated_cb(media_content_db_update_cb callback, void *user_data) int media_content_unset_db_updated_cb(void) - media_video.h int video_meta_get_played_count(video_meta_h video, int *played_count) int video_meta_get_played_time(video_meta_h video, time_t *played_time) int video_meta_get_played_position(video_meta_h video, int *played_position) int video_meta_set_played_count(video_meta_h video, int played_count) int video_meta_set_played_time(video_meta_h video, time_t played_time) int video_meta_set_played_position(video_meta_h video, int played_position) Change-Id: Ifb323383cebf6492b2803e7a27e1b1af2cb3eb1c Signed-off-by: Minje Ahn --- diff --git a/include/media_audio.h b/include/media_audio.h index d28a4b5..6a5c87f 100755 --- a/include/media_audio.h +++ b/include/media_audio.h @@ -359,115 +359,6 @@ int audio_meta_get_channel(audio_meta_h audio, int *channel); int audio_meta_get_duration(audio_meta_h audio, int *duration); /** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - * @brief Gets the number of times the given audio has been played. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[out] played_count The counter of the audio played - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_get_played_count(audio_meta_h audio, int *played_count) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - * @brief Gets the last played time parameter of the audio. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[out] played_time The last played time of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_get_played_time(audio_meta_h audio, time_t *played_time) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - * @brief Gets the played position parameter of the audio. - * @details This function returns the elapsed playback position parameter of the audio as a period - * starting from the beginning of the track. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[out] played_position The elapsed time of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_get_played_position(audio_meta_h audio, int *played_position) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - * @brief Sets the played count of the audio. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[in] played_count The played count of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_set_played_count(audio_meta_h audio, int played_count) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - * @brief Sets the last played time of the audio. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[in] played_time The last played time of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_set_played_time(audio_meta_h audio, time_t played_time) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - * @brief Sets the played position of the audio. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @remarks It is NOT recommended to use this attribute for your application-specific purpose because this attribute can be overwritten by other applications (even 0). - * - * @param[in] audio The audio metadata handle - * @param[in] played_position The played position of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_set_played_position(audio_meta_h audio, int played_position) TIZEN_DEPRECATED_API; - -/** * @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. * @brief Updates an audio metadata with modified attributes in the media database. * @details The function updates the given audio meta in the media database. The function should be called after any change in audio attributes, to be updated to the media diff --git a/include/media_content.h b/include/media_content.h index 76c52a7..5a70a1b 100755 --- a/include/media_content.h +++ b/include/media_content.h @@ -188,48 +188,6 @@ int media_content_scan_folder(const char *path, bool is_recursive, media_scan_co int media_content_cancel_scan_folder(const char *path); /** - * @deprecated Deprecated since 3.0. Use media_content_add_db_updated_cb() instead. - * @brief Subscribes notifications of the media DB change. - * @details This function subscribes notifications of the media DB change which are published by the media server or other apps. - * media_content_db_update_cb() function will be called when notification of the media DB change is subscribed. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] callback The callback to be invoked when the scanning is finished - * @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 #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * - * @see media_content_db_update_cb() - * @see media_content_unset_db_updated_cb() - */ -int media_content_set_db_updated_cb(media_content_db_update_cb callback, void *user_data) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since 3.0. Use media_content_remove_db_updated_cb() instead. - * @brief Unsubscribes notifications of the media DB change. - * @details This function unsubscribes notifications of the media DB change which are published by the media server or other apps. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * - * @pre media_content_set_db_updated_cb() - * - * @see media_content_set_db_updated_cb() - */ -int media_content_unset_db_updated_cb(void) TIZEN_DEPRECATED_API; - -/** * @brief Subscribes notifications of the media DB change. * @details This function subscribes notifications of the media DB change which are published by the media server or other apps. \n * media_content_db_update_cb() function will be called when notification of the media DB change is subscribed. \n @@ -238,8 +196,7 @@ int media_content_unset_db_updated_cb(void) TIZEN_DEPRECATED_API; * @since_tizen 3.0 * * @remarks To release the registered callback, you must use media_content_remove_db_updated_cb() API. \n - * media_content_unset_db_updated_cb() API can not release the callbacks added by this API. \n - * If you set the same callback that you previously added, this API returns MEDIA_CONTENT_ERROR_INVALID_OPERATION error. \n + * If you set the same callback that you previously added, this API returns MEDIA_CONTENT_ERROR_INVALID_OPERATION error. \n * * @param[in] callback The callback to be invoked when the scanning is finished * @param[in] user_data The user data to be passed to the callback function diff --git a/include/media_content_type.h b/include/media_content_type.h index 126041a..d98562d 100755 --- a/include/media_content_type.h +++ b/include/media_content_type.h @@ -306,8 +306,8 @@ typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user * @param[in] mime_type The mime type of the media info * @param[in] user_data The user data passed from the foreach function * - * @pre media_content_db_update_subscribe(). - * @see media_content_db_update_subscribe() + * @pre media_content_add_db_updated_cb(). + * @see media_content_add_db_updated_cb() */ typedef void (*media_content_db_update_cb)( media_content_error_e error, diff --git a/include/media_info_private.h b/include/media_info_private.h index 235fbe1..9ccfb11 100755 --- a/include/media_info_private.h +++ b/include/media_info_private.h @@ -256,10 +256,7 @@ typedef struct { int duration; int width; int height; - int played_count; int rotation; - time_t played_time; - int played_position; } video_meta_s; typedef struct { @@ -279,9 +276,6 @@ typedef struct { int samplerate; int channel; int duration; - int played_count; - time_t played_time; - int played_position; } audio_meta_s; typedef struct { @@ -623,7 +617,6 @@ typedef struct _media_content_cb_data { #define UPDATE_BOOKMARK_FROM_BOOKMARK "UPDATE "DB_TABLE_BOOKMARK" SET name=%Q WHERE bookmark_id=%d;" /* Update Meta*/ -#define UPDATE_AV_META_FROM_MEDIA "UPDATE '%s' SET played_count=%d, last_played_time=%d, last_played_position=%d WHERE media_uuid='%q'" #define UPDATE_IMAGE_META_FROM_MEDIA "UPDATE '%s' SET orientation=%d WHERE media_uuid='%q'" #define SELECT_MEDIA_ITEM "SELECT "MEDIA_INFO_ITEM" FROM '%s' WHERE validity=1" diff --git a/include/media_video.h b/include/media_video.h index 1148325..6fab85e 100755 --- a/include/media_video.h +++ b/include/media_video.h @@ -360,114 +360,6 @@ int video_meta_get_height(video_meta_h video, int *height); int video_meta_get_rotation(video_meta_h video, int *rotation); /** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - * @brief Gets the played count of the video. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[out] played_count The counter of the video played - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_get_played_count(video_meta_h video, int *played_count) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - * @brief Gets the last played time parameter of the video. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[out] played_time The last played time of the video - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_get_played_time(video_meta_h video, time_t *played_time) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - * @brief Gets the played position parameter of the video. - * @details This function returns the elapsed playback position parameter of the video as period - * starting from the beginning of the movie. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[out] played_position The elapsed time of the video - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_get_played_position(video_meta_h video, int *played_position) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - * @brief Sets the played count of the video. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[in] played_count The number of played - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_set_played_count(video_meta_h video, int played_count) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - * @brief Sets the last played time of the video. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[in] played_time The last played time of the video - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_set_played_time(video_meta_h video, time_t played_time) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - * @brief Sets the played position of the video. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @remarks It is NOT recommended to use this attribute for your application-specific purpose because this attribute can be overwritten by other applications (even 0). - * - * @param[in] video The video metadata handle - * @param[in] played_position The position from the beginning of the video (in milliseconds) - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_set_played_position(video_meta_h video, int played_position) TIZEN_DEPRECATED_API; - -/** * @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. * @brief Updates an video metadata with modified attributes in the media database. * @details The function updates the given video meta in the media database. The function should be called after any change in video attributes, to be updated to the media diff --git a/include_product/media_audio.h b/include_product/media_audio.h index d28a4b5..6a5c87f 100755 --- a/include_product/media_audio.h +++ b/include_product/media_audio.h @@ -359,115 +359,6 @@ int audio_meta_get_channel(audio_meta_h audio, int *channel); int audio_meta_get_duration(audio_meta_h audio, int *duration); /** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - * @brief Gets the number of times the given audio has been played. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[out] played_count The counter of the audio played - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_get_played_count(audio_meta_h audio, int *played_count) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - * @brief Gets the last played time parameter of the audio. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[out] played_time The last played time of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_get_played_time(audio_meta_h audio, time_t *played_time) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - * @brief Gets the played position parameter of the audio. - * @details This function returns the elapsed playback position parameter of the audio as a period - * starting from the beginning of the track. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[out] played_position The elapsed time of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_get_played_position(audio_meta_h audio, int *played_position) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - * @brief Sets the played count of the audio. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[in] played_count The played count of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_set_played_count(audio_meta_h audio, int played_count) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - * @brief Sets the last played time of the audio. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] audio The audio metadata handle - * @param[in] played_time The last played time of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_set_played_time(audio_meta_h audio, time_t played_time) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - * @brief Sets the played position of the audio. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @remarks It is NOT recommended to use this attribute for your application-specific purpose because this attribute can be overwritten by other applications (even 0). - * - * @param[in] audio The audio metadata handle - * @param[in] played_position The played position of the audio - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int audio_meta_set_played_position(audio_meta_h audio, int played_position) TIZEN_DEPRECATED_API; - -/** * @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. * @brief Updates an audio metadata with modified attributes in the media database. * @details The function updates the given audio meta in the media database. The function should be called after any change in audio attributes, to be updated to the media diff --git a/include_product/media_content.h b/include_product/media_content.h index de4dc07..0df8db7 100755 --- a/include_product/media_content.h +++ b/include_product/media_content.h @@ -189,48 +189,6 @@ int media_content_scan_folder(const char *path, bool is_recursive, media_scan_co int media_content_cancel_scan_folder(const char *path); /** - * @deprecated Deprecated since 3.0. Use media_content_add_db_updated_cb() instead. - * @brief Subscribes notifications of the media DB change. - * @details This function subscribes notifications of the media DB change which are published by the media server or other apps. - * media_content_db_update_cb() function will be called when notification of the media DB change is subscribed. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] callback The callback to be invoked when the scanning is finished - * @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 #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * - * @see media_content_db_update_cb() - * @see media_content_unset_db_updated_cb() - */ -int media_content_set_db_updated_cb(media_content_db_update_cb callback, void *user_data) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since 3.0. Use media_content_remove_db_updated_cb() instead. - * @brief Unsubscribes notifications of the media DB change. - * @details This function unsubscribes notifications of the media DB change which are published by the media server or other apps. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * - * @pre media_content_set_db_updated_cb() - * - * @see media_content_set_db_updated_cb() - */ -int media_content_unset_db_updated_cb(void) TIZEN_DEPRECATED_API; - -/** * @brief Subscribes notifications of the media DB change. * @details This function subscribes notifications of the media DB change which are published by the media server or other apps. \n * media_content_db_update_cb() function will be called when notification of the media DB change is subscribed. \n @@ -239,8 +197,7 @@ int media_content_unset_db_updated_cb(void) TIZEN_DEPRECATED_API; * @since_tizen 3.0 * * @remarks To release the registered callback, you must use media_content_remove_db_updated_cb() API. \n - * media_content_unset_db_updated_cb() API can not release the callbacks added by this API. \n - * If you set the same callback that you previously added, this API returns MEDIA_CONTENT_ERROR_INVALID_OPERATION error. \n + * If you set the same callback that you previously added, this API returns MEDIA_CONTENT_ERROR_INVALID_OPERATION error. \n * * @param[in] callback The callback to be invoked when the scanning is finished * @param[in] user_data The user data to be passed to the callback function diff --git a/include_product/media_content_type.h b/include_product/media_content_type.h index f4b0adb..8260902 100755 --- a/include_product/media_content_type.h +++ b/include_product/media_content_type.h @@ -372,8 +372,8 @@ typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user * @param[in] mime_type The mime type of the media info * @param[in] user_data The user data passed from the foreach function * - * @pre media_content_db_update_subscribe(). - * @see media_content_db_update_subscribe() + * @pre media_content_add_db_updated_cb(). + * @see media_content_add_db_updated_cb() */ typedef void (*media_content_db_update_cb)( media_content_error_e error, diff --git a/include_product/media_info_private.h b/include_product/media_info_private.h index 020a908..4751a64 100755 --- a/include_product/media_info_private.h +++ b/include_product/media_info_private.h @@ -273,10 +273,7 @@ typedef struct { int duration; int width; int height; - int played_count; int rotation; - time_t played_time; - int played_position; } video_meta_s; typedef struct { @@ -296,9 +293,6 @@ typedef struct { int samplerate; int channel; int duration; - int played_count; - time_t played_time; - int played_position; } audio_meta_s; typedef struct { @@ -786,7 +780,6 @@ typedef struct _media_content_scan_cb_data_v2 { #define UPDATE_BOOKMARK_FROM_BOOKMARK "UPDATE "DB_TABLE_BOOKMARK" SET name=%Q WHERE bookmark_id=%d;" /* Update Meta*/ -#define UPDATE_AV_META_FROM_MEDIA "UPDATE '%s' SET played_count=%d, last_played_time=%d, last_played_position=%d WHERE media_uuid='%q'" #define UPDATE_IMAGE_META_FROM_MEDIA "UPDATE '%s' SET orientation=%d WHERE media_uuid='%q'" #define UPDATE_VIDEO_MM_DATA_FROM_MEDIA "UPDATE '%s' SET bitrate=%d, duration=%d, width=%d, height=%d WHERE media_uuid='%q'" diff --git a/include_product/media_video.h b/include_product/media_video.h index 1148325..6fab85e 100755 --- a/include_product/media_video.h +++ b/include_product/media_video.h @@ -360,114 +360,6 @@ int video_meta_get_height(video_meta_h video, int *height); int video_meta_get_rotation(video_meta_h video, int *rotation); /** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - * @brief Gets the played count of the video. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[out] played_count The counter of the video played - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_get_played_count(video_meta_h video, int *played_count) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - * @brief Gets the last played time parameter of the video. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[out] played_time The last played time of the video - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_get_played_time(video_meta_h video, time_t *played_time) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - * @brief Gets the played position parameter of the video. - * @details This function returns the elapsed playback position parameter of the video as period - * starting from the beginning of the movie. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[out] played_position The elapsed time of the video - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_get_played_position(video_meta_h video, int *played_position) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played count value between applications. It is recommended that the value is managed by the application. - * @brief Sets the played count of the video. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[in] played_count The number of played - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_set_played_count(video_meta_h video, int played_count) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played time value between applications. It is recommended that the value is managed by the application. - * @brief Sets the last played time of the video. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @param[in] video The video metadata handle - * @param[in] played_time The last played time of the video - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_set_played_time(video_meta_h video, time_t played_time) TIZEN_DEPRECATED_API; - -/** - * @deprecated Deprecated since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif. \n - * This function does not guarantee independence of the played position value between applications. It is recommended that the value is managed by the application. - * @brief Sets the played position of the video. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @remarks It is NOT recommended to use this attribute for your application-specific purpose because this attribute can be overwritten by other applications (even 0). - * - * @param[in] video The video metadata handle - * @param[in] played_position The position from the beginning of the video (in milliseconds) - * - * @return @c 0 on success, - * otherwise a negative error value - * - * @retval #MEDIA_CONTENT_ERROR_NONE Successful - * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - */ -int video_meta_set_played_position(video_meta_h video, int played_position) TIZEN_DEPRECATED_API; - -/** * @deprecated Deprecated since 4.0. Related setter functions are deprecated, therefore this function is not needed anymore. * @brief Updates an video metadata with modified attributes in the media database. * @details The function updates the given video meta in the media database. The function should be called after any change in video attributes, to be updated to the media diff --git a/src/media_audio.c b/src/media_audio.c index 1eca74c..ebe7062 100755 --- a/src/media_audio.c +++ b/src/media_audio.c @@ -159,9 +159,6 @@ int audio_meta_clone(audio_meta_h *dst, audio_meta_h src) _dst->samplerate = _src->samplerate; _dst->channel = _src->channel; _dst->duration = _src->duration; - _dst->played_count = _src->played_count; - _dst->played_time = _src->played_time; - _dst->played_position = _src->played_position; *dst = (audio_meta_h)_dst; @@ -472,126 +469,15 @@ int audio_meta_get_duration(audio_meta_h audio, int *duration) return ret; } -int audio_meta_get_played_count(audio_meta_h audio, int *played_count) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: audio_meta_get_played_count() is deprecated and will be removed from next release."); - audio_meta_s *_audio = (audio_meta_s*)audio; - - if (_audio && played_count) { - *played_count = _audio->played_count; - ret = MEDIA_CONTENT_ERROR_NONE; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int audio_meta_get_played_time(audio_meta_h audio, time_t* played_time) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: audio_meta_get_played_time() is deprecated and will be removed from next release."); - audio_meta_s *_audio = (audio_meta_s*)audio; - - if (_audio) { - *played_time = _audio->played_time; - ret = MEDIA_CONTENT_ERROR_NONE; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int audio_meta_get_played_position(audio_meta_h audio, int *played_position) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: audio_meta_get_played_position() is deprecated and will be removed from next release."); - audio_meta_s *_audio = (audio_meta_s*)audio; - - if (_audio) { - *played_position = _audio->played_position; - ret = MEDIA_CONTENT_ERROR_NONE; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int audio_meta_set_played_count(audio_meta_h audio, int played_count) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: audio_meta_set_played_count() is deprecated and will be removed from next release."); - audio_meta_s *_audio = (audio_meta_s*)audio; - - if ((_audio != NULL) && (played_count >= 0)) { - _audio->played_count = played_count; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int audio_meta_set_played_time(audio_meta_h audio, time_t played_time) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: audio_meta_set_played_time() is deprecated and will be removed from next release."); - audio_meta_s *_audio = (audio_meta_s*)audio; - - if ((_audio != NULL) && (played_time >= 0)) { - _audio->played_time = played_time; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int audio_meta_set_played_position(audio_meta_h audio, int played_position) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: audio_meta_set_played_position() is deprecated and will be removed from next release."); - audio_meta_s *_audio = (audio_meta_s*)audio; - - if ((_audio != NULL) && (played_position >= 0)) { - _audio->played_position = played_position; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - int audio_meta_update_to_db(audio_meta_h audio) { - int ret = MEDIA_CONTENT_ERROR_NONE; media_content_warn("DEPRECATION WARNING: audio_meta_update_to_db() is deprecated and will be removed from next release."); audio_meta_s *_audio = (audio_meta_s*)audio; - char *sql = NULL; - if (_audio != NULL && STRING_VALID(_audio->media_id)) { - char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, }; - memset(storage_id, 0x00, sizeof(storage_id)); - - ret = _media_db_get_storage_id_by_media_id(_audio->media_id, storage_id); - media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret); - - sql = sqlite3_mprintf(UPDATE_AV_META_FROM_MEDIA, storage_id, _audio->played_count, _audio->played_time, _audio->played_position, _audio->media_id); - ret = _content_query_sql(sql); - SQLITE3_SAFE_FREE(sql); - } else { + if (_audio == NULL) { media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; + return MEDIA_CONTENT_ERROR_INVALID_PARAMETER; } - return ret; + return MEDIA_CONTENT_ERROR_NONE; } diff --git a/src/media_content.c b/src/media_content.c index 20ec5f9..d2423df 100755 --- a/src/media_content.c +++ b/src/media_content.c @@ -24,7 +24,6 @@ static attribute_h g_alias_attr_handle = NULL; static MediaSvcHandle *db_handle = NULL; static int ref_count = 0; static GMutex db_mutex; -static __thread media_noti_cb_s *g_noti_info = NULL; static uid_t content_g_uid = 0; #if 0 @@ -1603,36 +1602,6 @@ void _media_content_db_update_noti_cb( return; } -int media_content_set_db_updated_cb(media_content_db_update_cb callback, void *user_data) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: media_content_set_db_updated_cb() is deprecated and will be removed from next release. Use media_content_add_db_updated_cb() instead."); - - media_content_retvm_if(callback == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid callback"); - media_content_retvm_if(g_noti_info != NULL, MEDIA_CONTENT_ERROR_INVALID_OPERATION, "Noti callback is already set"); - - g_noti_info = (media_noti_cb_s *)calloc(1, sizeof(media_noti_cb_s)); - media_content_retvm_if(g_noti_info == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY"); - - g_noti_info->update_noti_cb = callback; - g_noti_info->user_data = user_data; - - ret = media_db_update_subscribe(_media_content_db_update_noti_cb, (void *)g_noti_info); - - return _content_error_capi(MEDIA_REGISTER_TYPE, ret); -} - -int media_content_unset_db_updated_cb(void) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: media_content_unset_db_updated_cb() is deprecated and will be removed from next release. Use media_content_remove_db_updated_cb() instead."); - - SAFE_FREE(g_noti_info); - ret = media_db_update_unsubscribe(); - - return _content_error_capi(MEDIA_REGISTER_TYPE, ret); -} - int media_content_add_db_updated_cb(media_content_db_update_cb callback, void *user_data, media_content_noti_h *noti_handle) { int ret = MEDIA_CONTENT_ERROR_NONE; diff --git a/src/media_info.c b/src/media_info.c index d198849..3452ae0 100755 --- a/src/media_info.c +++ b/src/media_info.c @@ -413,9 +413,6 @@ void _media_info_item_get_detail(sqlite3_stmt* stmt, media_info_h media) _media->video_meta->track_num = g_strdup((const char *)sqlite3_column_text(stmt, MEDIA_INFO_TRACK_NUM)); _media->video_meta->bitrate = sqlite3_column_int(stmt, MEDIA_INFO_BITRATE); _media->video_meta->duration = sqlite3_column_int(stmt, MEDIA_INFO_DURATION); - _media->video_meta->played_count = sqlite3_column_int(stmt, MEDIA_INFO_PLAYED_COUNT); - _media->video_meta->played_time = sqlite3_column_int(stmt, MEDIA_INFO_LAST_PLAYED_TIME); - _media->video_meta->played_position = sqlite3_column_int(stmt, MEDIA_INFO_LAST_PLAYED_POSITION); _media->video_meta->rotation = sqlite3_column_int(stmt, MEDIA_INFO_ORIENTATION); } @@ -436,9 +433,6 @@ void _media_info_item_get_detail(sqlite3_stmt* stmt, media_info_h media) _media->audio_meta->bitrate = sqlite3_column_int(stmt, MEDIA_INFO_BITRATE); _media->audio_meta->bitpersample = sqlite3_column_int(stmt, MEDIA_INFO_BITPERSAMPLE); _media->audio_meta->duration = sqlite3_column_int(stmt, MEDIA_INFO_DURATION); - _media->audio_meta->played_count = sqlite3_column_int(stmt, MEDIA_INFO_PLAYED_COUNT); - _media->audio_meta->played_time = sqlite3_column_int(stmt, MEDIA_INFO_LAST_PLAYED_TIME); - _media->audio_meta->played_position = sqlite3_column_int(stmt, MEDIA_INFO_LAST_PLAYED_POSITION); _media->audio_meta->samplerate = sqlite3_column_int(stmt, MEDIA_INFO_SAMPLERATE); _media->audio_meta->channel = sqlite3_column_int(stmt, MEDIA_INFO_CHANNEL); } @@ -1334,9 +1328,6 @@ int media_info_clone(media_info_h *dst, media_info_h src) _dst->video_meta->height = _src->video_meta->height; _dst->video_meta->duration = _src->video_meta->duration; _dst->video_meta->bitrate = _src->video_meta->bitrate; - _dst->video_meta->played_count = _src->video_meta->played_count; - _dst->video_meta->played_time = _src->video_meta->played_time; - _dst->video_meta->played_position = _src->video_meta->played_position; _dst->video_meta->rotation = _src->video_meta->rotation; } else if ((_src->media_type == MEDIA_CONTENT_TYPE_MUSIC || _src->media_type == MEDIA_CONTENT_TYPE_SOUND) && _src->audio_meta) { @@ -1441,9 +1432,6 @@ int media_info_clone(media_info_h *dst, media_info_h src) _dst->audio_meta->duration = _src->audio_meta->duration; _dst->audio_meta->bitrate = _src->audio_meta->bitrate; _dst->audio_meta->bitpersample = _src->audio_meta->bitpersample; - _dst->audio_meta->played_count = _src->audio_meta->played_count; - _dst->audio_meta->played_time = _src->audio_meta->played_time; - _dst->audio_meta->played_position = _src->audio_meta->played_position; } *dst = (media_info_h)_dst; @@ -1626,9 +1614,6 @@ int media_info_get_video(media_info_h media, video_meta_h *video) _video->height = _media->video_meta->height; _video->duration = _media->video_meta->duration; _video->bitrate = _media->video_meta->bitrate; - _video->played_count = _media->video_meta->played_count; - _video->played_time = _media->video_meta->played_time; - _video->played_position = _media->video_meta->played_position; _video->rotation = _media->video_meta->rotation; *video = (video_meta_h)_video; @@ -1666,9 +1651,6 @@ int media_info_get_audio(media_info_h media, audio_meta_h *audio) _audio->bitpersample = _media->audio_meta->bitpersample; _audio->samplerate = _media->audio_meta->samplerate; _audio->channel = _media->audio_meta->channel; - _audio->played_time = _media->audio_meta->played_time; - _audio->played_count = _media->audio_meta->played_count; - _audio->played_position = _media->audio_meta->played_position; *audio = (audio_meta_h)_audio; diff --git a/src/media_video.c b/src/media_video.c index fdcaa3e..4771df5 100755 --- a/src/media_video.c +++ b/src/media_video.c @@ -158,9 +158,6 @@ int video_meta_clone(video_meta_h *dst, video_meta_h src) _dst->duration = _src->duration; _dst->width = _src->width; _dst->height = _src->height; - _dst->played_count = _src->played_count; - _dst->played_time = _src->played_time; - _dst->played_position = _src->played_position; _dst->rotation = _src->rotation; *dst = (video_meta_h)_dst; @@ -482,127 +479,15 @@ int video_meta_get_rotation(video_meta_h video, int *rotation) return ret; } - -int video_meta_get_played_count(video_meta_h video, int *played_count) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: video_meta_get_played_count() is deprecated and will be removed from next release."); - video_meta_s *_video = (video_meta_s*)video; - - if (_video && played_count) { - *played_count = _video->played_count; - ret = MEDIA_CONTENT_ERROR_NONE; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int video_meta_get_played_time(video_meta_h video, time_t* played_time) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: video_meta_get_played_time() is deprecated and will be removed from next release."); - video_meta_s *_video = (video_meta_s*)video; - - if (_video) { - *played_time = _video->played_time; - ret = MEDIA_CONTENT_ERROR_NONE; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int video_meta_get_played_position(video_meta_h video, int *played_position) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: video_meta_get_played_position() is deprecated and will be removed from next release."); - video_meta_s *_video = (video_meta_s*)video; - - if (_video) { - *played_position = _video->played_position; - ret = MEDIA_CONTENT_ERROR_NONE; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int video_meta_set_played_count(video_meta_h video, int played_count) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: video_meta_set_played_count() is deprecated and will be removed from next release."); - video_meta_s *_video = (video_meta_s*)video; - - if ((_video != NULL) && (played_count >= 0)) { - _video->played_count = played_count; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int video_meta_set_played_time(video_meta_h video, time_t played_time) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: video_meta_set_played_time() is deprecated and will be removed from next release."); - video_meta_s *_video = (video_meta_s*)video; - - if ((_video != NULL) && (played_time >= 0)) { - _video->played_time = played_time; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - -int video_meta_set_played_position(video_meta_h video, int played_position) -{ - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: video_meta_set_played_position() is deprecated and will be removed from next release."); - video_meta_s *_video = (video_meta_s*)video; - - if ((_video != NULL) && (played_position >= 0)) { - _video->played_position = played_position; - } else { - media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; - } - - return ret; -} - int video_meta_update_to_db(video_meta_h video) { - int ret = MEDIA_CONTENT_ERROR_NONE; - media_content_warn("DEPRECATION WARNING: video_meta_update_to_db() is deprecated and will be removed from next release."); + media_content_warn("DEPRECATION WARNING: video_meta_update_to_db() is deprecated and will be removed from next release."); video_meta_s *_video = (video_meta_s*)video; - char *sql = NULL; - if (_video != NULL && STRING_VALID(_video->media_id)) { - char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, }; - memset(storage_id, 0x00, sizeof(storage_id)); - - ret = _media_db_get_storage_id_by_media_id(_video->media_id, storage_id); - media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret); - - sql = sqlite3_mprintf(UPDATE_AV_META_FROM_MEDIA, storage_id, _video->played_count, _video->played_time, _video->played_position, _video->media_id); - ret = _content_query_sql(sql); - SQLITE3_SAFE_FREE(sql); - } else { + if (_video == NULL) { media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; + return MEDIA_CONTENT_ERROR_INVALID_PARAMETER; } - return ret; + return MEDIA_CONTENT_ERROR_NONE; } diff --git a/test/media-content_test.c b/test/media-content_test.c index b01d768..3bb9206 100755 --- a/test/media-content_test.c +++ b/test/media-content_test.c @@ -43,7 +43,6 @@ bool get_audio_meta(audio_meta_h audio) { char *c_value = NULL; int i_value = 0; - time_t t_value = 0; int ret = MEDIA_CONTENT_ERROR_NONE; media_content_debug("=== audio meta ==="); @@ -128,21 +127,6 @@ bool get_audio_meta(audio_meta_h audio) media_content_error("error when get meta : [%d]", ret); media_content_debug("duration : [%d]", i_value); - ret = audio_meta_get_played_count(audio, &i_value); - if (ret != MEDIA_CONTENT_ERROR_NONE) - media_content_error("error when get meta : [%d]", ret); - media_content_debug("played_count : [%d]", i_value); - - ret = audio_meta_get_played_time(audio, &t_value); - if (ret != MEDIA_CONTENT_ERROR_NONE) - media_content_error("error when get meta : [%d]", ret); - media_content_debug("played_time : [%ld]", t_value); - - ret = audio_meta_get_played_position(audio, &i_value); - if (ret != MEDIA_CONTENT_ERROR_NONE) - media_content_error("error when get meta : [%d]", ret); - media_content_debug("played_position : [%d]", i_value); - return true; } @@ -150,7 +134,6 @@ bool get_video_meta(video_meta_h video) { char *c_value = NULL; int i_value = 0; - time_t t_value = 0; int ret = MEDIA_CONTENT_ERROR_NONE; media_content_debug("=== video meta ==="); @@ -235,21 +218,6 @@ bool get_video_meta(video_meta_h video) media_content_error("error when get meta : [%d]", ret); media_content_debug("height : [%d]", i_value); - ret = video_meta_get_played_count(video, &i_value); - if (ret != MEDIA_CONTENT_ERROR_NONE) - media_content_error("error when get meta : [%d]", ret); - media_content_debug("played_count : [%d]", i_value); - - ret = video_meta_get_played_time(video, &t_value); - if (ret != MEDIA_CONTENT_ERROR_NONE) - media_content_error("error when get meta : [%d]", ret); - media_content_debug("played_time : [%ld]", t_value); - - ret = video_meta_get_played_position(video, &i_value); - if (ret != MEDIA_CONTENT_ERROR_NONE) - media_content_error("error when get meta : [%d]", ret); - media_content_debug("played_position : [%d]", i_value); - return true; } @@ -1122,7 +1090,6 @@ int test_gallery_scenario(void) video_meta_h video_handle; char *title = NULL, *artist = NULL, *album = NULL, *album_artist = NULL; int duration = 0; - time_t time_played = 0; ret = media_info_get_video(media_handle, &video_handle); if (ret != MEDIA_CONTENT_ERROR_NONE) { @@ -1140,12 +1107,9 @@ int test_gallery_scenario(void) ret = video_meta_get_duration(video_handle, &duration); if (ret != MEDIA_CONTENT_ERROR_NONE) media_content_error("error video_meta_get_duration : [%d]", ret); - ret = video_meta_get_played_time(video_handle, &time_played); - if (ret != MEDIA_CONTENT_ERROR_NONE) - media_content_error("error video_meta_get_played_time : [%d]", ret); media_content_debug("This is Video"); - media_content_debug("Title: %s, Album: %s, Artist: %s, Album_artist: %s \n Duration: %d, Played time: %ld", title, album, artist, album_artist, duration, time_played); + media_content_debug("Title: %s, Album: %s, Artist: %s, Album_artist: %s \n Duration: %d, Played time: %ld", title, album, artist, album_artist, duration); } SAFE_FREE(title); @@ -1255,7 +1219,6 @@ int test_gallery_scenario(void) video_meta_h video_handle; char *title = NULL, *artist = NULL, *album = NULL, *album_artist = NULL;; int duration = 0; - time_t time_played; ret = media_info_get_video(media_handle, &video_handle); if (ret != MEDIA_CONTENT_ERROR_NONE) { @@ -1273,12 +1236,9 @@ int test_gallery_scenario(void) ret = video_meta_get_duration(video_handle, &duration); if (ret != MEDIA_CONTENT_ERROR_NONE) media_content_error("error video_meta_get_duration : [%d]", ret); - ret = video_meta_get_played_time(video_handle, &time_played); - if (ret != MEDIA_CONTENT_ERROR_NONE) - media_content_error("error video_meta_get_played_time : [%d]", ret); media_content_debug("This is Video"); - media_content_debug("Title: %s, Album: %s, Artist: %s, Album_artist: %s \n Duration: %d, Played time: %ld\n", title, album, artist, album_artist, duration, time_played); + media_content_debug("Title: %s, Album: %s, Artist: %s, Album_artist: %s \n Duration: %d\n", title, album, artist, album_artist, duration); } SAFE_FREE(title);