e1600be5c63052d63cb83f3aef08cb5378fc0fec
[platform/core/api/media-content.git] / include_product / media_video.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17
18 #ifndef __TIZEN_CONTENT_MEDIA_VIDEO_H__
19 #define __TIZEN_CONTENT_MEDIA_VIDEO_H__
20
21 #include <media_content_type.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26
27 /**
28  * @file media_video.h
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
31  *        album, genre, etc.
32  */
33
34 /**
35  * @addtogroup CAPI_CONTENT_MEDIA_VIDEO_META_MODULE
36  * @{
37  */
38
39 /**
40  * @brief Clones the video metadata.
41  * @details This function copies the video metadata handle from a source to destination.
42  *
43  * @since_tizen 2.3
44  *
45  * @remarks The @a dst should be released using video_meta_destroy().
46  *
47  * @param[out] dst The destination handle to the video metadata
48  * @param[in] src The source handle to the video metadata
49  *
50  * @return @c 0 on success,
51  *         otherwise a negative error value
52  *
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
56  *
57  * @see video_meta_destroy()
58  */
59 int video_meta_clone(video_meta_h *dst, video_meta_h src);
60
61 /**
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.
66  *
67  * @since_tizen 2.3
68  *
69  * @param[in] video The handle to the video metadata
70  *
71  * @return @c 0 on success,
72  *         otherwise a negative error value
73  *
74  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
75  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
76  *
77  * @pre Get copy of video metadata handle by calling video_meta_clone().
78  *
79  * @see video_meta_clone()
80  */
81 int video_meta_destroy(video_meta_h video);
82
83 /**
84  * @brief Gets the ID of the media of the given video metadata.
85  * @since_tizen 2.3
86  *
87  * @remarks The @a media_id should be released using free().
88  *
89  * @param[in] video The handle to the video metadata
90  * @param[out] media_id The media ID
91  *
92  * @return @c 0 on success,
93  *         otherwise a negative error value
94  *
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
98  */
99 int video_meta_get_media_id(video_meta_h video, char **media_id);
100
101 /**
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.
106  *
107  * @since_tizen 2.3
108  *
109  * @remarks The @a album should be released using free().
110  *
111  * @param[in] video The handle to the video metadata
112  * @param[out] album The album of the video metadata
113  *
114  * @return @c 0 on success,
115  *         otherwise a negative error value
116  *
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
120  */
121 int video_meta_get_album(video_meta_h video, char **album) TIZEN_DEPRECATED_API;
122
123 /**
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.
128  *
129  * @since_tizen 2.3
130  *
131  * @remarks The @a artist should be released using free().
132  *
133  * @param[in] video The handle to the video metadata
134  * @param[out] artist The artist of the video metadata
135  *
136  * @return @c 0 on success,
137  *         otherwise a negative error value
138  *
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
142  */
143 int video_meta_get_artist(video_meta_h video, char **artist) TIZEN_DEPRECATED_API;
144
145 /**
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.
150  *
151  * @since_tizen 2.3
152  *
153  * @remarks The @a album_artist should be released using free().
154  *
155  * @param[in] video The handle to the video metadata
156  * @param[out] album_artist The album artist of the video metadata
157  *
158  * @return @c 0 on success,
159  *         otherwise a negative error value
160  *
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
164  */
165 int video_meta_get_album_artist(video_meta_h video, char **album_artist) TIZEN_DEPRECATED_API;
166
167 /**
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.
172  *
173  * @since_tizen 2.3
174  *
175  * @remarks The @a genre should be released using free().
176  *
177  * @param[in] video The handle to the video metadata
178  * @param[out] genre The genre of the video metadata
179  *
180  * @return @c 0 on success,
181  *         otherwise a negative error value
182  *
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
186  */
187 int video_meta_get_genre(video_meta_h video, char **genre) TIZEN_DEPRECATED_API;
188
189 /**
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.
194  *
195  * @since_tizen 2.3
196  *
197  * @remarks The @a composer should be released using free().
198  *
199  * @param[in] video The handle to the video metadata
200  * @param[out] composer The composer of the video metadata
201  *
202  * @return @c 0 on success,
203  *         otherwise a negative error value
204  *
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
208  */
209 int video_meta_get_composer(video_meta_h video, char **composer) TIZEN_DEPRECATED_API;
210
211 /**
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.
216  *
217  * @since_tizen 2.3
218  *
219  * @remarks The @a year should be released using free().
220  *
221  * @param[in] video The handle to the video metadata
222  * @param[out] year The year of the video metadata
223  *
224  * @return @c 0 on success,
225  *         otherwise a negative error value
226  *
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
230  */
231 int video_meta_get_year(video_meta_h video, char **year) TIZEN_DEPRECATED_API;
232
233 /**
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.
238  *
239  * @since_tizen 2.3
240  *
241  * @remarks The @a recorded_date should be released using free().
242  *
243  * @param[in] video The handle to the video metadata
244  * @param[out] recorded_date The recorded date of the video metadata
245  *
246  * @return @c 0 on success,
247  *         otherwise a negative error value
248  *
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
252  */
253 int video_meta_get_recorded_date(video_meta_h video, char **recorded_date) TIZEN_DEPRECATED_API;
254
255 /**
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.
260  *
261  * @since_tizen 2.3
262  *
263  * @remarks The @a copyright should be released using free().
264  *
265  * @param[in] video The handle to the video metadata
266  * @param[out] copyright The copyright of the video metadata
267  *
268  * @return @c 0 on success,
269  *         otherwise a negative error value
270  *
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
274  */
275 int video_meta_get_copyright(video_meta_h video, char **copyright) TIZEN_DEPRECATED_API;
276
277 /**
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.
282  *
283  * @since_tizen 2.3
284  *
285  * @remarks The @a track_num should be released using free().
286  *
287  * @param[in] video The handle to the video metadata
288  * @param[out] track_num The track number of the video metadata
289  *
290  * @return @c 0 on success,
291  *         otherwise a negative error value
292  *
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
296  */
297 int video_meta_get_track_num(video_meta_h video, char **track_num) TIZEN_DEPRECATED_API;
298
299 /**
300  * @deprecated Deprecated since 9.0.
301  * @brief Gets the bitrate of the given video metadata in bitrate per second.
302  * @since_tizen 2.3
303  *
304  * @param[in] video The handle to the video metadata
305  * @param[out] bit_rate The video bit rate in bit per second [bps]
306  *
307  * @return @c 0 on success,
308  *         otherwise a negative error value
309  *
310  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
311  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
312  */
313 int video_meta_get_bit_rate(video_meta_h video, int *bit_rate) TIZEN_DEPRECATED_API;
314
315 /**
316  * @deprecated Deprecated since 9.0.
317  * @brief Gets the track duration of the given video metadata.
318  * @since_tizen 2.3
319  *
320  * @param[in] video The handle to the video metadata
321  * @param[out] duration The video duration in milliseconds
322  *
323  * @return @c 0 on success,
324  *         otherwise a negative error value
325  *
326  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
327  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
328  */
329 int video_meta_get_duration(video_meta_h video, int *duration) TIZEN_DEPRECATED_API;
330
331 /**
332  * @brief Gets the width of the given video metadata.
333  * @since_tizen 2.3
334  *
335  * @param[in] video The handle to the video metadata
336  * @param[out] width The video width in pixels
337  *
338  * @return @c 0 on success,
339  *         otherwise a negative error value
340  *
341  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
342  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
343  */
344 int video_meta_get_width(video_meta_h video, int *width);
345
346 /**
347  * @brief Gets the height of the given video metadata.
348  * @since_tizen 2.3
349  *
350  * @param[in] video The handle to the video metadata
351  * @param[out] height The video height in pixels
352  *
353  * @return @c 0 on success,
354  *         otherwise a negative error value
355  *
356  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
357  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
358  */
359 int video_meta_get_height(video_meta_h video, int *height);
360
361 /**
362  * @deprecated Deprecated since 9.0.
363  * @brief Gets the rotation of the given video metadata.
364  * @since_tizen 4.0
365  *
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)
368  *
369  * @return @c 0 on success,
370  *         otherwise a negative error value
371  *
372  * @retval #MEDIA_CONTENT_ERROR_NONE              Successful
373  * @retval #MEDIA_CONTENT_ERROR_INVALID_PARAMETER Invalid parameter
374  */
375 int video_meta_get_rotation(video_meta_h video, int *rotation) TIZEN_DEPRECATED_API;
376
377 /**
378  *@}
379  */
380
381 #ifdef __cplusplus
382 }
383 #endif /* __cplusplus */
384
385 #endif /*__TIZEN_CONTENT_MEDIA_VIDEO_H__*/