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 * #include <FContent.h>
52 * #include <FSystem.h>
54 * using namespace Tizen::Content;
57 * MyClass::TestVideoMetadata(void)
59 * Tizen::Base::String contentPath = Tizen::System::Environment::GetMediaPath() + L"Videos/video.mp4";
60 * VideoMetadata* pVideoMeta = ContentManagerUtil::GetVideoMetaN(contentPath);
61 * result r = GetLastResult();
63 * pVideoMeta->GetWidth();
64 * pVideoMeta->GetHeight();
65 * pVideoMeta->GetDuration();
73 class _OSP_EXPORT_ VideoMetadata
74 : virtual public Tizen::Base::Object
78 * This is the default constructor for this class.
85 * Copying of objects using this copy constructor is allowed.
89 * @param[in] rhs An instance of %VideoMetadata to copy
91 VideoMetadata(const VideoMetadata& rhs);
94 * This destructor overrides Tizen::Base::Object::~Object().
98 virtual ~VideoMetadata(void);
107 int GetWidth(void) const;
116 int GetHeight(void) const;
123 * @return The duration in milliseconds
125 long GetDuration(void) const;
128 * Gets the frame rate.
132 * @return The frame rate
134 int GetFramerate(void) const;
140 * @brief <i> [Deprecated] </i>
141 * @deprecated This method is deprecated because a new method has been added. @n
142 * Instead of using this method, use GetAudioBitrate() or GetVideoBitrate().
145 * @return The bit rate in bits per second (bps)
147 * - There are two kinds of bit rates in a video file: audio and video.
148 * - The return value is the bit rate for the audio.
151 int GetBitrate(void) const;
154 * Gets the audio bit rate.
158 * @return The audio bit rate in bits per second (bps)
160 int GetAudioBitrate(void) const;
163 * Gets the video bit rate.
167 * @return The video bit rate in bits per second (bps)
169 int GetVideoBitrate(void) const;
178 Tizen::Base::String GetGenre(void) const;
181 * Gets the comment of the video file.
185 * @return The comment of the video file
187 Tizen::Base::String GetComment(void) const;
190 * Gets the description of the video file.
194 * @return The description of the video file
196 Tizen::Base::String GetDescription(void) const;
199 * Gets the album art of the video.
203 * @return A pointer to the album art
204 * @exception E_SUCCESS The method is successful.
205 * @exception E_DATA_NOT_FOUND The album art does not exist.
206 * @exception E_OUT_OF_MEMORY The memory is insufficient.
207 * @remarks The specific error code can be accessed using the GetLastResult() method.
209 Tizen::Graphics::Bitmap* GetAlbumArtN(void) const;
212 * Compares the equality of the values between two %VideoMetadata objects by overriding the
213 * Tizen::Base::Object::Equals() method.
217 * @return @c true if all the fields in the objects are equal, @n
219 * @param[in] rhs The Tizen::Base::Object with which the comparison is done @n
220 * An instance of Tizen::Graphics::Bitmap is not taken into account in
223 virtual bool Equals(const Tizen::Base::Object& rhs) const;
226 * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
230 * @return The hash value of the current instance
232 virtual int GetHashCode(void) const;
235 * Copying of objects using this copy assignment operator is allowed.
239 * @return A reference to this instance
240 * @param[in] rhs An instance of %VideoMetadata to copy
242 VideoMetadata& operator =(const VideoMetadata& rhs);
245 friend class _VideoMetadataImpl;
246 _VideoMetadataImpl* __pImpl;
248 }; // Class VideoMetadata
252 #endif // _FCNT_VIDEO_METADATA_H_