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 * @deprecated Deprecated since 9.0.
41 * @brief Clones the video metadata.
42 * @details This function copies the video metadata handle from a source to destination.
46 * @remarks The @a dst should be released using video_meta_destroy().
48 * @param[out] dst The destination handle to the video metadata
49 * @param[in] src The source handle to the video metadata
51 * @return @c 0 on success,
52 * otherwise a negative error value
54 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
55 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
56 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
58 * @see video_meta_destroy()
60 int video_meta_clone(video_meta_h *dst, video_meta_h src) TIZEN_DEPRECATED_API;
63 * @deprecated Deprecated since 9.0.
64 * @brief Destroys the video metadata.
65 * @details This function frees all resources related to the video metadata handle. This handle
66 * no longer can be used to perform any operations. A new handle has to
67 * be created before the next use.
71 * @param[in] video The handle to the video metadata
73 * @return @c 0 on success,
74 * otherwise a negative error value
76 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
77 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
79 * @pre Get copy of video metadata handle by calling video_meta_clone().
81 * @see video_meta_clone()
83 int video_meta_destroy(video_meta_h video) TIZEN_DEPRECATED_API;
86 * @deprecated Deprecated since 9.0.
87 * @brief Gets the ID of the media of the given video metadata.
90 * @remarks The @a media_id should be released using free().
92 * @param[in] video The handle to the video metadata
93 * @param[out] media_id The media ID
95 * @return @c 0 on success,
96 * otherwise a negative error value
98 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
99 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
100 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
102 int video_meta_get_media_id(video_meta_h video, char **media_id) TIZEN_DEPRECATED_API;
105 * @deprecated Deprecated since 9.0.
106 * @brief Gets the album of the given video metadata.
107 * @details If the value is an empty string, the method returns "Unknown". \n
108 * Since 3.0, if the media content has no album info, the method returns empty string.
112 * @remarks The @a album should be released using free().
114 * @param[in] video The handle to the video metadata
115 * @param[out] album The album of the video metadata
117 * @return @c 0 on success,
118 * otherwise a negative error value
120 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
121 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
122 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
124 int video_meta_get_album(video_meta_h video, char **album) TIZEN_DEPRECATED_API;
127 * @deprecated Deprecated since 9.0.
128 * @brief Gets the artist of the given video metadata.
129 * @details If the value is an empty string, the method returns "Unknown". \n
130 * Since 3.0, if the media content has no artist info, the method returns empty string.
134 * @remarks The @a artist should be released using free().
136 * @param[in] video The handle to the video metadata
137 * @param[out] artist The artist of the video metadata
139 * @return @c 0 on success,
140 * otherwise a negative error value
142 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
143 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
144 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
146 int video_meta_get_artist(video_meta_h video, char **artist) TIZEN_DEPRECATED_API;
149 * @deprecated Deprecated since 9.0.
150 * @brief Gets the video album artist.
151 * @details If the value is an empty string, the method returns "Unknown". \n
152 * Since 3.0, if the media content has no album artist info, the method returns empty string.
156 * @remarks The @a album_artist should be released using free().
158 * @param[in] video The handle to the video metadata
159 * @param[out] album_artist The album artist of the video metadata
161 * @return @c 0 on success,
162 * otherwise a negative error value
164 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
165 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
166 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
168 int video_meta_get_album_artist(video_meta_h video, char **album_artist) TIZEN_DEPRECATED_API;
171 * @deprecated Deprecated since 9.0.
172 * @brief Gets the genre of the given video metadata.
173 * @details If the value is an empty string, the method returns "Unknown". \n
174 * Since 3.0, if the media content has no genre info, the method returns empty string.
178 * @remarks The @a genre should be released using free().
180 * @param[in] video The handle to the video metadata
181 * @param[out] genre The genre of the video metadata
183 * @return @c 0 on success,
184 * otherwise a negative error value
186 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
187 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
188 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
190 int video_meta_get_genre(video_meta_h video, char **genre) TIZEN_DEPRECATED_API;
193 * @deprecated Deprecated since 9.0.
194 * @brief Gets the composer of the given video metadata.
195 * @details If the value is an empty string, the method returns "Unknown". \n
196 * Since 3.0, if the media content has no composer info, the method returns empty string.
200 * @remarks The @a composer should be released using free().
202 * @param[in] video The handle to the video metadata
203 * @param[out] composer The composer of the video metadata
205 * @return @c 0 on success,
206 * otherwise a negative error value
208 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
209 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
210 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
212 int video_meta_get_composer(video_meta_h video, char **composer) TIZEN_DEPRECATED_API;
215 * @deprecated Deprecated since 9.0.
216 * @brief Gets the year of the given video metadata.
217 * @details If the value is an empty string, the method returns "Unknown". \n
218 * Since 3.0, if the media content has no year info, the method returns empty string.
222 * @remarks The @a year should be released using free().
224 * @param[in] video The handle to the video metadata
225 * @param[out] year The year of the video metadata
227 * @return @c 0 on success,
228 * otherwise a negative error value
230 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
231 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
232 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
234 int video_meta_get_year(video_meta_h video, char **year) TIZEN_DEPRECATED_API;
237 * @deprecated Deprecated since 9.0.
238 * @brief Gets the recorded date of the given video metadata.
239 * @details The format of the recorded date may vary depending on the file format. \n
240 * For more details on the recorded date format, refer to the file format specification.
244 * @remarks The @a recorded_date should be released using free().
246 * @param[in] video The handle to the video metadata
247 * @param[out] recorded_date The recorded date of the video metadata
249 * @return @c 0 on success,
250 * otherwise a negative error value
252 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
253 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
254 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
256 int video_meta_get_recorded_date(video_meta_h video, char **recorded_date) TIZEN_DEPRECATED_API;
259 * @deprecated Deprecated since 9.0.
260 * @brief Gets the copyright notice of the given video metadata.
261 * @details If the value is an empty string, the method returns "Unknown". \n
262 * Since 3.0, if the media content has no copyright info, the method returns empty string.
266 * @remarks The @a copyright should be released using free().
268 * @param[in] video The handle to the video metadata
269 * @param[out] copyright The copyright of the video metadata
271 * @return @c 0 on success,
272 * otherwise a negative error value
274 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
275 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
276 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
278 int video_meta_get_copyright(video_meta_h video, char **copyright) TIZEN_DEPRECATED_API;
281 * @deprecated Deprecated since 9.0.
282 * @brief Gets the track number of the given video metadata.
283 * @details If the value is an empty string, the method returns "Unknown". \n
284 * Since 3.0, if the media content has no track info, the method returns empty string.
288 * @remarks The @a track_num should be released using free().
290 * @param[in] video The handle to the video metadata
291 * @param[out] track_num The track number of the video metadata
293 * @return @c 0 on success,
294 * otherwise a negative error value
296 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
297 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
298 * @retval #MEDIA_CONTENT_ERROR_OUT_OF_MEMORY Out of memory
300 int video_meta_get_track_num(video_meta_h video, char **track_num) TIZEN_DEPRECATED_API;
303 * @deprecated Deprecated since 9.0.
304 * @brief Gets the bitrate of the given video metadata in bitrate per second.
307 * @param[in] video The handle to the video metadata
308 * @param[out] bit_rate The video bit rate in bit per second [bps]
310 * @return @c 0 on success,
311 * otherwise a negative error value
313 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
314 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
316 int video_meta_get_bit_rate(video_meta_h video, int *bit_rate) TIZEN_DEPRECATED_API;
319 * @deprecated Deprecated since 9.0.
320 * @brief Gets the track duration of the given video metadata.
323 * @param[in] video The handle to the video metadata
324 * @param[out] duration The video duration in milliseconds
326 * @return @c 0 on success,
327 * otherwise a negative error value
329 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
330 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
332 int video_meta_get_duration(video_meta_h video, int *duration) TIZEN_DEPRECATED_API;
335 * @deprecated Deprecated since 9.0.
336 * @brief Gets the width of the given video metadata.
339 * @param[in] video The handle to the video metadata
340 * @param[out] width The video width in pixels
342 * @return @c 0 on success,
343 * otherwise a negative error value
345 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
346 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
348 int video_meta_get_width(video_meta_h video, int *width) TIZEN_DEPRECATED_API;
351 * @deprecated Deprecated since 9.0.
352 * @brief Gets the height of the given video metadata.
355 * @param[in] video The handle to the video metadata
356 * @param[out] height The video height in pixels
358 * @return @c 0 on success,
359 * otherwise a negative error value
361 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
362 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
364 int video_meta_get_height(video_meta_h video, int *height) TIZEN_DEPRECATED_API;
367 * @deprecated Deprecated since 9.0.
368 * @brief Gets the rotation of the given video metadata.
371 * @param[in] video The handle to the video metadata
372 * @param[out] rotation The clockwise rotation angle of the video in degrees (can be returned from 0 to less than 360)
374 * @return @c 0 on success,
375 * otherwise a negative error value
377 * @retval #MEDIA_CONTENT_ERROR_NONE Successful
378 * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
380 int video_meta_get_rotation(video_meta_h video, int *rotation) TIZEN_DEPRECATED_API;
388 #endif /* __cplusplus */
390 #endif /*__TIZEN_CONTENT_MEDIA_VIDEO_H__*/