g729codec.h

Go to the documentation of this file.
00001 /*
00002  * g729codec.h
00003  *
00004  * H.323 interface for G.729A codec
00005  *
00006  * Open H323 Library
00007  *
00008  * Copyright (c) 2001 Equivalence Pty. Ltd.
00009  *
00010  * The contents of this file are subject to the Mozilla Public License
00011  * Version 1.0 (the "License"); you may not use this file except in
00012  * compliance with the License. You may obtain a copy of the License at
00013  * http://www.mozilla.org/MPL/
00014  *
00015  * Software distributed under the License is distributed on an "AS IS"
00016  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00017  * the License for the specific language governing rights and limitations
00018  * under the License.
00019  *
00020  * The Original Code is Open H323 Library.
00021  *
00022  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
00023  *
00024  * Portions of this code were written with the assisance of funding from
00025  * Vovida Networks, Inc. http://www.vovida.com.
00026  *
00027  * Contributor(s): ______________________________________.
00028  *
00029  * $Log: g729codec.h,v $
00030  * Revision 2.9  2005/08/28 07:59:17  rjongbloed
00031  * Converted OpalTranscoder to use factory, requiring sme changes in making sure
00032  *   OpalMediaFormat instances are initialised before use.
00033  *
00034  * Revision 2.8  2004/02/23 01:32:06  rjongbloed
00035  * Removed duplicate #if for if voice age included and made sure there was a
00036  *   dummy G729 declaration macro if no G.729 included.
00037  *
00038  * Revision 2.7  2004/02/19 10:46:43  rjongbloed
00039  * Merged OpenH323 version 1.13.1 changes.
00040  *
00041  * Revision 2.6  2003/06/02 04:04:54  rjongbloed
00042  * Changed to use new autoconf system
00043  *
00044  * Revision 2.5  2003/01/07 04:39:52  robertj
00045  * Updated to OpenH323 v1.11.2
00046  *
00047  * Revision 2.4  2002/11/10 11:33:16  robertj
00048  * Updated to OpenH323 v1.10.3
00049  *
00050  * Revision 2.3  2002/09/16 02:52:33  robertj
00051  * Added #define so can select if #pragma interface/implementation is used on
00052  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00053  *
00054  * Revision 2.2  2002/09/04 06:01:46  robertj
00055  * Updated to OpenH323 v1.9.6
00056  *
00057  * Revision 2.1  2002/07/01 04:56:29  robertj
00058  * Updated to OpenH323 v1.9.1
00059  *
00060  * Revision 1.7  2003/05/05 11:59:21  robertj
00061  * Changed to use autoconf style selection of options and subsystems.
00062  *
00063  * Revision 1.6  2002/11/12 00:06:10  robertj
00064  * Added check for Voice Age G.729 only being able to do a single instance
00065  *   of the encoder and decoder. Now fails the second isntance isntead of
00066  *   interfering with the first one.
00067  *
00068  * Revision 1.5  2002/09/16 01:14:15  robertj
00069  * Added #define so can select if #pragma interface/implementation is used on
00070  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00071  *
00072  * Revision 1.4  2002/09/03 06:19:36  robertj
00073  * Normalised the multi-include header prevention ifdef/define symbol.
00074  *
00075  * Revision 1.3  2002/08/05 10:03:47  robertj
00076  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00077  *
00078  * Revision 1.2  2002/06/27 03:08:31  robertj
00079  * Added G.729 capabilitity support even though is really G.729A.
00080  * Added code to include G.729 codecs on static linking.
00081  *
00082  * Revision 1.1  2001/09/21 02:54:47  robertj
00083  * Added new codec framework with no actual implementation.
00084  *
00085  */
00086 
00087 #ifndef __OPAL_G729CODEC_H
00088 #define __OPAL_G729CODEC_H
00089 
00090 #ifdef P_USE_PRAGMA
00091 #pragma interface
00092 #endif
00093 
00094 #include <opal/buildopts.h>
00095 
00096 #if VOICE_AGE_G729A
00097 
00098 #include <opal/transcoders.h>
00099 
00100 
00102 
00103 class Opal_G729_PCM : public OpalFramedTranscoder {
00104   public:
00105     Opal_G729_PCM();
00106     ~Opal_G729_PCM();
00107     virtual BOOL ConvertFrame(const BYTE * src, BYTE * dst);
00108 };
00109 
00110 typedef Opal_G729_PCM Opal_G729A_PCM;
00111 
00112 
00114 
00115 class Opal_PCM_G729 : public OpalFramedTranscoder {
00116   public:
00117     Opal_PCM_G729();
00118     ~Opal_PCM_G729();
00119     virtual BOOL ConvertFrame(const BYTE * src, BYTE * dst);
00120 };
00121 
00122 typedef Opal_PCM_G729 Opal_PCM_G729A;
00123 
00124 
00126 
00127 #define OPAL_REGISTER_G729() \
00128           OPAL_REGISTER_TRANSCODER(Opal_G729_PCM,  OpalG729,  OpalPCM16); \
00129           OPAL_REGISTER_TRANSCODER(Opal_PCM_G729,  OpalPCM16, OpalG729); \
00130           OPAL_REGISTER_TRANSCODER(Opal_G729A_PCM, OpalG729A, OpalPCM16); \
00131           OPAL_REGISTER_TRANSCODER(Opal_PCM_G729A, OpalPCM16, OpalG729A)
00132 
00133 
00134 #else // VOICE_AGE_G729A
00135 
00136 #define OPAL_REGISTER_G729()
00137 
00138 #endif // VOICE_AGE_G729A
00139 
00140 #endif // __OPAL_G729CODEC_H
00141 
00142 

Generated on Mon Sep 25 16:19:33 2006 for OPAL by  doxygen 1.4.7