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.
24 #include <FBaseSysLog.h>
25 #include <FCntVideoMetadata.h>
26 #include <FCnt_VideoMetadataImpl.h>
28 using namespace Tizen::Base;
29 using namespace Tizen::Graphics;
31 namespace Tizen { namespace Content
34 VideoMetadata::VideoMetadata(void)
36 , __pImpl(new (std::nothrow) _VideoMetadataImpl())
41 VideoMetadata::~VideoMetadata(void)
50 VideoMetadata::VideoMetadata(const VideoMetadata& rhs)
51 : Tizen::Base::Object()
52 , __pImpl(new (std::nothrow) _VideoMetadataImpl(*rhs.__pImpl))
58 VideoMetadata::operator =(const VideoMetadata& rhs)
60 // check for self-assignment
66 *__pImpl = *rhs.__pImpl;
72 VideoMetadata::GetHashCode(void) const
74 return __pImpl->GetHashCode();
78 VideoMetadata::Equals(const Object& rhs) const
80 const VideoMetadata* pRhs = dynamic_cast <const VideoMetadata*>(&rhs);
86 return __pImpl->Equals(*pRhs->__pImpl);
90 VideoMetadata::GetWidth(void) const
96 return __pImpl->GetWidth();
100 VideoMetadata::GetHeight(void) const
106 return __pImpl->GetHeight();
110 VideoMetadata::GetDuration(void) const
116 return __pImpl->GetDuration();
120 VideoMetadata::GetFramerate(void) const
126 return __pImpl->GetFramerate();
130 VideoMetadata::GetBitrate(void) const
136 return __pImpl->GetAudioBitrate();
140 VideoMetadata::GetAudioBitrate(void) const
146 return __pImpl->GetAudioBitrate();
150 VideoMetadata::GetVideoBitrate(void) const
156 return __pImpl->GetVideoBitrate();
160 VideoMetadata::GetGenre(void) const
166 return __pImpl->GetGenre();
170 VideoMetadata::GetComment(void) const
176 return __pImpl->GetComment();
180 VideoMetadata::GetDescription(void) const
186 return __pImpl->GetDescription();
190 VideoMetadata::GetAlbumArtN(void) const
193 result r = E_SUCCESS;
195 Bitmap* pBitmap = null;
196 SysTryReturn(NID_CNT, __pImpl != null, null, E_DATA_NOT_FOUND, "[E_DATA_NOT_FOUND] GetAlbumArtN failed.");
198 pBitmap = __pImpl->GetAlbumArtN();
200 SysTryReturn(NID_CNT, pBitmap != null, null, r, "[%s] GetAlbumArtN failed.", GetErrorMessage(r));