Tizen Native API
|
Functions | |
int | video_meta_clone (video_meta_h *dst, video_meta_h src) |
Clones the video metadata. | |
int | video_meta_destroy (video_meta_h video) |
Destroys the video metadata. | |
int | video_meta_get_media_id (video_meta_h video, char **media_id) |
Gets the ID of the media of the given video metadata. | |
int | video_meta_get_album (video_meta_h video, char **album) |
Gets the video's album. | |
int | video_meta_get_artist (video_meta_h video, char **artist) |
Gets the video artist. | |
int | video_meta_get_album_artist (video_meta_h video, char **album_artist) |
Gets the video album artist. | |
int | video_meta_get_genre (video_meta_h video, char **genre) |
Gets the video genre. | |
int | video_meta_get_composer (video_meta_h video, char **composer) |
Gets the video composer. | |
int | video_meta_get_year (video_meta_h video, char **year) |
Gets the year of the video. | |
int | video_meta_get_recorded_date (video_meta_h video, char **recorded_date) |
Gets the recorded date of the video. | |
int | video_meta_get_copyright (video_meta_h video, char **copyright) |
Gets the video copyright. | |
int | video_meta_get_track_num (video_meta_h video, char **track_num) |
Gets the track number of the video. | |
int | video_meta_get_bit_rate (video_meta_h video, int *bit_rate) |
Gets the video bit rate. | |
int | video_meta_get_duration (video_meta_h video, int *duration) |
Gets the duration of video metadata. | |
int | video_meta_get_width (video_meta_h video, int *width) |
Gets the video width in pixels. | |
int | video_meta_get_height (video_meta_h video, int *height) |
Gets the video height in pixels. | |
int | video_meta_get_played_count (video_meta_h video, int *played_count) |
Gets the played count of the video. | |
int | video_meta_get_played_time (video_meta_h video, time_t *played_time) |
Gets the last played time parameter of the video. | |
int | video_meta_get_played_position (video_meta_h video, int *played_position) |
Gets the position played parameter of the video. | |
int | video_meta_set_played_count (video_meta_h video, int played_count) |
Sets the played count of the video. | |
int | video_meta_set_played_time (video_meta_h video, time_t played_time) |
Sets the time last played parameter of the video. | |
int | video_meta_set_played_position (video_meta_h video, int played_position) |
Sets the position played parameter of the video. | |
int | video_meta_update_to_db (video_meta_h video) |
Updates the video to the media database. | |
Typedefs | |
typedef struct video_meta_s * | video_meta_h |
The structure type for the Video metadata handle. |
The Video Metadata API provides functions to get information about video files present in the device.
#include <media_content.h>
The Video Metadata API provides functions to get information about video files present in the device. Following information about video content (video_meta_h )is provided:
For getting the video handle (video_meta_h) from the media information (media_info_h), call the media_info_get_video() function.
For getting the information related to video files stored in the device call the respective get functions e.g. to get duration of the video file call video_meta_get_duration() function and so on.
When the video handle is no longer needed, it should be destroyed by calling video_meta_destroy() function.
int video_meta_clone | ( | video_meta_h * | dst, |
video_meta_h | src | ||
) |
Clones the video metadata.
This function copies the video metadata handle from a source to destination.
[out] | dst | The destination handle to the video metadata |
[in] | src | The source handle to the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_destroy | ( | video_meta_h | video | ) |
Destroys the video metadata.
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 be created before the next use.
[in] | video | The video metadata handle |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_album | ( | video_meta_h | video, |
char ** | album | ||
) |
Gets the video's album.
If the value is an empty string, the method returns "Unknown".
[in] | video | The video metadata handle |
[out] | album | The video album or NULL |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_album_artist | ( | video_meta_h | video, |
char ** | album_artist | ||
) |
Gets the video album artist.
If the value is an empty string, the method returns "Unknown".
[in] | video | The video metadata handle |
[out] | album_artist | The album artist of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_artist | ( | video_meta_h | video, |
char ** | artist | ||
) |
Gets the video artist.
If the value is an empty string, the method returns "Unknown".
[in] | video | The video metadata handle |
[out] | artist | The artist of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_bit_rate | ( | video_meta_h | video, |
int * | bit_rate | ||
) |
Gets the video bit rate.
[in] | video | The video metadata handle |
[out] | bit_rate | The bit rate of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_composer | ( | video_meta_h | video, |
char ** | composer | ||
) |
Gets the video composer.
If the value is an empty string, the method returns "Unknown".
[in] | video | The video metadata handle |
[out] | composer | The composer of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_copyright | ( | video_meta_h | video, |
char ** | copyright | ||
) |
Gets the video copyright.
[in] | video | The video metadata handle |
[out] | copyright | The copyright of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_duration | ( | video_meta_h | video, |
int * | duration | ||
) |
Gets the duration of video metadata.
[in] | video | The video metadata handle |
[out] | duration | The video duration in milliseconds |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_genre | ( | video_meta_h | video, |
char ** | genre | ||
) |
Gets the video genre.
If the value is an empty string, the method returns "Unknown".
[in] | video | The video metadata handle |
[out] | genre | The genre of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_height | ( | video_meta_h | video, |
int * | height | ||
) |
Gets the video height in pixels.
[in] | video | The video metadata handle |
[out] | height | The video height in pixels |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_media_id | ( | video_meta_h | video, |
char ** | media_id | ||
) |
Gets the ID of the media of the given video metadata.
[in] | video | The video metadata handle |
[out] | media_id | The ID of the video |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_played_count | ( | video_meta_h | video, |
int * | played_count | ||
) |
Gets the played count of the video.
[in] | video | The video metadata handle |
[out] | played_count | The number of played |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_played_position | ( | video_meta_h | video, |
int * | played_position | ||
) |
Gets the position played parameter of the video.
This function returns the elapsed playback time parameter of the video as period starting from the beginning of the movie.
[in] | video | The video metadata handle |
[out] | played_position | The position from the beginning of the video (in milliseconds) |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_played_time | ( | video_meta_h | video, |
time_t * | played_time | ||
) |
Gets the last played time parameter of the video.
[in] | video | The video metadata handle |
[out] | played_time | The time last played in the video |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_recorded_date | ( | video_meta_h | video, |
char ** | recorded_date | ||
) |
Gets the recorded date of the video.
[in] | video | The video metadata handle |
[out] | recorded_date | The recorded date of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_track_num | ( | video_meta_h | video, |
char ** | track_num | ||
) |
Gets the track number of the video.
If the value is an empty string, the method returns "Unknown".
[in] | video | The video metadata handle |
[out] | track_num | The track number of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_width | ( | video_meta_h | video, |
int * | width | ||
) |
Gets the video width in pixels.
[in] | video | The video metadata handle |
[out] | width | The video width in pixels |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_get_year | ( | video_meta_h | video, |
char ** | year | ||
) |
Gets the year of the video.
If the value is an empty string, the method returns "Unknown".
[in] | video | The video metadata handle |
[out] | year | The year of the video metadata |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_OUT_OF_MEMORY | Out of memory |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_set_played_count | ( | video_meta_h | video, |
int | played_count | ||
) |
Sets the played count of the video.
[in] | video | The video metadata handle |
[in] | played_count | The number of played |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_set_played_position | ( | video_meta_h | video, |
int | played_position | ||
) |
Sets the position played parameter of the video.
This function returns video's elapsed playback time parameter as period starting from the beginning of the movie.
[in] | video | The video metadata handle |
[in] | played_position | The position from the beginning of the video (in milliseconds) |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_set_played_time | ( | video_meta_h | video, |
time_t | played_time | ||
) |
Sets the time last played parameter of the video.
[in] | video | The video metadata handle |
[in] | played_time | The time last played in the video |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |
int video_meta_update_to_db | ( | video_meta_h | video | ) |
Updates the video to the media database.
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, after using video_meta_get_played_time() for setting the played time of the video, the video_meta_update_to_db() function should be called so as to update the given video attributes in the media database.
[in] | video | The video metadata handle |
0
on success, otherwise a negative error valueMEDIA_CONTENT_ERROR_NONE | Successful |
MEDIA_CONTENT_ERROR_INVALID_PARAMETER | Invalid parameter |
MEDIA_CONTENT_ERROR_PERMISSION_DENIED | Permission denied |