audiorecord.h

Go to the documentation of this file.
00001 /*
00002  * audiorecord.h
00003  *
00004  * OPAL audio record manager
00005  *
00006  * Open Phone Abstraction Library (OPAL)
00007  * Formally known as the Open H323 project.
00008  *
00009  * Copyright (C) 2007 Post Increment
00010  *
00011  * The contents of this file are subject to the Mozilla Public License
00012  * Version 1.0 (the "License"); you may not use this file except in
00013  * compliance with the License. You may obtain a copy of the License at
00014  * http://www.mozilla.org/MPL/
00015  *
00016  * Software distributed under the License is distributed on an "AS IS"
00017  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00018  * the License for the specific language governing rights and limitations
00019  * under the License.
00020  *
00021  * The Original Code is Open Phone Abstraction Library.
00022  *
00023  * The Initial Developer of the Original Code is Post Increment
00024  *
00025  * Contributor(s): ______________________________________.
00026  *
00027  * $Revision: 19279 $
00028  * $Author: rjongbloed $
00029  * $Date: 2008-01-17 04:08:34 +0000 (Thu, 17 Jan 2008) $
00030  */
00031 
00032 
00033 #ifndef _OPALAUDIORECORD_H
00034 #define _OPALAUDIORECORD_H
00035 
00037 //
00038 //  This class manages the recording of OPAL calls using the AudioMixer class
00039 //
00040 
00041 #include <opal/opalmixer.h>
00042 
00043 class OpalRecordManager
00044 {
00045   public:
00046     class Mixer_T : public OpalAudioMixer
00047     {
00048       protected:
00049         OpalWAVFile file;
00050         PBoolean mono;
00051         PBoolean started;
00052 
00053       public:
00054         Mixer_T();
00055         PBoolean Open(const PFilePath & fn);
00056         PBoolean Close();
00057         PBoolean OnWriteAudio(const MixerFrame & mixerFrame);
00058     };
00059 
00060     Mixer_T mixer;
00061 
00062   protected:
00063     PMutex mutex;
00064     PString token;
00065     PBoolean started;
00066 
00067   public:
00068     OpalRecordManager();
00069     PBoolean Open(const PString & _callToken, const PFilePath & fn);
00070     PBoolean CloseStream(const PString & _callToken, const std::string & _strm);
00071     PBoolean Close(const PString & _callToken);
00072     PBoolean WriteAudio(const PString & _callToken, const std::string & strm, const RTP_DataFrame & rtp);
00073 };
00074 
00075 
00076 #endif // _OPALAUDIOMIXER_H

Generated on Fri Mar 7 07:36:06 2008 for OPAL by  doxygen 1.5.1