[content] Fix description in DownloadManager
[platform/framework/native/content.git] / inc / FCntVideoMetadata.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file                        FCntVideoMetadata.h
19  * @brief               This is the header file for the %VideoMetadata class.
20  *
21  * This header file contains the declarations of the %VideoMetadata class.
22  */
23
24 #ifndef _FCNT_VIDEO_METADATA_H_
25 #define _FCNT_VIDEO_METADATA_H_
26
27 #include <FBaseObject.h>
28
29 namespace Tizen { namespace Graphics
30 {
31 class Bitmap;
32 }}
33
34 namespace Tizen { namespace Content
35 {
36
37 class _VideoMetadataImpl;
38
39 /**
40  * @class       VideoMetadata
41  * @brief       This class provides methods to access the video metadata.
42  *
43  * @since       2.0
44  *
45  * The %VideoMetadata class provides methods to access the video metadata that contains video content-specific attributes.
46  *
47  * The following example demonstrates how to use the %VideoMetadata class.
48  *
49  * @code
50  * result
51  * MyClass::TestVideoMetadata(void)
52  * {
53  *              Tizen::Base::String contentPath = Tizen::System::Environment::GetMediaPath() + L"Videos/video.mp4";
54  *              VideoMetadata* pVideoMeta = ContentManagerUtil::GetVideoMetaN(contentPath);
55  *              TryReturn(pVideoMeta != null, GetLastResult(), "ContentManagerUtil::GetVideoMetaN failed.");
56  *
57  *              // Width
58  *              pVideoMeta->GetWidth();
59  *
60  *              // Height
61  *              pVideoMeta->GetHeight();
62  *
63  *              // Duration
64  *              pVideoMeta->GetDuration();
65  *
66  *              delete pVideoMeta;
67  *
68  *              return E_SUCCESS;
69  * }
70  * @endcode
71  */
72 class _OSP_EXPORT_ VideoMetadata
73         : virtual public Tizen::Base::Object
74 {
75 public:
76         /**
77          * This is the default constructor for this class.
78          *
79          * @since               2.0
80          */
81         VideoMetadata(void);
82
83         /**
84          * Copying of objects using this copy constructor is allowed.
85          *
86          * @since               2.0
87          *
88          * @param[in]   rhs     An instance of %VideoMetadata
89          */
90         VideoMetadata(const VideoMetadata& rhs);
91
92         /**
93          * This destructor overrides Tizen::Base::Object::~Object().
94          *
95          * @since               2.0
96          */
97         virtual ~VideoMetadata(void);
98
99         /**
100          * Gets the width.
101          *
102          * @since               2.0
103          *
104          * @return              The width
105          */
106         int GetWidth(void) const;
107
108         /**
109          * Gets the height.
110          *
111          * @since               2.0
112          *
113          * @return              The height
114          */
115         int GetHeight(void) const;
116
117         /**
118          * Gets the duration.
119          *
120          * @since               2.0
121          *
122          * @return              The duration in milliseconds
123          */
124         long GetDuration(void) const;
125
126         /**
127          * Gets the frame rate.
128          *
129          * @since               2.0
130          *
131          * @return              The frame rate
132          */
133         int GetFramerate(void) const;
134
135         /**
136          * @if OSPDEPREC
137          * Gets the bit rate.
138          *
139          * @brief       <i> [Deprecated] </i>
140          * @deprecated  This method is deprecated because a new method has been added. @n
141          *                  Instead of using this method, use GetAudioBitrate() or GetVideoBitrate().
142          * @since               2.0
143          * @endif
144          *
145          * @return              The bit rate in bits per second (bps)
146          * @remarks     There are two kinds of bit rates in a video file: audio and video. @n
147          *                                      The return value is the bit rate for the audio.
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 the comment of the video file.
180          *
181          * @since               2.1
182          *
183          * @return              The comment of the video file
184          */
185         Tizen::Base::String GetComment(void) const;
186
187         /**
188          * Gets the description of the video file.
189          *
190          * @since               2.1
191          *
192          * @return              The description of the video file
193          */
194         Tizen::Base::String GetDescription(void) const;
195
196         /**
197          * Gets the album art of the 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
217          * @remarks             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_