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 #include "FMediaVideoStreamInfo.h"
19 #include "FMediaMediaStreamInfo.h"
20 #include "FMedia_VideoStreamInfoImpl.h"
21 #include <FBaseSysLog.h>
24 using namespace Tizen::Base;
25 using namespace Tizen::Base::Collection;
27 namespace Tizen { namespace Media
30 VideoStreamInfo::VideoStreamInfo(CodecType codecType, int width, int height, int bitrate, float frameRate)
32 __pVideoStreamInfoImpl = new (std::nothrow) _VideoStreamInfoImpl(codecType, width, height, bitrate, frameRate);
35 VideoStreamInfo::~VideoStreamInfo()
37 if (__pVideoStreamInfoImpl)
39 delete __pVideoStreamInfoImpl;
41 __pVideoStreamInfoImpl = null;
45 VideoStreamInfo::VideoStreamInfo(const VideoStreamInfo& rhs)
46 : Tizen::Base::Object()
47 , __pVideoStreamInfoImpl(new (std::nothrow) _VideoStreamInfoImpl(*rhs.__pVideoStreamInfoImpl))
52 VideoStreamInfo::operator =(const VideoStreamInfo& rhs)
58 *__pVideoStreamInfoImpl = *rhs.__pVideoStreamInfoImpl;
65 VideoStreamInfo::Equals(const Tizen::Base::Object& rhs) const
67 const VideoStreamInfo* pRhs = dynamic_cast <const VideoStreamInfo*>(&rhs);
73 return __pVideoStreamInfoImpl->Equals(*pRhs->__pVideoStreamInfoImpl);
77 VideoStreamInfo::GetHashCode(void) const
79 return __pVideoStreamInfoImpl->GetHashCode();
84 VideoStreamInfo::GetWidth() const
86 if (__pVideoStreamInfoImpl)
88 return __pVideoStreamInfoImpl->GetWidth();
97 VideoStreamInfo::GetHeight() const
99 if (__pVideoStreamInfoImpl)
101 return __pVideoStreamInfoImpl->GetHeight();
110 VideoStreamInfo::GetBitRate() const
112 if (__pVideoStreamInfoImpl)
114 return __pVideoStreamInfoImpl->GetBitRate();
123 VideoStreamInfo::GetCodecType() const
125 if (__pVideoStreamInfoImpl)
127 return __pVideoStreamInfoImpl->GetCodecType();
137 VideoStreamInfo::GetFrameRate() const
139 if (__pVideoStreamInfoImpl)
141 return __pVideoStreamInfoImpl->GetFrameRate();