Utilise new MergeSym feature to no longer overwrite the source .DEF file when buildin...
[openh323.git] / include / rtp2wav.h
blobae130cd9fee92d4b0fe7c87d3603f106dc299681
1 /*
2 * rfc28rtp2wav33.h
4 * Open Phone Abstraction Library (OPAL)
5 * Formally known as the Open H323 project.
7 * Copyright (c) 2001 Equivalence Pty. Ltd.
9 * The contents of this file are subject to the Mozilla Public License
10 * Version 1.0 (the "License"); you may not use this file except in
11 * compliance with the License. You may obtain a copy of the License at
12 * http://www.mozilla.org/MPL/
14 * Software distributed under the License is distributed on an "AS IS"
15 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
16 * the License for the specific language governing rights and limitations
17 * under the License.
19 * The Original Code is Open Phone Abstraction Library.
21 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23 * Contributor(s): ______________________________________.
25 * $Log$
26 * Revision 1.4 2003/01/07 07:53:00 craigs
27 * Fixed problem with multi-frame G.723.1 packets
29 * Revision 1.3 2002/09/16 01:14:15 robertj
30 * Added #define so can select if #pragma interface/implementation is used on
31 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
33 * Revision 1.2 2002/05/23 04:22:29 robertj
34 * Fixed problem with detecting correct payload type. Must
35 * wait for first non-empty packet.
36 * Added virtual function so can override record start point.
38 * Revision 1.1 2002/05/21 02:42:58 robertj
39 * Added class to allow for saving of RTP data to a WAV file.
43 #ifndef __RTP_RTP2WAV_H
44 #define __RTP_RTP2WAV_H
46 #ifdef P_USE_PRAGMA
47 #pragma interface
48 #endif
51 #include <ptclib/pwavfile.h>
52 #include "rtp.h"
55 ///////////////////////////////////////////////////////////////////////////////
57 /**This class encapsulates a WAV file that can be used to intercept RTP data
58 in the standard H323RTPChannel class.
60 class OpalRtpToWavFile : public PWAVFile
62 PCLASSINFO(OpalRtpToWavFile, PWAVFile);
63 public:
64 OpalRtpToWavFile();
65 OpalRtpToWavFile(
66 const PString & filename
69 virtual BOOL OnFirstPacket(RTP_DataFrame & frame);
71 const PNotifier & GetReceiveHandler() const { return receiveHandler; }
73 protected:
74 PDECLARE_NOTIFIER(RTP_DataFrame, OpalRtpToWavFile, ReceivedPacket);
76 PNotifier receiveHandler;
77 RTP_DataFrame::PayloadTypes payloadType;
78 PBYTEArray lastFrame;
79 PINDEX lastPayloadSize;
83 #endif // __RTP_RTP2WAV_H
86 /////////////////////////////////////////////////////////////////////////////