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