00001 /*************************************************************************** 00002 RTPPayloadReceiver.h - description 00003 ------------------- 00004 begin : Fri Nov 2 2001 00005 copyright : (C) 2001 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 00018 00023 #ifndef __RTPPAYLOADRECEIVER_H__ 00024 #define __RTPPAYLOADRECEIVER_H__ 00025 00026 00027 #include <fstream.h> 00028 #include "omnetpp.h" 00029 #include "RTPPacket.h" 00030 00031 00036 class RTPPayloadReceiver : public cSimpleModule { 00037 00038 Module_Class_Members(RTPPayloadReceiver, cSimpleModule, 0); 00039 00043 virtual ~RTPPayloadReceiver(); 00044 00051 virtual void initialize(); 00052 00057 virtual void handleMessage(cMessage *msg); 00058 00059 protected: 00060 00064 ofstream _outputFileStream; 00065 00069 int _payloadType; 00070 00074 cOutVector *_packetArrival; 00075 00080 virtual void processPacket(RTPPacket *packet); 00081 00088 virtual void openOutputFile(const char *fileName); 00089 00093 virtual void closeOutputFile(); 00094 }; 00095 00096 #endif