OPAL  Version 3.18.8
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 
26 #ifndef OPAL_CODEC_G711CODEC_H
27 #define OPAL_CODEC_G711CODEC_H
28 
29 #ifdef P_USE_PRAGMA
30 #pragma interface
31 #endif
32 
33 #include <opal_config.h>
34 
35 #include <opal/transcoders.h>
36 #include <codec/g711a1_plc.h>
37 
38 
40 
42  public:
44 
45 #if OPAL_G711PLC
46  virtual PBoolean Convert(
47  const RTP_DataFrame & input,
48  RTP_DataFrame & output
49  );
50 
51  protected:
54 #endif
55 };
56 
57 
59 
61  public:
63  virtual int ConvertOne(int sample) const;
64  static int ConvertSample(int sample);
65 };
66 
67 
69 
71  public:
73  virtual int ConvertOne(int sample) const;
74  static int ConvertSample(int sample);
75 };
76 
77 
79 
81  public:
83  virtual int ConvertOne(int sample) const;
84  static int ConvertSample(int sample);
85 };
86 
87 
89 
91  public:
93  virtual int ConvertOne(int sample) const;
94  static int ConvertSample(int sample);
95 };
96 
97 
99 
100 #define OPAL_REGISTER_G711() \
101 OPAL_REGISTER_TRANSCODER(Opal_G711_uLaw_PCM, OpalG711_ULAW_64K, OpalPCM16); \
102 OPAL_REGISTER_TRANSCODER(Opal_PCM_G711_uLaw, OpalPCM16, OpalG711_ULAW_64K); \
103 OPAL_REGISTER_TRANSCODER(Opal_G711_ALaw_PCM, OpalG711_ALAW_64K, OpalPCM16); \
104 OPAL_REGISTER_TRANSCODER(Opal_PCM_G711_ALaw, OpalPCM16, OpalG711_ALAW_64K)
105 
106 #endif // OPAL_CODEC_G711CODEC_H
107 
108 
OpalG711_PLC plc
Definition: g711codec.h:52
Definition: g711a1_plc.h:42
PINDEX lastPayloadSize
Definition: g711codec.h:53
static int ConvertSample(int sample)
Definition: transcoders.h:469
Opal_G711_PCM(const OpalMediaFormat &inputMediaFormat)
virtual int ConvertOne(int sample) const
Definition: g711codec.h:90
Definition: rtp.h:540
Definition: mediafmt.h:806
virtual int ConvertOne(int sample) const
virtual int ConvertOne(int sample) const
OpalMediaFormat inputMediaFormat
Definition: transcoders.h:104
static int ConvertSample(int sample)
Definition: g711codec.h:60
Definition: g711codec.h:41
Definition: g711codec.h:80
virtual PBoolean Convert(const RTP_DataFrame &input, RTP_DataFrame &output)
static int ConvertSample(int sample)
virtual int ConvertOne(int sample) const
static int ConvertSample(int sample)
Definition: g711codec.h:70