CAF state bug fix
[platform/framework/native/media.git] / src / FMedia_AudioStreamInfoImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file                        FMediaAudioStreamInfoImpl.h
20  * @brief                       This is the header file for the %AudioStreamInfoImpl class.
21  *
22  * This header file contains the declarations of the %AudioStreamInfoImpl class.
23  */
24
25 #ifndef _FMEDIA_INTERNAL_AUDIOSTREAMINFO_IMPL_H_
26 #define _FMEDIA_INTERNAL_AUDIOSTREAMINFO_IMPL_H_
27
28 #include <FBaseObject.h>
29 #include <FMediaAudioTypes.h>
30 #include <FMediaTypes.h>
31
32 namespace Tizen { namespace Media
33 {
34
35 class AudioStreamInfo;
36 //
37 // @class     AudioStreamInfoImpl
38 // @brief     This class provides the methods to get audio stream information.
39 //
40 // This class provides the methods to get audio stream information, such as codec type, bit rate, sample rate, and channel count.
41 //
42
43 class _AudioStreamInfoImpl
44         : public Tizen::Base::Object
45 {
46 public:
47         //
48         // This is the destructor for this class.
49         //
50         //
51         virtual ~_AudioStreamInfoImpl(void);
52
53 public:
54         //
55         //      Gets the encoding type of an audio stream.
56         //
57         //      @return         The value of the encoding type
58         //
59         //
60         CodecType GetCodecType(void) const;
61
62         //
63         //      Gets the bit rate of an audio.
64         //
65         //      @return             The audio bit rate in bits per second (bps)
66         //
67         int GetBitRate(void) const;
68
69         //
70         //      Gets the sampling rate of an audio.
71         //
72         //      @return             The audio sampling rate in hertz (Hz)
73         //
74         int GetSampleRate(void) const;
75
76         //
77         //      Gets the audio channel of an audio.
78         //
79         //      @return             The audio channel type
80         //
81         AudioChannelType GetChannelType(void) const;
82
83         //
84         // @see @ref Tizen::Media::AudioStreamInfo::Equals()
85         //
86         virtual bool Equals(const Object& obj) const;
87
88         //
89         // @see @ref Tizen::Media::AudioStreamInfo::GetHashCode()
90         //
91         virtual int GetHashCode(void) const;
92
93 private:
94         //
95         // Initializes this instance of AudioStreamInfo with the specified parameters.
96         //
97         // @param [in]  codecType       The value of encoding type @n
98         // @param [in]  bitrate         The audio bit rate in bits per second (bps) @n
99         // @param [in]  sampleRate      The audio sample rate in hertz (Hz) @n
100         // @param [in]  channel         The audio channel type @n
101         //
102         _AudioStreamInfoImpl(CodecType codecType, int bitrate, int sampleRate, AudioChannelType channel);
103
104
105         _AudioStreamInfoImpl(const _AudioStreamInfoImpl& rhs);
106         _AudioStreamInfoImpl& operator =(const _AudioStreamInfoImpl& rhs);
107
108 private:
109         CodecType __codecType;
110         int __bitrate;
111         int __sampleRate;
112         AudioChannelType __channel;
113         friend class AudioStreamInfo;
114 };
115
116 }}//Tizen::Media
117 #endif