g711codec.h

Go to the documentation of this file.
00001 /*
00002  * g711codec.h
00003  *
00004  * Open Phone Abstraction Library (OPAL)
00005  * Formally known as the Open H323 project.
00006  *
00007  * Copyright (c) 2001 Equivalence Pty. Ltd.
00008  *
00009  * The contents of this file are subject to the Mozilla Public License
00010  * Version 1.0 (the "License"); you may not use this file except in
00011  * compliance with the License. You may obtain a copy of the License at
00012  * http://www.mozilla.org/MPL/
00013  *
00014  * Software distributed under the License is distributed on an "AS IS"
00015  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00016  * the License for the specific language governing rights and limitations
00017  * under the License.
00018  *
00019  * The Original Code is Open Phone Abstraction Library.
00020  *
00021  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
00022  *
00023  * Contributor(s): ______________________________________.
00024  *
00025  * $Revision: 19470 $
00026  * $Author: csoutheren $
00027  * $Date: 2008-02-12 04:31:25 +0000 (Tue, 12 Feb 2008) $
00028  */
00029 
00030 #ifndef __OPAL_G711CODEC_H
00031 #define __OPAL_G711CODEC_H
00032 
00033 #ifdef P_USE_PRAGMA
00034 #pragma interface
00035 #endif
00036 
00037 
00038 #include <opal/transcoders.h>
00039 
00040 
00042 
00043 class Opal_G711_uLaw_PCM : public OpalStreamedTranscoder {
00044   public:
00045     Opal_G711_uLaw_PCM();
00046     virtual int ConvertOne(int sample) const;
00047     static int ConvertSample(int sample);
00048 };
00049 
00050 
00052 
00053 class Opal_PCM_G711_uLaw : public OpalStreamedTranscoder {
00054   public:
00055     Opal_PCM_G711_uLaw();
00056     virtual int ConvertOne(int sample) const;
00057     static int ConvertSample(int sample);
00058 };
00059 
00060 
00062 
00063 class Opal_G711_ALaw_PCM : public OpalStreamedTranscoder {
00064   public:
00065     Opal_G711_ALaw_PCM();
00066     virtual int ConvertOne(int sample) const;
00067     static int ConvertSample(int sample);
00068 };
00069 
00070 
00072 
00073 class Opal_PCM_G711_ALaw : public OpalStreamedTranscoder {
00074   public:
00075     Opal_PCM_G711_ALaw();
00076     virtual int ConvertOne(int sample) const;
00077     static int ConvertSample(int sample);
00078 };
00079 
00080 
00082 
00083 #define OPAL_REGISTER_G711() \
00084 OPAL_REGISTER_TRANSCODER(Opal_G711_uLaw_PCM, OpalG711_ULAW_64K, OpalPCM16); \
00085 OPAL_REGISTER_TRANSCODER(Opal_PCM_G711_uLaw, OpalPCM16,         OpalG711_ULAW_64K); \
00086 OPAL_REGISTER_TRANSCODER(Opal_G711_ALaw_PCM, OpalG711_ALAW_64K, OpalPCM16); \
00087 OPAL_REGISTER_TRANSCODER(Opal_PCM_G711_ALaw, OpalPCM16,         OpalG711_ALAW_64K)
00088 
00089 #endif // __OPAL_G711CODEC_H
00090 
00091 

Generated on Fri Mar 7 07:36:07 2008 for OPAL by  doxygen 1.5.1