00001 /*************************************************************************** 00002 RTPAVProfileSampleBasedAudioReceiver.h - description 00003 ------------------- 00004 begin : Fri Sep 13 2002 00005 copyright : (C) 2002 by Matthias Oppitz 00006 email : matthias.oppitz@gmx.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00022 #ifndef __RTPAVPROFILESAMPLEBASEDAUDIORECEIVER_H__ 00023 #define __RTPAVPROFILESAMPLEBASEDAUDIORECEIVER_H__ 00024 00025 #include <audiofile.h> 00026 #include "omnetpp.h" 00027 #include "RTPPayloadReceiver.h" 00028 00029 00034 class RTPAVProfileSampleBasedAudioReceiver : public RTPPayloadReceiver { 00035 00036 Module_Class_Members(RTPAVProfileSampleBasedAudioReceiver, RTPPayloadReceiver, 0) 00037 00038 virtual ~RTPAVProfileSampleBasedAudioReceiver(); 00039 00040 protected: 00041 AFfilehandle _audioFile; 00042 AFfilesetup _fileSetup; 00043 int _samplingRate, _sampleWidth, _numberOfChannels; 00044 00045 virtual void processPacket(RTPPacket *packet); 00046 00047 virtual void openOutputFile(const char *fileName); 00048 virtual void closeOutputFile(); 00049 00055 virtual void insertSilence(simtime_t duration); 00056 00057 }; 00058 00059 #endif