OPAL  Version 3.14.3
g711codec.h
Go to the documentation of this file.
1 /*
2  * g711codec.h
3  *
4  * Open Phone Abstraction Library (OPAL)
5  * Formally known as the Open H323 project.
6  *
7  * Copyright (c) 2001 Equivalence Pty. Ltd.
8  *
9  * The contents of this file are subject to the Mozilla Public License
10  * Version 1.0 (the "License"); you may not use this file except in
11  * compliance with the License. You may obtain a copy of the License at
12  * http://www.mozilla.org/MPL/
13  *
14  * Software distributed under the License is distributed on an "AS IS"
15  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
16  * the License for the specific language governing rights and limitations
17  * under the License.
18  *
19  * The Original Code is Open Phone Abstraction Library.
20  *
21  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
22  *
23  * Contributor(s): ______________________________________.
24  *
25  * $Revision: 29536 $
26  * $Author: rjongbloed $
27  * $Date: 2013-04-19 18:55:15 +1000 (Fri, 19 Apr 2013) $
28  */
29 
30 #ifndef OPAL_CODEC_G711CODEC_H
31 #define OPAL_CODEC_G711CODEC_H
32 
33 #ifdef P_USE_PRAGMA
34 #pragma interface
35 #endif
36 
37 #include <opal_config.h>
38 
39 #include <opal/transcoders.h>
40 #include <codec/g711a1_plc.h>
41 
42 
44 
46  public:
48 
49 #if OPAL_G711PLC
50  virtual PBoolean Convert(
51  const RTP_DataFrame & input,
52  RTP_DataFrame & output
53  );
54 
55  protected:
58 #endif
59 };
60 
61 
63 
65  public:
67  virtual int ConvertOne(int sample) const;
68  static int ConvertSample(int sample);
69 };
70 
71 
73 
75  public:
77  virtual int ConvertOne(int sample) const;
78  static int ConvertSample(int sample);
79 };
80 
81 
83 
85  public:
87  virtual int ConvertOne(int sample) const;
88  static int ConvertSample(int sample);
89 };
90 
91 
93 
95  public:
97  virtual int ConvertOne(int sample) const;
98  static int ConvertSample(int sample);
99 };
100 
101 
103 
104 #define OPAL_REGISTER_G711() \
105 OPAL_REGISTER_TRANSCODER(Opal_G711_uLaw_PCM, OpalG711_ULAW_64K, OpalPCM16); \
106 OPAL_REGISTER_TRANSCODER(Opal_PCM_G711_uLaw, OpalPCM16, OpalG711_ULAW_64K); \
107 OPAL_REGISTER_TRANSCODER(Opal_G711_ALaw_PCM, OpalG711_ALAW_64K, OpalPCM16); \
108 OPAL_REGISTER_TRANSCODER(Opal_PCM_G711_ALaw, OpalPCM16, OpalG711_ALAW_64K)
109 
110 #endif // OPAL_CODEC_G711CODEC_H
111 
112