D:/Storage/CVS_Head/h323plus/include/rtp2wav.h

00001 /*
00002  * rfc28rtp2wav33.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: rtp2wav.h,v $
00026  * Revision 1.1  2007/08/06 20:50:50  shorne
00027  * First commit of h323plus
00028  *
00029  * Revision 1.4  2003/01/07 07:53:00  craigs
00030  * Fixed problem with multi-frame G.723.1 packets
00031  *
00032  * Revision 1.3  2002/09/16 01:14:15  robertj
00033  * Added #define so can select if #pragma interface/implementation is used on
00034  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00035  *
00036  * Revision 1.2  2002/05/23 04:22:29  robertj
00037  * Fixed problem with detecting correct payload type. Must
00038  *   wait for first non-empty packet.
00039  * Added virtual function so can override record start point.
00040  *
00041  * Revision 1.1  2002/05/21 02:42:58  robertj
00042  * Added class to allow for saving of RTP data to a WAV file.
00043  *
00044  */
00045 
00046 #ifndef __RTP_RTP2WAV_H
00047 #define __RTP_RTP2WAV_H
00048 
00049 #ifdef P_USE_PRAGMA
00050 #pragma interface
00051 #endif
00052 
00053 
00054 #include <ptclib/pwavfile.h>
00055 #include "rtp.h"
00056 
00057 
00059 
00063 class OpalRtpToWavFile : public PWAVFile
00064 {
00065     PCLASSINFO(OpalRtpToWavFile, PWAVFile);
00066   public:
00067     OpalRtpToWavFile();
00068     OpalRtpToWavFile(
00069       const PString & filename
00070     );
00071 
00072     virtual BOOL OnFirstPacket(RTP_DataFrame & frame);
00073 
00074     const PNotifier & GetReceiveHandler() const { return receiveHandler; }
00075 
00076   protected:
00077     PDECLARE_NOTIFIER(RTP_DataFrame, OpalRtpToWavFile, ReceivedPacket);
00078 
00079     PNotifier                   receiveHandler;
00080     RTP_DataFrame::PayloadTypes payloadType;
00081     PBYTEArray                  lastFrame;
00082     PINDEX                      lastPayloadSize;
00083 };
00084 
00085 
00086 #endif // __RTP_RTP2WAV_H
00087 
00088 

Generated on Thu Oct 25 13:42:37 2007 for h323plus by  doxygen 1.5.2