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 FMediaAudioStreamInfo.h
20 * @brief This is the header file for the %AudioStreamInfo class.
22 * This header file contains the declarations of the %AudioStreamInfo class.
25 #ifndef _FMEDIA_AUDIO_STREAM_INFO_H_
26 #define _FMEDIA_AUDIO_STREAM_INFO_H_
28 #include <FBaseObject.h>
29 #include <FMediaAudioTypes.h>
30 #include <FMediaTypes.h>
32 namespace Tizen { namespace Media
35 * @class AudioStreamInfo
36 * @brief This class provides methods to get audio stream information.
40 * The %AudioStreamInfo class provides methods to get audio stream information, such as codec type, bit rate, sample rate, and channel count.
44 class _OSP_EXPORT_ AudioStreamInfo
45 : public Tizen::Base::Object
49 * This destructor overrides Tizen::Base::Object::~Object().
53 virtual ~AudioStreamInfo(void);
57 * Gets the encoding type of an audio stream.
61 * @return The value of the encoding type
64 CodecType GetCodecType(void) const;
67 * Gets the bit rate of an audio.
71 * @return The audio bit rate in bits per second (bps)
73 int GetBitRate(void) const;
76 * Gets the sampling rate of an audio.
80 * @return The audio sampling rate in Hertz (Hz)
82 int GetSampleRate(void) const;
85 * Gets the audio channel of an audio.
89 * @return The audio channel type
91 AudioChannelType GetChannelType(void) const;
94 * Copying of objects using this copy constructor is allowed.
98 * @return The copy of this instance
99 * @param[in] rhs An instance of %AudioStreamInfo
101 AudioStreamInfo(const AudioStreamInfo & rhs);
104 * Copying of objects using this copy assignment operator is allowed.
108 * @return The reference of this instance
109 * @param[in] rhs An instance of %AudioStreamInfo
111 AudioStreamInfo & operator =(const AudioStreamInfo & rhs);
114 * Compares the specified instance of Tizen::Base::Object with the calling instance of %AudioStreamInfo.
118 * @return @c true if the value of the specified instance equals the value of the current instance, @n
120 * @param[in] rhs The object to compare with the current instance
122 virtual bool Equals(const Tizen::Base::Object& rhs) const;
125 * Gets the hash value of the current instance.
129 * @return The hash value of the current instance
131 virtual int GetHashCode(void) const;
135 * This default constructor is intentionally declared as private so that only the platform can create an instance.
137 * @param [in] codecType The value of encoding type @n
138 * @param [in] bitrate The audio bit rate in bits per second (bps) @n
139 * @param [in] sampleRate The audio sample rate in Hertz (Hz) @n
140 * @param [in] channel The audio channel type @n
142 AudioStreamInfo(CodecType codecType, int bitrate, int sampleRate, AudioChannelType channel);
145 class _AudioStreamInfoImpl *__pAudioStreamInfoImpl;
146 friend class _PlayerImpl;