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
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
* @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
* @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,
int duration;
int width;
int height;
- int played_count;
int rotation;
- time_t played_time;
- int played_position;
} video_meta_s;
typedef struct {
int samplerate;
int channel;
int duration;
- int played_count;
- time_t played_time;
- int played_position;
} audio_meta_s;
typedef struct {
#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"
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
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
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
* @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
* @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,
int duration;
int width;
int height;
- int played_count;
int rotation;
- time_t played_time;
- int played_position;
} video_meta_s;
typedef struct {
int samplerate;
int channel;
int duration;
- int played_count;
- time_t played_time;
- int played_position;
} audio_meta_s;
typedef struct {
#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'"
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
_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;
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;
}
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
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;
_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);
}
_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);
}
_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) {
_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;
_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;
_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;
_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;
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;
}
{
char *c_value = NULL;
int i_value = 0;
- time_t t_value = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
media_content_debug("=== audio meta ===");
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;
}
{
char *c_value = NULL;
int i_value = 0;
- time_t t_value = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
media_content_debug("=== video meta ===");
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;
}
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) {
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);
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) {
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);