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.
19 * @file FMedia__AudioStreamInfoImplImpl.cpp
20 * @brief This file contains the implementation of subsystem's Player.
23 #include "FMedia_AudioStreamInfoImpl.h"
25 using namespace Tizen::Base;
27 namespace Tizen { namespace Media
30 _AudioStreamInfoImpl::_AudioStreamInfoImpl(CodecType codecType, int bitrate, int sampleRate, AudioChannelType channel)
32 __codecType = codecType;
34 __sampleRate = sampleRate;
38 _AudioStreamInfoImpl::~_AudioStreamInfoImpl()
43 _AudioStreamInfoImpl::_AudioStreamInfoImpl(const _AudioStreamInfoImpl& rhs)
45 __codecType = rhs.__codecType;
46 __bitrate = rhs.__bitrate;
47 __sampleRate = rhs.__sampleRate;
48 __channel = rhs.__channel;
52 _AudioStreamInfoImpl::operator =(const _AudioStreamInfoImpl& rhs)
54 // check for self-assignment
60 __codecType = rhs.__codecType;
61 __bitrate = rhs.__bitrate;
62 __sampleRate = rhs.__sampleRate;
63 __channel = rhs.__channel;
70 _AudioStreamInfoImpl::Equals(const Object& obj) const
72 const _AudioStreamInfoImpl* pAudioStreamInfoImpl = dynamic_cast <const _AudioStreamInfoImpl *> (&obj);
73 if (!pAudioStreamInfoImpl)
77 return (((__codecType == pAudioStreamInfoImpl->__codecType) && (__bitrate == pAudioStreamInfoImpl->__bitrate)
78 && (__sampleRate == pAudioStreamInfoImpl->__sampleRate) && (__channel == pAudioStreamInfoImpl->__channel )) ? true : false);
82 _AudioStreamInfoImpl::GetHashCode(void) const
84 return static_cast<int>(((__bitrate ^ __codecType) + (__sampleRate ^ __channel )));
88 _AudioStreamInfoImpl::GetCodecType() const
94 _AudioStreamInfoImpl::GetBitRate() const
100 _AudioStreamInfoImpl::GetSampleRate() const
106 _AudioStreamInfoImpl::GetChannelType() const