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 attributes.
46 * The following example demonstrates how to use the %VideoMetadata class.
50 * MyClass::TestVideoMetadata(void)
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.");
57 * pVideoMeta->GetWidth();
60 * pVideoMeta->GetHeight();
63 * pVideoMeta->GetDuration();
71 class _OSP_EXPORT_ VideoMetadata
72 : virtual public Tizen::Base::Object
76 * This is the default constructor for this class.
83 * Copying of objects using this copy constructor is allowed.
87 * @param[in] rhs An instance of %VideoMetadata
89 VideoMetadata(const VideoMetadata& rhs);
92 * This destructor overrides Tizen::Base::Object::~Object().
96 virtual ~VideoMetadata(void);
105 int GetWidth(void) const;
114 int GetHeight(void) const;
121 * @return The duration in milliseconds
123 long GetDuration(void) const;
126 * Gets the frame rate.
130 * @return The frame rate
132 int GetFramerate(void) const;
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().
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.
148 int GetBitrate(void) const;
151 * Gets the audio bit rate.
155 * @return The audio bit rate in bits per second (bps)
157 int GetAudioBitrate(void) const;
160 * Gets the video bit rate.
164 * @return The video bit rate in bits per second (bps)
166 int GetVideoBitrate(void) const;
175 Tizen::Base::String GetGenre(void) const;
178 * Gets a comment of a video file.
182 * @return A comment of a video file
184 Tizen::Base::String GetComment(void) const;
187 * Gets the description of a video file.
191 * @return The description of a video file
193 Tizen::Base::String GetDescription(void) const;
196 * Gets the album art of a video.
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.
206 Tizen::Graphics::Bitmap* GetAlbumArtN(void) const;
209 * Compares the equality of values between two %VideoMetadata objects by overriding the Tizen::Base::Object::Equals() method.
213 * @return @c true if all the fields in the objects are equal, @n
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.
218 virtual bool Equals(const Tizen::Base::Object& rhs) const;
221 * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
225 * @return The hash value of the current instance
227 virtual int GetHashCode(void) const;
230 * Copying of objects using this copy assignment operator is allowed.
234 * @return A reference to this instance
235 * @param[in] rhs An instance of %VideoMetadata
237 VideoMetadata& operator =(const VideoMetadata& rhs);
240 friend class _VideoMetadataImpl;
241 _VideoMetadataImpl* __pImpl;
243 }; // Class VideoMetadata
247 #endif // _FCNT_VIDEO_METADATA_H_