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  * $Log: g711codec.h,v $
00026  * Revision 2.5  2005/08/28 07:59:17  rjongbloed
00027  * Converted OpalTranscoder to use factory, requiring sme changes in making sure
00028  *   OpalMediaFormat instances are initialised before use.
00029  *
00030  * Revision 2.4  2002/09/16 02:52:33  robertj
00031  * Added #define so can select if #pragma interface/implementation is used on
00032  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00033  *
00034  * Revision 2.3  2002/09/04 06:01:46  robertj
00035  * Updated to OpenH323 v1.9.6
00036  *
00037  * Revision 2.2  2002/03/15 03:07:25  robertj
00038  * Added static access to internal conversion functions.
00039  *
00040  * Revision 2.1  2001/08/01 05:03:26  robertj
00041  * Changes to allow control of linking software transcoders, use macros
00042  *   to force linking.
00043  *
00044  */
00045 
00046 #ifndef __OPAL_G711CODEC_H
00047 #define __OPAL_G711CODEC_H
00048 
00049 #ifdef P_USE_PRAGMA
00050 #pragma interface
00051 #endif
00052 
00053 
00054 #include <opal/transcoders.h>
00055 
00056 
00058 
00059 class Opal_G711_uLaw_PCM : public OpalStreamedTranscoder {
00060   public:
00061     Opal_G711_uLaw_PCM();
00062     virtual int ConvertOne(int sample) const;
00063     static int ConvertSample(int sample);
00064 };
00065 
00066 
00068 
00069 class Opal_PCM_G711_uLaw : public OpalStreamedTranscoder {
00070   public:
00071     Opal_PCM_G711_uLaw();
00072     virtual int ConvertOne(int sample) const;
00073     static int ConvertSample(int sample);
00074 };
00075 
00076 
00078 
00079 class Opal_G711_ALaw_PCM : public OpalStreamedTranscoder {
00080   public:
00081     Opal_G711_ALaw_PCM();
00082     virtual int ConvertOne(int sample) const;
00083     static int ConvertSample(int sample);
00084 };
00085 
00086 
00088 
00089 class Opal_PCM_G711_ALaw : public OpalStreamedTranscoder {
00090   public:
00091     Opal_PCM_G711_ALaw();
00092     virtual int ConvertOne(int sample) const;
00093     static int ConvertSample(int sample);
00094 };
00095 
00096 
00098 
00099 #define OPAL_REGISTER_G711() \
00100   OPAL_REGISTER_TRANSCODER(Opal_G711_uLaw_PCM, OpalG711_ULAW_64K, OpalPCM16); \
00101   OPAL_REGISTER_TRANSCODER(Opal_PCM_G711_uLaw, OpalPCM16,         OpalG711_ULAW_64K); \
00102   OPAL_REGISTER_TRANSCODER(Opal_G711_ALaw_PCM, OpalG711_ALAW_64K, OpalPCM16); \
00103   OPAL_REGISTER_TRANSCODER(Opal_PCM_G711_ALaw, OpalPCM16,         OpalG711_ALAW_64K)
00104 
00105 
00106 
00107 #endif // __OPAL_G711CODEC_H
00108 
00109 

Generated on Fri Mar 7 06:33:09 2008 for OPAL by  doxygen 1.5.1