[content] Fix doxygen for deprecated api
[platform/framework/native/content.git] / inc / FCntVideoMetadata.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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  * @file                        FCntVideoMetadata.h
18  * @brief               This is the header file for the %VideoMetadata class.
19  *
20  * This header file contains the declarations of the %VideoMetadata class.
21  */
22
23 #ifndef _FCNT_VIDEO_METADATA_H_
24 #define _FCNT_VIDEO_METADATA_H_
25
26 #include <FBaseObject.h>
27
28 namespace Tizen { namespace Graphics
29 {
30 class Bitmap;
31 }}
32
33 namespace Tizen { namespace Content
34 {
35
36 class _VideoMetadataImpl;
37
38 /**
39  * @class       VideoMetadata
40  * @brief       This class provides methods to access the video metadata.
41  *
42  * @since       2.0
43  *
44  * The %VideoMetadata class provides methods to access the video metadata that contains video content-specific attributes.
45  *
46  * The following example demonstrates how to use the %VideoMetadata class.
47  *
48  * @code
49  * result
50  * MyClass::TestVideoMetadata(void)
51  * {
52  *              Tizen::Base::String contentPath = Tizen::System::Environment::GetMediaPath() + L"Videos/video.mp4";
53  *              VideoMetadata* pVideoMeta = ContentManagerUtil::GetVideoMetaN(contentPath);
54  *              TryReturn(pVideoMeta != null, GetLastResult(), "ContentManagerUtil::GetVideoMetaN failed.");
55  *
56  *              // Width
57  *              pVideoMeta->GetWidth();
58  *
59  *              // Height
60  *              pVideoMeta->GetHeight();
61  *
62  *              // Duration
63  *              pVideoMeta->GetDuration();
64  *
65  *              delete pVideoMeta;
66  *
67  *              return E_SUCCESS;
68  * }
69  * @endcode
70  */
71 class _OSP_EXPORT_ VideoMetadata
72         : virtual public Tizen::Base::Object
73 {
74 public:
75         /**
76          * This is the default constructor for this class.
77          *
78          * @since               2.0
79          */
80         VideoMetadata(void);
81
82         /**
83          * Copying of objects using this copy constructor is allowed.
84          *
85          * @since               2.0
86          *
87          * @param[in]   rhs     An instance of %VideoMetadata
88          */
89         VideoMetadata(const VideoMetadata& rhs);
90
91         /**
92          * This destructor overrides Tizen::Base::Object::~Object().
93          *
94          * @since               2.0
95          */
96         virtual ~VideoMetadata(void);
97
98         /**
99          * Gets the width.
100          *
101          * @since               2.0
102          *
103          * @return              The width
104          */
105         int GetWidth(void) const;
106
107         /**
108          * Gets the height.
109          *
110          * @since               2.0
111          *
112          * @return              The height
113          */
114         int GetHeight(void) const;
115
116         /**
117          * Gets the duration.
118          *
119          * @since               2.0
120          *
121          * @return              The duration in milliseconds
122          */
123         long GetDuration(void) const;
124
125         /**
126          * Gets the frame rate.
127          *
128          * @since               2.0
129          *
130          * @return              The frame rate
131          */
132         int GetFramerate(void) const;
133
134         /**
135          * @if OSPDEPREC
136          * Gets the bit rate.
137          *
138          * @brief       <i> [Deprecated] </i>
139          * @deprecated  This method is deprecated because a new method has been added. @n
140          *                  Instead of using this method, use GetAudioBitrate() or GetVideoBitrate().
141          * @since               2.0
142          * @endif
143          *
144          * @return              The bit rate in bits per second (bps)
145          * @remarks     There are two kinds of bit rates in a video file: audio and video. @n
146          *                                      The return value is the bit rate for the audio.
147          * @endif
148          */
149         int GetBitrate(void) const;
150
151         /**
152          * Gets the audio bit rate.
153          *
154          * @since     2.0
155          *
156          * @return    The audio bit rate in bits per second (bps)
157          */
158         int GetAudioBitrate(void) const;
159
160         /**
161          * Gets the video bit rate.
162          *
163          * @since     2.0
164          *
165          * @return    The video bit rate in bits per second (bps)
166          */
167         int GetVideoBitrate(void) const;
168
169         /**
170          * Gets the genre.
171          *
172          * @since               2.0
173          *
174          * @return              The genre
175          */
176         Tizen::Base::String GetGenre(void) const;
177
178         /**
179          * Gets a comment of a video file.
180          *
181          * @since               2.1
182          *
183          * @return              A comment of a video file
184          */
185         Tizen::Base::String GetComment(void) const;
186
187         /**
188          * Gets the description of a video file.
189          *
190          * @since               2.1
191          *
192          * @return              The description of a video file
193          */
194         Tizen::Base::String GetDescription(void) const;
195
196         /**
197          * Gets the album art of a video.
198          *
199          * @since                       2.0
200          *
201          * @return                      A pointer to the album art
202          * @exception   E_SUCCESS                                       The method is successful.
203          * @exception   E_DATA_NOT_FOUND                The album art does not exist.
204          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
205          * @remarks             The specific error code can be accessed using the GetLastResult() method.
206          */
207         Tizen::Graphics::Bitmap* GetAlbumArtN(void) const;
208
209         /**
210          * Compares the equality of values between two %VideoMetadata objects by overriding the Tizen::Base::Object::Equals() method.
211          *
212          * @since          2.0
213          *
214          * @return         @c true if all the fields in the objects are equal, @n
215          *                     else @c false
216          * @param[in]    rhs     The Tizen::Base::Object with which the comparison is done @n
217          *                              An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
218          */
219         virtual bool Equals(const Tizen::Base::Object& rhs) const;
220
221         /**
222          * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
223          *
224          * @since         2.0
225          *
226          * @return        The hash value of the current instance
227          */
228         virtual int GetHashCode(void) const;
229
230         /**
231          * Copying of objects using this copy assignment operator is allowed.
232          *
233          * @since          2.0
234          *
235          * @return         A reference to this instance
236          * @param[in]    rhs An instance of %VideoMetadata
237          */
238         VideoMetadata& operator =(const VideoMetadata& rhs);
239
240 private:
241         friend class _VideoMetadataImpl;
242         _VideoMetadataImpl* __pImpl;
243
244 };  // Class VideoMetadata
245
246 }}  // Tizen::Content
247
248 #endif  // _FCNT_VIDEO_METADATA_H_