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.cpp
18 * @brief This is the implementation file for the %VideoMetadata class.
20 * This file contains implementation of the %VideoMetadata class.
23 #include <FBaseSysLog.h>
24 #include <FCntVideoMetadata.h>
25 #include <FCnt_VideoMetadataImpl.h>
27 using namespace Tizen::Base;
28 using namespace Tizen::Graphics;
30 namespace Tizen { namespace Content
33 VideoMetadata::VideoMetadata(void)
35 , __pImpl(new (std::nothrow) _VideoMetadataImpl())
40 VideoMetadata::~VideoMetadata(void)
49 VideoMetadata::VideoMetadata(const VideoMetadata& rhs)
50 : Tizen::Base::Object()
51 , __pImpl(new (std::nothrow) _VideoMetadataImpl(*rhs.__pImpl))
57 VideoMetadata::operator =(const VideoMetadata& rhs)
59 // check for self-assignment
65 *__pImpl = *rhs.__pImpl;
71 VideoMetadata::GetHashCode(void) const
73 return __pImpl->GetHashCode();
77 VideoMetadata::Equals(const Object& rhs) const
79 const VideoMetadata* pRhs = dynamic_cast <const VideoMetadata*>(&rhs);
85 return __pImpl->Equals(*pRhs->__pImpl);
89 VideoMetadata::GetWidth(void) const
95 return __pImpl->GetWidth();
99 VideoMetadata::GetHeight(void) const
105 return __pImpl->GetHeight();
109 VideoMetadata::GetDuration(void) const
115 return __pImpl->GetDuration();
119 VideoMetadata::GetFramerate(void) const
125 return __pImpl->GetFramerate();
129 VideoMetadata::GetBitrate(void) const
135 return __pImpl->GetAudioBitrate();
139 VideoMetadata::GetAudioBitrate(void) const
145 return __pImpl->GetAudioBitrate();
149 VideoMetadata::GetVideoBitrate(void) const
155 return __pImpl->GetVideoBitrate();
159 VideoMetadata::GetGenre(void) const
165 return __pImpl->GetGenre();
169 VideoMetadata::GetComment(void) const
175 return __pImpl->GetComment();
179 VideoMetadata::GetDescription(void) const
185 return __pImpl->GetDescription();
189 VideoMetadata::GetAlbumArtN(void) const
192 result r = E_SUCCESS;
194 Bitmap* pBitmap = null;
195 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetAlbumArtN failed.");
197 pBitmap = __pImpl->GetAlbumArtN();
199 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetAlbumArtN failed.", GetErrorMessage(r));