Note: We no longer publish the latest version of our code here. We primarily use a kumc-bmi github organization. The heron ETL repository, in particular, is not public. Peers in the informatics community should see MultiSiteDev for details on requesting access.

source: webrtc/webrtc/modules/audio_coding/neteq/test/NETEQTEST_CodecClass.h @ 0:4bda6873e34c

pub_scrub_3792 tip
Last change on this file since 0:4bda6873e34c was 0:4bda6873e34c, checked in by Michael Prittie <mprittie@…>, 6 years ago

Scrubbed password for publication.

File size: 8.4 KB
Line 
1/*
2 *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 *  Use of this source code is governed by a BSD-style license
5 *  that can be found in the LICENSE file in the root of the source
6 *  tree. An additional intellectual property rights grant can be found
7 *  in the file PATENTS.  All contributing project authors may
8 *  be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef NETEQTEST_CODECCLASS_H
12#define NETEQTEST_CODECCLASS_H
13
14#include <string>
15#include <string.h>
16
17#include "typedefs.h"
18#include "webrtc_neteq.h"
19#include "NETEQTEST_NetEQClass.h"
20
21class NETEQTEST_Decoder
22{
23public:
24    NETEQTEST_Decoder(enum WebRtcNetEQDecoder type, uint16_t fs, const char * name, uint8_t pt = 0);
25    virtual ~NETEQTEST_Decoder() {};
26
27    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) = 0;
28
29    int getName(char * name, int maxLen) const { strncpy( name, _name.c_str(), maxLen ); return 0;};
30
31    void setPT(uint8_t pt) { _pt = pt; };
32    uint16_t getFs() const { return (_fs); };
33    enum WebRtcNetEQDecoder getType() const { return (_decoderType); };
34    uint8_t getPT() const { return (_pt); };
35
36protected:
37    int loadToNetEQ(NETEQTEST_NetEQClass & neteq, WebRtcNetEQ_CodecDef & codecInst);
38
39    void * _decoder;
40    enum WebRtcNetEQDecoder _decoderType;
41    uint8_t _pt;
42    uint16_t _fs;
43    std::string _name;
44
45private:
46};
47
48
49class decoder_iSAC : public NETEQTEST_Decoder
50{
51public:
52    decoder_iSAC(uint8_t pt = 0);
53    virtual ~decoder_iSAC();
54    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
55};
56
57
58class decoder_iSACSWB : public NETEQTEST_Decoder
59{
60public:
61    decoder_iSACSWB(uint8_t pt = 0);
62    virtual ~decoder_iSACSWB();
63    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
64};
65
66
67class decoder_iSACFB : public NETEQTEST_Decoder {
68 public:
69  decoder_iSACFB(uint8_t pt = 0);
70  virtual ~decoder_iSACFB();
71  virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
72};
73
74
75class decoder_PCMU : public NETEQTEST_Decoder
76{
77public:
78    decoder_PCMU(uint8_t pt = 0);
79    virtual ~decoder_PCMU() {};
80    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
81};
82
83
84class decoder_PCMA : public NETEQTEST_Decoder
85{
86public:
87    decoder_PCMA(uint8_t pt = 0);
88    virtual ~decoder_PCMA() {};
89    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
90};
91
92class decoder_PCM16B_NB : public NETEQTEST_Decoder
93{
94public:
95    decoder_PCM16B_NB(uint8_t pt = 0) : NETEQTEST_Decoder(kDecoderPCM16B, 8000, "PCM16 nb", pt) {};
96    virtual ~decoder_PCM16B_NB() {};
97    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
98};
99class decoder_PCM16B_WB : public NETEQTEST_Decoder
100{
101public:
102    decoder_PCM16B_WB(uint8_t pt = 0) : NETEQTEST_Decoder(kDecoderPCM16Bwb, 16000, "PCM16 wb", pt) {};
103    virtual ~decoder_PCM16B_WB() {};
104    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
105};
106class decoder_PCM16B_SWB32 : public NETEQTEST_Decoder
107{
108public:
109    decoder_PCM16B_SWB32(uint8_t pt = 0) : NETEQTEST_Decoder(kDecoderPCM16Bswb32kHz, 32000, "PCM16 swb32", pt) {};
110    virtual ~decoder_PCM16B_SWB32() {};
111    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
112};
113
114class decoder_PCM16B_SWB48 : public NETEQTEST_Decoder
115{
116public:
117    decoder_PCM16B_SWB48(uint8_t pt = 0) : NETEQTEST_Decoder(kDecoderPCM16Bswb48kHz, 48000, "PCM16 swb48", pt) {};
118    virtual ~decoder_PCM16B_SWB48() {};
119    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
120};
121
122class decoder_ILBC : public NETEQTEST_Decoder
123{
124public:
125    decoder_ILBC(uint8_t pt = 0);
126    virtual ~decoder_ILBC();
127    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
128};
129
130
131class decoder_G729 : public NETEQTEST_Decoder
132{
133public:
134    decoder_G729(uint8_t pt = 0);
135    virtual ~decoder_G729();
136    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
137};
138
139class decoder_G729_1 : public NETEQTEST_Decoder
140{
141public:
142    decoder_G729_1(uint8_t pt = 0);
143    virtual ~decoder_G729_1();
144    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
145};
146
147
148class decoder_G722 : public NETEQTEST_Decoder
149{
150public:
151    decoder_G722(uint8_t pt = 0);
152    virtual ~decoder_G722();
153    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
154};
155
156
157class decoder_G722_1_16 : public NETEQTEST_Decoder
158{
159public:
160    decoder_G722_1_16(uint8_t pt = 0);
161    virtual ~decoder_G722_1_16();
162    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
163};
164
165class decoder_G722_1_24 : public NETEQTEST_Decoder
166{
167public:
168    decoder_G722_1_24(uint8_t pt = 0);
169    virtual ~decoder_G722_1_24();
170    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
171};
172
173class decoder_G722_1_32 : public NETEQTEST_Decoder
174{
175public:
176    decoder_G722_1_32(uint8_t pt = 0);
177    virtual ~decoder_G722_1_32();
178    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
179};
180
181
182class decoder_G722_1C_24 : public NETEQTEST_Decoder
183{
184public:
185    decoder_G722_1C_24(uint8_t pt = 0);
186    virtual ~decoder_G722_1C_24();
187    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
188};
189
190class decoder_G722_1C_32 : public NETEQTEST_Decoder
191{
192public:
193    decoder_G722_1C_32(uint8_t pt = 0);
194    virtual ~decoder_G722_1C_32();
195    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
196};
197
198class decoder_G722_1C_48 : public NETEQTEST_Decoder
199{
200public:
201    decoder_G722_1C_48(uint8_t pt = 0);
202    virtual ~decoder_G722_1C_48();
203    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
204};
205
206
207class decoder_AMR : public NETEQTEST_Decoder
208{
209public:
210    decoder_AMR(uint8_t pt = 0);
211    virtual ~decoder_AMR();
212    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
213};
214
215class decoder_AMRWB : public NETEQTEST_Decoder
216{
217public:
218    decoder_AMRWB(uint8_t pt = 0);
219    virtual ~decoder_AMRWB();
220    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
221};
222
223class decoder_GSMFR : public NETEQTEST_Decoder
224{
225public:
226    decoder_GSMFR(uint8_t pt = 0);
227    virtual ~decoder_GSMFR();
228    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
229};
230
231class decoder_G726 : public NETEQTEST_Decoder
232{
233public:
234    //virtual decoder_G726(uint8_t pt = 0) = 0;
235    decoder_G726(enum WebRtcNetEQDecoder type, const char * name, uint8_t pt = 0);
236    virtual ~decoder_G726();
237    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) = 0;
238};
239
240class decoder_G726_16 : public decoder_G726
241{
242public:
243    decoder_G726_16(uint8_t pt = 0) : decoder_G726(kDecoderG726_16, "G.726 (16 kbps)", pt) {};
244    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
245};
246
247class decoder_G726_24 : public decoder_G726
248{
249public:
250    decoder_G726_24(uint8_t pt = 0) : decoder_G726(kDecoderG726_24, "G.726 (24 kbps)", pt) {};
251    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
252};
253
254class decoder_G726_32 : public decoder_G726
255{
256public:
257    decoder_G726_32(uint8_t pt = 0) : decoder_G726(kDecoderG726_32, "G.726 (32 kbps)", pt) {};
258    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
259};
260
261class decoder_G726_40 : public decoder_G726
262{
263public:
264    decoder_G726_40(uint8_t pt = 0) : decoder_G726(kDecoderG726_40, "G.726 (40 kbps)", pt) {};
265    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
266};
267
268class decoder_SPEEX : public NETEQTEST_Decoder
269{
270public:
271    decoder_SPEEX(uint8_t pt = 0, uint16_t fs = 8000);
272    virtual ~decoder_SPEEX();
273    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
274};
275
276class decoder_CELT : public NETEQTEST_Decoder
277{
278public:
279    decoder_CELT(uint8_t pt = 0, uint16_t fs = 32000);
280    virtual ~decoder_CELT();
281    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
282};
283class decoder_CELTslave : public NETEQTEST_Decoder
284{
285public:
286    decoder_CELTslave(uint8_t pt = 0, uint16_t fs = 32000);
287    virtual ~decoder_CELTslave();
288    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
289};
290
291class decoder_RED : public NETEQTEST_Decoder
292{
293public:
294    decoder_RED(uint8_t pt = 0) : NETEQTEST_Decoder(kDecoderRED, 8000, "RED", pt) {};
295    virtual ~decoder_RED() {};
296    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
297};
298
299class decoder_AVT : public NETEQTEST_Decoder
300{
301public:
302    decoder_AVT(uint8_t pt = 0) : NETEQTEST_Decoder(kDecoderAVT, 8000, "AVT", pt) {};
303    virtual ~decoder_AVT() {};
304    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
305};
306
307
308class decoder_CNG : public NETEQTEST_Decoder
309{
310public:
311    decoder_CNG(uint8_t pt = 0, uint16_t fs = 8000);
312    virtual ~decoder_CNG();
313    virtual int loadToNetEQ(NETEQTEST_NetEQClass & neteq) OVERRIDE;
314};
315
316#endif //NETEQTEST_CODECCLASS_H
Note: See TracBrowser for help on using the repository browser.