2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FCntVideoMetadata.h
19 * @brief This is the header file for the %VideoMetadata class.
21 * This header file contains the declarations of the %VideoMetadata class.
24 #ifndef _FCNT_VIDEO_METADATA_H_
25 #define _FCNT_VIDEO_METADATA_H_
27 #include <FBaseObject.h>
29 namespace Tizen { namespace Graphics
34 namespace Tizen { namespace Content
37 class _VideoMetadataImpl;
40 * @class VideoMetadata
41 * @brief This class provides methods to access the video metadata.
45 * The %VideoMetadata class provides methods to access the video metadata that contains video content-specific attributes.
47 * The following example demonstrates how to use the %VideoMetadata class.
51 * MyClass::TestVideoMetadata(void)
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.");
58 * pVideoMeta->GetWidth();
61 * pVideoMeta->GetHeight();
64 * pVideoMeta->GetDuration();
72 class _OSP_EXPORT_ VideoMetadata
73 : virtual public Tizen::Base::Object
77 * This is the default constructor for this class.
84 * Copying of objects using this copy constructor is allowed.
88 * @param[in] rhs An instance of %VideoMetadata
90 VideoMetadata(const VideoMetadata& rhs);
93 * This destructor overrides Tizen::Base::Object::~Object().
97 virtual ~VideoMetadata(void);
106 int GetWidth(void) const;
115 int GetHeight(void) const;
122 * @return The duration in milliseconds
124 long GetDuration(void) const;
127 * Gets the frame rate.
131 * @return The frame rate
133 int GetFramerate(void) const;
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().
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.
149 int GetBitrate(void) const;
152 * Gets the audio bit rate.
156 * @return The audio bit rate in bits per second (bps)
158 int GetAudioBitrate(void) const;
161 * Gets the video bit rate.
165 * @return The video bit rate in bits per second (bps)
167 int GetVideoBitrate(void) const;
176 Tizen::Base::String GetGenre(void) const;
179 * Gets the comment of the video file.
183 * @return The comment of the video file
185 Tizen::Base::String GetComment(void) const;
188 * Gets the description of the video file.
192 * @return The description of the video file
194 Tizen::Base::String GetDescription(void) const;
197 * Gets the album art of the video.
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.
207 Tizen::Graphics::Bitmap* GetAlbumArtN(void) const;
210 * Compares the equality of values between two %VideoMetadata objects by overriding the Tizen::Base::Object::Equals() method.
214 * @return @c true if all the fields in the objects are equal, @n
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.
219 virtual bool Equals(const Tizen::Base::Object& rhs) const;
222 * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
226 * @return The hash value of the current instance
228 virtual int GetHashCode(void) const;
231 * Copying of objects using this copy assignment operator is allowed.
235 * @return A reference to this instance
236 * @param[in] rhs An instance of %VideoMetadata
238 VideoMetadata& operator =(const VideoMetadata& rhs);
241 friend class _VideoMetadataImpl;
242 _VideoMetadataImpl* __pImpl;
244 }; // Class VideoMetadata
248 #endif // _FCNT_VIDEO_METADATA_H_