X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fmedia_video.h;h=7883094c5e2fcd5e606ee91078521a658f31fbbd;hb=c9a986357ca34d8f7baf9775f791b180e4bad81a;hp=9d8da34777363ea74062c771879598a09cb4d501;hpb=dafe83bb9d1fd980e29ba05e437f96a75a7e6a7e;p=platform%2Fcore%2Fapi%2Fmedia-content.git diff --git a/include/media_video.h b/include/media_video.h index 9d8da34..7883094 100755 --- a/include/media_video.h +++ b/include/media_video.h @@ -15,8 +15,8 @@ */ -#ifndef __TIZEN_VIDEO_META_H__ -#define __TIZEN_VIDEO_META_H__ +#ifndef __TIZEN_CONTENT_MEDIA_VIDEO_H__ +#define __TIZEN_CONTENT_MEDIA_VIDEO_H__ #include @@ -28,7 +28,7 @@ extern "C" { * @file media_video.h * @brief This file contains the video metadata API and related functions to proceed with video metadata. \n * Functions include cloning and destroying video metadata, getting video metadata such as width, height, \n - * album, genre, played parameters etc. and updating video to DB. + * album, genre, etc. */ /** @@ -42,10 +42,10 @@ extern "C" { * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release the destination handle using video_meta_destroy(). + * @remarks The @a dst should be released using video_meta_destroy(). * * @param[out] dst The destination handle to the video metadata - * @param[in] src The source handle to the video metadata + * @param[in] src The source handle to the video metadata * * @return @c 0 on success, * otherwise a negative error value @@ -53,7 +53,6 @@ extern "C" { * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied * * @see video_meta_destroy() */ @@ -62,19 +61,18 @@ int video_meta_clone(video_meta_h *dst, video_meta_h src); /** * @brief Destroys the video metadata. * @details This function frees all resources related to the video metadata handle. This handle - * no longer can be used to perform any operation. A new handle has to + * no longer can be used to perform any operations. A new handle has to * be created before the next use. * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * * @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_PERMISSION_DENIED Permission denied * * @pre Get copy of video metadata handle by calling video_meta_clone(). * @@ -86,10 +84,10 @@ int video_meta_destroy(video_meta_h video); * @brief Gets the ID of the media of the given video metadata. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a media_id using free(). + * @remarks The @a media_id should be released using free(). * - * @param[in] video The video metadata handle - * @param[out] media_id The ID of the video + * @param[in] video The handle to the video metadata + * @param[out] media_id The media ID * * @return @c 0 on success, * otherwise a negative error value @@ -97,7 +95,6 @@ int video_meta_destroy(video_meta_h video); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_media_id(video_meta_h video, char **media_id); @@ -108,9 +105,9 @@ int video_meta_get_media_id(video_meta_h video, char **media_id); * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a album using free(). + * @remarks The @a album should be released using free(). * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] album The album of the video metadata * * @return @c 0 on success, @@ -119,7 +116,6 @@ int video_meta_get_media_id(video_meta_h video, char **media_id); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_album(video_meta_h video, char **album); @@ -130,9 +126,9 @@ int video_meta_get_album(video_meta_h video, char **album); * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a artist using free(). + * @remarks The @a artist should be released using free(). * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] artist The artist of the video metadata * * @return @c 0 on success, @@ -141,7 +137,6 @@ int video_meta_get_album(video_meta_h video, char **album); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_artist(video_meta_h video, char **artist); @@ -152,9 +147,9 @@ int video_meta_get_artist(video_meta_h video, char **artist); * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a album_artist using free(). + * @remarks The @a album_artist should be released using free(). * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] album_artist The album artist of the video metadata * * @return @c 0 on success, @@ -163,7 +158,6 @@ int video_meta_get_artist(video_meta_h video, char **artist); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_album_artist(video_meta_h video, char **album_artist); @@ -174,9 +168,9 @@ int video_meta_get_album_artist(video_meta_h video, char **album_artist); * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a genre using free(). + * @remarks The @a genre should be released using free(). * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] genre The genre of the video metadata * * @return @c 0 on success, @@ -185,7 +179,6 @@ int video_meta_get_album_artist(video_meta_h video, char **album_artist); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_genre(video_meta_h video, char **genre); @@ -196,9 +189,9 @@ int video_meta_get_genre(video_meta_h video, char **genre); * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a composer using free(). + * @remarks The @a composer should be released using free(). * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] composer The composer of the video metadata * * @return @c 0 on success, @@ -207,7 +200,6 @@ int video_meta_get_genre(video_meta_h video, char **genre); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_composer(video_meta_h video, char **composer); @@ -218,10 +210,10 @@ int video_meta_get_composer(video_meta_h video, char **composer); * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a year using free(). + * @remarks The @a year should be released using free(). * - * @param[in] video The video metadata handle - * @param[out] year The year of the video metadata + * @param[in] video The handle to the video metadata + * @param[out] year The year of the video metadata * * @return @c 0 on success, * otherwise a negative error value @@ -229,17 +221,19 @@ int video_meta_get_composer(video_meta_h video, char **composer); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_year(video_meta_h video, char **year); /** * @brief Gets the recorded date of the video. + * @details The recorded date is got from video file's metadata. Some formats like mp4 use UTC and the rest can be different. \n + * So, please refer to the format specification if needed. + * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a recorded_date using free(). + * @remarks The @a recorded_date should be released using free(). * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] recorded_date The recorded date of the video metadata * * @return @c 0 on success, @@ -248,7 +242,6 @@ int video_meta_get_year(video_meta_h video, char **year); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_recorded_date(video_meta_h video, char **recorded_date); @@ -259,9 +252,9 @@ int video_meta_get_recorded_date(video_meta_h video, char **recorded_date); * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a copyright using free(). + * @remarks The @a copyright should be released using free(). * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] copyright The copyright of the video metadata * * @return @c 0 on success, @@ -270,7 +263,6 @@ int video_meta_get_recorded_date(video_meta_h video, char **recorded_date); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_copyright(video_meta_h video, char **copyright); @@ -281,9 +273,9 @@ int video_meta_get_copyright(video_meta_h video, char **copyright); * * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @remarks You must release @a track_num using free(). + * @remarks The @a track_num should be released using free(). * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] track_num The track number of the video metadata * * @return @c 0 on success, @@ -292,7 +284,6 @@ int video_meta_get_copyright(video_meta_h video, char **copyright); * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_track_num(video_meta_h video, char **track_num); @@ -300,7 +291,7 @@ int video_meta_get_track_num(video_meta_h video, char **track_num); * @brief Gets the bitrate of the given video metadata in bitrate per second. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] bit_rate The video bit rate in bit per second [bps] * * @return @c 0 on success, @@ -308,7 +299,6 @@ int video_meta_get_track_num(video_meta_h video, char **track_num); * * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_bit_rate(video_meta_h video, int *bit_rate); @@ -316,7 +306,7 @@ int video_meta_get_bit_rate(video_meta_h video, int *bit_rate); * @brief Gets the track duration of the given video metadata. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] duration The video duration in milliseconds * * @return @c 0 on success, @@ -324,7 +314,6 @@ int video_meta_get_bit_rate(video_meta_h video, int *bit_rate); * * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_duration(video_meta_h video, int *duration); @@ -332,7 +321,7 @@ int video_meta_get_duration(video_meta_h video, int *duration); * @brief Gets the width of the given video metadata. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] width The video width in pixels * * @return @c 0 on success, @@ -340,7 +329,6 @@ int video_meta_get_duration(video_meta_h video, int *duration); * * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_width(video_meta_h video, int *width); @@ -348,7 +336,7 @@ int video_meta_get_width(video_meta_h video, int *width); * @brief Gets the height of the given video metadata. * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] height The video height in pixels * * @return @c 0 on success, @@ -356,7 +344,6 @@ int video_meta_get_width(video_meta_h video, int *width); * * @retval #MEDIA_CONTENT_ERROR_NONE Successful * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied */ int video_meta_get_height(video_meta_h video, int *height); @@ -364,7 +351,7 @@ int video_meta_get_height(video_meta_h video, int *height); * @brief Gets the rotation of the given video metadata. * @since_tizen 4.0 * - * @param[in] video The video metadata handle + * @param[in] video The handle to the video metadata * @param[out] rotation The clockwise rotation angle of the video in degrees (can be returned from 0 to less than 360) * * @return @c 0 on success, @@ -376,155 +363,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. [Use media_info_get_played_count() instead] - * @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 - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - */ -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. [Use media_info_get_played_time() instead] - * @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 - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - */ -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. - * @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 - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - */ -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. [Use media_info_increase_played_count() instead] - * @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 - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - * - * @post video_meta_update_to_db(). - */ -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. [Use media_info_set_played_time() instead] - * @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 - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - * - * @post video_meta_update_to_db(). - */ -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. - * @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 - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - * - * @post video_meta_update_to_db(). - */ -int video_meta_set_played_position(video_meta_h video, int played_position) TIZEN_DEPRECATED_API; - -/** - * @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 - * database. For example, for setting the played time using video_meta_get_played_time(), after that the video_meta_update_to_db() function should be called to update media database. - * - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @privlevel public - * @privilege %http://tizen.org/privilege/content.write - * - * @remarks Do not call this function in callback function of foreach function like media_info_foreach_media_from_db(). - * - * @param[in] video The video metadata handle - * - * @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_OUT_OF_MEMORY Out of memory - * @retval #MEDIA_CONTENT_ERROR_INVALID_OPERATION Invalid operation - * @retval #MEDIA_CONTENT_ERROR_DB_FAILED DB Operation failed - * @retval #MEDIA_CONTENT_ERROR_DB_BUSY DB Operation busy - * @retval #MEDIA_CONTENT_ERROR_NETWORK Network fail - * @retval #MEDIA_CONTENT_ERROR_PERMISSION_DENIED Permission denied - * - * @pre This function requires opened connection to content service by media_content_connect(). - * - * @see media_content_connect() - * @see video_meta_set_played_time() - * @see video_meta_set_played_count() - * @see video_meta_set_played_position() - */ -int video_meta_update_to_db(video_meta_h video); - -/** *@} */ @@ -532,4 +370,4 @@ int video_meta_update_to_db(video_meta_h video); } #endif /* __cplusplus */ -#endif /*__TIZEN_VIDEO_META_H__*/ +#endif /*__TIZEN_CONTENT_MEDIA_VIDEO_H__*/