2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __TIZEN_CONTENT_MEDIA_VIDEO_H__
19 #define __TIZEN_CONTENT_MEDIA_VIDEO_H__
21 #include <media_content_type.h>
25 #endif /* __cplusplus */
29 * @brief This file contains the video metadata API and related functions to proceed with video metadata. \n
30 * Functions include cloning and destroying video metadata, getting video metadata such as width, height, \n
35 * @addtogroup CAPI_CONTENT_MEDIA_VIDEO_META_MODULE
40 * @brief Clones the video metadata.
41 * @details This function copies the video metadata handle from a source to destination.
45 * @remarks The @a dst should be released using video_meta_destroy().
47 * @param[out] dst The destination handle to the video metadata
48 * @param[in] src The source handle to the video metadata
50 * @return @c 0 on success,
51 * otherwise a negative error value
53 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
54 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
55 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
57 * @see video_meta_destroy()
59 int video_meta_clone(video_meta_h *dst, video_meta_h src);
62 * @brief Destroys the video metadata.
63 * @details This function frees all resources related to the video metadata handle. This handle
64 * no longer can be used to perform any operations. A new handle has to
65 * be created before the next use.
69 * @param[in] video The handle to the video metadata
71 * @return @c 0 on success,
72 * otherwise a negative error value
74 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
75 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
77 * @pre Get copy of video metadata handle by calling video_meta_clone().
79 * @see video_meta_clone()
81 int video_meta_destroy(video_meta_h video);
84 * @brief Gets the ID of the media of the given video metadata.
87 * @remarks The @a media_id should be released using free().
89 * @param[in] video The handle to the video metadata
90 * @param[out] media_id The media ID
92 * @return @c 0 on success,
93 * otherwise a negative error value
95 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
96 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
97 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
99 int video_meta_get_media_id(video_meta_h video, char **media_id);
102 * @deprecated Deprecated since 9.0.
103 * @brief Gets the album of the given video metadata.
104 * @details If the value is an empty string, the method returns "Unknown". \n
105 * Since 3.0, if the media content has no album info, the method returns empty string.
109 * @remarks The @a album should be released using free().
111 * @param[in] video The handle to the video metadata
112 * @param[out] album The album of the video metadata
114 * @return @c 0 on success,
115 * otherwise a negative error value
117 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
118 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
119 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
121 int video_meta_get_album(video_meta_h video, char **album) TIZEN_DEPRECATED_API;
124 * @deprecated Deprecated since 9.0.
125 * @brief Gets the artist of the given video metadata.
126 * @details If the value is an empty string, the method returns "Unknown". \n
127 * Since 3.0, if the media content has no artist info, the method returns empty string.
131 * @remarks The @a artist should be released using free().
133 * @param[in] video The handle to the video metadata
134 * @param[out] artist The artist of the video metadata
136 * @return @c 0 on success,
137 * otherwise a negative error value
139 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
140 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
141 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
143 int video_meta_get_artist(video_meta_h video, char **artist) TIZEN_DEPRECATED_API;
146 * @deprecated Deprecated since 9.0.
147 * @brief Gets the video album artist.
148 * @details If the value is an empty string, the method returns "Unknown". \n
149 * Since 3.0, if the media content has no album artist info, the method returns empty string.
153 * @remarks The @a album_artist should be released using free().
155 * @param[in] video The handle to the video metadata
156 * @param[out] album_artist The album artist of the video metadata
158 * @return @c 0 on success,
159 * otherwise a negative error value
161 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
162 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
163 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
165 int video_meta_get_album_artist(video_meta_h video, char **album_artist) TIZEN_DEPRECATED_API;
168 * @deprecated Deprecated since 9.0.
169 * @brief Gets the genre of the given video metadata.
170 * @details If the value is an empty string, the method returns "Unknown". \n
171 * Since 3.0, if the media content has no genre info, the method returns empty string.
175 * @remarks The @a genre should be released using free().
177 * @param[in] video The handle to the video metadata
178 * @param[out] genre The genre of the video metadata
180 * @return @c 0 on success,
181 * otherwise a negative error value
183 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
184 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
185 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
187 int video_meta_get_genre(video_meta_h video, char **genre) TIZEN_DEPRECATED_API;
190 * @deprecated Deprecated since 9.0.
191 * @brief Gets the composer of the given video metadata.
192 * @details If the value is an empty string, the method returns "Unknown". \n
193 * Since 3.0, if the media content has no composer info, the method returns empty string.
197 * @remarks The @a composer should be released using free().
199 * @param[in] video The handle to the video metadata
200 * @param[out] composer The composer of the video metadata
202 * @return @c 0 on success,
203 * otherwise a negative error value
205 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
206 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
207 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
209 int video_meta_get_composer(video_meta_h video, char **composer) TIZEN_DEPRECATED_API;
212 * @deprecated Deprecated since 9.0.
213 * @brief Gets the year of the given video metadata.
214 * @details If the value is an empty string, the method returns "Unknown". \n
215 * Since 3.0, if the media content has no year info, the method returns empty string.
219 * @remarks The @a year should be released using free().
221 * @param[in] video The handle to the video metadata
222 * @param[out] year The year of the video metadata
224 * @return @c 0 on success,
225 * otherwise a negative error value
227 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
228 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
229 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
231 int video_meta_get_year(video_meta_h video, char **year) TIZEN_DEPRECATED_API;
234 * @deprecated Deprecated since 9.0.
235 * @brief Gets the recorded date of the given video metadata.
236 * @details The format of the recorded date may vary depending on the file format. \n
237 * For more details on the recorded date format, refer to the file format specification.
241 * @remarks The @a recorded_date should be released using free().
243 * @param[in] video The handle to the video metadata
244 * @param[out] recorded_date The recorded date of the video metadata
246 * @return @c 0 on success,
247 * otherwise a negative error value
249 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
250 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
251 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
253 int video_meta_get_recorded_date(video_meta_h video, char **recorded_date) TIZEN_DEPRECATED_API;
256 * @deprecated Deprecated since 9.0.
257 * @brief Gets the copyright notice of the given video metadata.
258 * @details If the value is an empty string, the method returns "Unknown". \n
259 * Since 3.0, if the media content has no copyright info, the method returns empty string.
263 * @remarks The @a copyright should be released using free().
265 * @param[in] video The handle to the video metadata
266 * @param[out] copyright The copyright of the video metadata
268 * @return @c 0 on success,
269 * otherwise a negative error value
271 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
272 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
273 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
275 int video_meta_get_copyright(video_meta_h video, char **copyright) TIZEN_DEPRECATED_API;
278 * @deprecated Deprecated since 9.0.
279 * @brief Gets the track number of the given video metadata.
280 * @details If the value is an empty string, the method returns "Unknown". \n
281 * Since 3.0, if the media content has no track info, the method returns empty string.
285 * @remarks The @a track_num should be released using free().
287 * @param[in] video The handle to the video metadata
288 * @param[out] track_num The track number of the video metadata
290 * @return @c 0 on success,
291 * otherwise a negative error value
293 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
294 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
295 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
297 int video_meta_get_track_num(video_meta_h video, char **track_num) TIZEN_DEPRECATED_API;
300 * @deprecated Deprecated since 9.0.
301 * @brief Gets the bitrate of the given video metadata in bitrate per second.
304 * @param[in] video The handle to the video metadata
305 * @param[out] bit_rate The video bit rate in bit per second [bps]
307 * @return @c 0 on success,
308 * otherwise a negative error value
310 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
311 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
313 int video_meta_get_bit_rate(video_meta_h video, int *bit_rate) TIZEN_DEPRECATED_API;
316 * @deprecated Deprecated since 9.0.
317 * @brief Gets the track duration of the given video metadata.
320 * @param[in] video The handle to the video metadata
321 * @param[out] duration The video duration in milliseconds
323 * @return @c 0 on success,
324 * otherwise a negative error value
326 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
327 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
329 int video_meta_get_duration(video_meta_h video, int *duration) TIZEN_DEPRECATED_API;
332 * @brief Gets the width of the given video metadata.
335 * @param[in] video The handle to the video metadata
336 * @param[out] width The video width in pixels
338 * @return @c 0 on success,
339 * otherwise a negative error value
341 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
342 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
344 int video_meta_get_width(video_meta_h video, int *width);
347 * @brief Gets the height of the given video metadata.
350 * @param[in] video The handle to the video metadata
351 * @param[out] height The video height in pixels
353 * @return @c 0 on success,
354 * otherwise a negative error value
356 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
357 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
359 int video_meta_get_height(video_meta_h video, int *height);
362 * @deprecated Deprecated since 9.0.
363 * @brief Gets the rotation of the given video metadata.
366 * @param[in] video The handle to the video metadata
367 * @param[out] rotation The clockwise rotation angle of the video in degrees (can be returned from 0 to less than 360)
369 * @return @c 0 on success,
370 * otherwise a negative error value
372 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
373 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
375 int video_meta_get_rotation(video_meta_h video, int *rotation) TIZEN_DEPRECATED_API;
383 #endif /* __cplusplus */
385 #endif /*__TIZEN_CONTENT_MEDIA_VIDEO_H__*/