2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file FCntVideoMetadata.h
18 * @brief This is the header file for the %VideoMetadata class.
20 * This header file contains the declarations of the %VideoMetadata class.
23 #ifndef _FCNT_VIDEO_METADATA_H_
24 #define _FCNT_VIDEO_METADATA_H_
26 #include <FBaseObject.h>
28 namespace Tizen { namespace Graphics
33 namespace Tizen { namespace Content
36 class _VideoMetadataImpl;
39 * @class VideoMetadata
40 * @brief This class provides methods to access the video metadata.
44 * The %VideoMetadata class provides methods to access the video metadata that contains video content-specific
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 to copy
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().
144 * @return The bit rate in bits per second (bps)
146 * - There are two kinds of bit rates in a video file: audio and video.
147 * - The return value is the bit rate for the audio.
150 int GetBitrate(void) const;
153 * Gets the audio bit rate.
157 * @return The audio bit rate in bits per second (bps)
159 int GetAudioBitrate(void) const;
162 * Gets the video bit rate.
166 * @return The video bit rate in bits per second (bps)
168 int GetVideoBitrate(void) const;
177 Tizen::Base::String GetGenre(void) const;
180 * Gets the comment of the video file.
184 * @return The comment of the video file
186 Tizen::Base::String GetComment(void) const;
189 * Gets the description of the video file.
193 * @return The description of the video file
195 Tizen::Base::String GetDescription(void) const;
198 * Gets the album art of the video.
202 * @return A pointer to the album art
203 * @exception E_SUCCESS The method is successful.
204 * @exception E_DATA_NOT_FOUND The album art does not exist.
205 * @exception E_OUT_OF_MEMORY The memory is insufficient.
206 * @remarks The specific error code can be accessed using the GetLastResult() method.
208 Tizen::Graphics::Bitmap* GetAlbumArtN(void) const;
211 * Compares the equality of the values between two %VideoMetadata objects by overriding the
212 * Tizen::Base::Object::Equals() method.
216 * @return @c true if all the fields in the objects are equal, @n
218 * @param[in] rhs The Tizen::Base::Object with which the comparison is done @n
219 * An instance of Tizen::Graphics::Bitmap is not taken into account in
222 virtual bool Equals(const Tizen::Base::Object& rhs) const;
225 * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
229 * @return The hash value of the current instance
231 virtual int GetHashCode(void) const;
234 * Copying of objects using this copy assignment operator is allowed.
238 * @return A reference to this instance
239 * @param[in] rhs An instance of %VideoMetadata to copy
241 VideoMetadata& operator =(const VideoMetadata& rhs);
244 friend class _VideoMetadataImpl;
245 _VideoMetadataImpl* __pImpl;
247 }; // Class VideoMetadata
251 #endif // _FCNT_VIDEO_METADATA_H_