update header for Doxygen
[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          */
148         int GetBitrate(void) const;
149
150         /**
151          * Gets the audio bit rate.
152          *
153          * @since     2.0
154          *
155          * @return    The audio bit rate in bits per second (bps)
156          */
157         int GetAudioBitrate(void) const;
158
159         /**
160          * Gets the video bit rate.
161          *
162          * @since     2.0
163          *
164          * @return    The video bit rate in bits per second (bps)
165          */
166         int GetVideoBitrate(void) const;
167
168         /**
169          * Gets the genre.
170          *
171          * @since               2.0
172          *
173          * @return              The genre
174          */
175         Tizen::Base::String GetGenre(void) const;
176
177         /**
178          * Gets a comment of a video file.
179          *
180          * @since               2.1
181          *
182          * @return              A comment of a video file
183          */
184         Tizen::Base::String GetComment(void) const;
185
186         /**
187          * Gets the description of a video file.
188          *
189          * @since               2.1
190          *
191          * @return              The description of a video file
192          */
193         Tizen::Base::String GetDescription(void) const;
194
195         /**
196          * Gets the album art of a video.
197          *
198          * @since                       2.0
199          *
200          * @return                      A pointer to the album art
201          * @exception   E_SUCCESS                                       The method is successful.
202          * @exception   E_DATA_NOT_FOUND                The album art does not exist.
203          * @exception   E_OUT_OF_MEMORY         The memory is insufficient.
204          * @remarks             The specific error code can be accessed using the GetLastResult() method.
205          */
206         Tizen::Graphics::Bitmap* GetAlbumArtN(void) const;
207
208         /**
209          * Compares the equality of values between two %VideoMetadata objects by overriding the Tizen::Base::Object::Equals() method.
210          *
211          * @since          2.0
212          *
213          * @return         @c true if all the fields in the objects are equal, @n
214          *                     else @c false
215          * @param[in]    rhs     The Tizen::Base::Object with which the comparison is done
216          * @remarks             An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
217          */
218         virtual bool Equals(const Tizen::Base::Object& rhs) const;
219
220         /**
221          * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
222          *
223          * @since         2.0
224          *
225          * @return        The hash value of the current instance
226          */
227         virtual int GetHashCode(void) const;
228
229         /**
230          * Copying of objects using this copy assignment operator is allowed.
231          *
232          * @since          2.0
233          *
234          * @return         A reference to this instance
235          * @param[in]    rhs An instance of %VideoMetadata
236          */
237         VideoMetadata& operator =(const VideoMetadata& rhs);
238
239 private:
240         friend class _VideoMetadataImpl;
241         _VideoMetadataImpl* __pImpl;
242
243 };  // Class VideoMetadata
244
245 }}  // Tizen::Content
246
247 #endif  // _FCNT_VIDEO_METADATA_H_