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.cpp
19 * @brief This is the implementation file for the %VideoMetadata class.
21 * This file contains implementation of the %VideoMetadata class.
25 #include <FBaseSysLog.h>
26 #include <FCntVideoMetadata.h>
27 #include <FCnt_VideoMetadataImpl.h>
30 using namespace Tizen::Base;
31 using namespace Tizen::Graphics;
33 namespace Tizen { namespace Content
36 VideoMetadata::VideoMetadata(void)
38 , __pImpl(new (std::nothrow) _VideoMetadataImpl())
43 VideoMetadata::~VideoMetadata(void)
52 VideoMetadata::VideoMetadata(const VideoMetadata& rhs)
53 : Tizen::Base::Object()
54 , __pImpl(new (std::nothrow) _VideoMetadataImpl(*rhs.__pImpl))
60 VideoMetadata::operator =(const VideoMetadata& rhs)
62 // check for self-assignment
68 *__pImpl = *rhs.__pImpl;
74 VideoMetadata::GetHashCode(void) const
76 return __pImpl->GetHashCode();
80 VideoMetadata::Equals(const Object& rhs) const
82 const VideoMetadata* pRhs = dynamic_cast <const VideoMetadata*>(&rhs);
88 return __pImpl->Equals(*pRhs->__pImpl);
92 VideoMetadata::GetWidth(void) const
98 return __pImpl->GetWidth();
102 VideoMetadata::GetHeight(void) const
108 return __pImpl->GetHeight();
112 VideoMetadata::GetDuration(void) const
118 return __pImpl->GetDuration();
122 VideoMetadata::GetFramerate(void) const
128 return __pImpl->GetFramerate();
132 VideoMetadata::GetBitrate(void) const
138 return __pImpl->GetAudioBitrate();
142 VideoMetadata::GetAudioBitrate(void) const
148 return __pImpl->GetAudioBitrate();
152 VideoMetadata::GetVideoBitrate(void) const
158 return __pImpl->GetVideoBitrate();
162 VideoMetadata::GetGenre(void) const
168 return __pImpl->GetGenre();
172 VideoMetadata::GetAlbumArtN(void) const
175 result r = E_SUCCESS;
177 Bitmap* pBitmap = null;
178 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetAlbumArtN failed.");
180 pBitmap = __pImpl->GetAlbumArtN();
182 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetAlbumArtN failed.", GetErrorMessage(r));