sipxmedialib  Version 3.3
MpCodecInfo.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2011 SIPez LLC. All rights reserved.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2009 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 
15 #ifndef _MpCodecInfo_h_
16 #define _MpCodecInfo_h_
17 
18 // SYSTEM INCLUDES
19 // APPLICATION INCLUDES
20 #include "mp/codecs/PlgDefsV1.h"
21 #include <utl/UtlString.h>
22 
23 // DEFINES
24 // MACROS
25 // EXTERNAL FUNCTIONS
26 // EXTERNAL VARIABLES
27 // CONSTANTS
28 // STRUCTS
29 // TYPEDEFS
30 // FORWARD DECLARATIONS
31 
36 {
37 /* //////////////////////////// PUBLIC //////////////////////////////////// */
38 public:
39 
40 /* ============================ CREATORS ================================== */
42 
43 
45  inline MpCodecInfo(const MppCodecInfoV1_1 &codecInfo,
46  const MppCodecFmtpInfoV1_2 &fmtpInfo);
47 
49  inline MpCodecInfo(const MppCodecInfoV1_1 &codecInfo);
50 
52 
53 /* ============================ MANIPULATORS ============================== */
55 
56 
58 
59 /* ============================ ACCESSORS ================================= */
61 
62 
64  inline const char* getCodecManufacturer() const;
66  inline const char* getCodecName() const;
68  inline const char* getCodecVersion() const;
70  inline unsigned getCodecType() const;
71 
73  inline const char* getMimeSubtype() const;
75  inline unsigned getFmtpsNum() const;
77  inline const char** getFmtps() const;
79  inline unsigned getSampleRate() const;
81  inline unsigned getNumChannels() const;
83  inline unsigned getFramePacking() const;
84 
86  inline unsigned getMinBitrate() const;
88  inline unsigned getMaxBitrate() const;
90  inline unsigned getNumSamplesPerFrame() const;
92  inline unsigned getMinFrameBytes() const;
94  inline unsigned getMaxFrameBytes() const;
96  inline unsigned getAlgorithmicDelay() const;
97 
99 
100 /* ============================ INQUIRY =================================== */
102 
103 
105  inline UtlBoolean isSignalingCodec(void) const;
107  inline UtlBoolean doesVadCng(void) const;
109  inline UtlBoolean haveInternalPLC() const;
110  inline UtlBoolean shouldSetMarker() const;
111 
113 
114 /* //////////////////////////// PROTECTED ///////////////////////////////// */
115 protected:
116 
117 /* //////////////////////////// PRIVATE /////////////////////////////////// */
118 private:
119 };
120 
121 /* ============================ INLINE METHODS ============================ */
122 
124  const MppCodecFmtpInfoV1_2 &fmtpInfo)
125 : MppCodecInfoV1_1(codecInfo)
126 , MppCodecFmtpInfoV1_2(fmtpInfo)
127 {
128 }
129 
131 : MppCodecInfoV1_1(codecInfo)
132 {
133 }
134 
135 /* ============================ MANIPULATORS ============================== */
136 
137 /* ============================ ACCESSORS ================================= */
138 
140 {
141  return codecManufacturer;
142 }
143 
144 const char* MpCodecInfo::getCodecName() const
145 {
146  return codecName;
147 }
148 
149 const char* MpCodecInfo::getCodecVersion() const
150 {
151  return codecVersion;
152 }
153 
155 {
156  return codecType;
157 }
158 
159 
160 const char* MpCodecInfo::getMimeSubtype() const
161 {
162  return mimeSubtype;
163 }
164 
165 unsigned MpCodecInfo::getFmtpsNum() const
166 {
167  return fmtpsNum;
168 }
169 
170 const char** MpCodecInfo::getFmtps() const
171 {
172  return fmtps;
173 }
174 
176 {
177  return sampleRate;
178 }
179 
181 {
182  return numChannels;
183 }
184 
186 {
187  return framePacking;
188 }
189 
190 
192 {
193  return minBitrate;
194 }
195 
197 {
198  return maxBitrate;
199 }
200 
202 {
203  return numSamplesPerFrame;
204 }
205 
207 {
208  return minFrameBytes;
209 }
210 
212 {
213  return maxFrameBytes;
214 }
215 
217 {
218  return algorithmicDelay;
219 }
220 
221 /* ============================ INQUIRY =================================== */
222 
224 {
225  return signalingCodec;
226 }
227 UtlBoolean MpCodecInfo::doesVadCng() const
228 {
229  return vadCng == CODEC_CNG_INTERNAL;
230 }
232 {
234 }
235 
237 {
238  return(mSetMarker);
239 }
240 
241 #endif // _MpCodecInfo_h_
unsigned getCodecType() const
See CODEC_TYPE_* defines above.
Definition: MpCodecInfo.h:154
const char * getCodecName() const
Codec name (human readable).
Definition: MpCodecInfo.h:144
unsigned getMinFrameBytes() const
Definition: MpCodecInfo.h:206
unsigned maxBitrate
Maximum bit rate for this codec (in bits per second).
Definition: PlgDefsV1.h:209
const char * getCodecVersion() const
Codec version (human readable).
Definition: MpCodecInfo.h:149
unsigned fmtpsNum
Definition: PlgDefsV1.h:186
unsigned minBitrate
Minimum bit rate for this codec (in bits per second).
Definition: PlgDefsV1.h:208
unsigned numChannels
Definition: PlgDefsV1.h:193
unsigned sampleRate
Definition: PlgDefsV1.h:190
unsigned getNumChannels() const
Definition: MpCodecInfo.h:180
unsigned numSamplesPerFrame
Definition: PlgDefsV1.h:210
const char * getCodecManufacturer() const
< characters and underscores.
Definition: MpCodecInfo.h:139
unsigned algorithmicDelay
Definition: PlgDefsV1.h:221
unsigned vadCng
See CODEC_CNG_* for details.
Definition: PlgDefsV1.h:220
unsigned getAlgorithmicDelay() const
Definition: MpCodecInfo.h:216
const char ** getFmtps() const
Definition: MpCodecInfo.h:170
unsigned getNumSamplesPerFrame() const
Definition: MpCodecInfo.h:201
UtlBoolean isSignalingCodec(void) const
TRUE if codec could carry DTMF tones, FALSE otherwise.
Definition: MpCodecInfo.h:223
unsigned getSampleRate() const
Definition: MpCodecInfo.h:175
unsigned getFramePacking() const
See CODEC_FRAME_PACKING_* for details.
Definition: MpCodecInfo.h:185
unsigned getMinBitrate() const
Minimum bit rate for this codec (in bits per second).
Definition: MpCodecInfo.h:191
MpCodecInfo(const MppCodecInfoV1_1 &codecInfo, const MppCodecFmtpInfoV1_2 &fmtpInfo)
Full constructor.
Definition: MpCodecInfo.h:123
unsigned codecType
See CODEC_TYPE_* defines above.
Definition: PlgDefsV1.h:180
#define CODEC_PLC_INTERNAL
Codec have internal PLC.
Definition: PlgDefsV1.h:66
const char * codecManufacturer
< characters and underscores.
Definition: PlgDefsV1.h:177
Static information describing a codec.
Definition: MpCodecInfo.h:35
const char * codecVersion
Codec version (human readable).
Definition: PlgDefsV1.h:179
unsigned maxFrameBytes
Definition: PlgDefsV1.h:217
unsigned getMaxFrameBytes() const
Definition: MpCodecInfo.h:211
const char * mimeSubtype
MIME subtype.
Definition: PlgDefsV1.h:185
unsigned getMaxBitrate() const
Maximum bit rate for this codec (in bits per second).
Definition: MpCodecInfo.h:196
unsigned getFmtpsNum() const
Definition: MpCodecInfo.h:165
unsigned packetLossConcealment
See CODEC_PLC_* for details.
Definition: PlgDefsV1.h:219
UtlBoolean haveInternalPLC() const
Definition: MpCodecInfo.h:231
const char * codecName
Codec name (human readable).
Definition: PlgDefsV1.h:178
unsigned minFrameBytes
Definition: PlgDefsV1.h:215
const char ** fmtps
Definition: PlgDefsV1.h:188
unsigned signalingCodec
TRUE if codec could carry DTMF tones, FALSE otherwise.
Definition: PlgDefsV1.h:206
Information about concrete codec instance (i.e. with selected fmtp).
Definition: PlgDefsV1.h:202
UtlBoolean shouldSetMarker() const
Definition: MpCodecInfo.h:236
UtlBoolean doesVadCng(void) const
Definition: MpCodecInfo.h:227
unsigned framePacking
See CODEC_FRAME_PACKING_* for details.
Definition: PlgDefsV1.h:195
int mSetMarker
Definition: PlgDefsV1.h:225
const char * getMimeSubtype() const
MIME subtype.
Definition: MpCodecInfo.h:160
#define CODEC_CNG_INTERNAL
Codec have internal PLC.
Definition: PlgDefsV1.h:74
Generic information about codec.
Definition: PlgDefsV1.h:169