#include <RTPPayloadReceiver.h>
Inheritance diagram for RTPPayloadReceiver:

Protected Member Functions | |
| virtual | ~RTPPayloadReceiver () |
| virtual void | initialize () |
| virtual void | handleMessage (cMessage *msg) |
| virtual void | processPacket (RTPPacket *packet) |
| virtual void | openOutputFile (const char *fileName) |
| virtual void | closeOutputFile () |
Protected Attributes | |
| std::ofstream | _outputFileStream |
| int | _payloadType |
| cOutVector * | _packetArrival |
|
|
Destructor. Disposes the queue object and closes the output file. 00032 {
00033 closeOutputFile();
00034 delete _packetArrival;
00035 };
|
|
|
Closes the output file stream. Reimplemented in RTPAVProfileSampleBasedAudioReceiver. 00069 {
00070 _outputFileStream.close();
00071 };
|
|
|
Method for handling incoming packets. At the moment only RTPInnerPackets containing an encapsulated RTPPacket are handled. 00045 {
00046 RTPInnerPacket *rinp = (RTPInnerPacket *)msg;
00047 if (rinp->type() == RTPInnerPacket::RTP_INP_DATA_IN) {
00048 RTPPacket *packet = (RTPPacket *)(rinp->decapsulate());
00049 processPacket(packet);
00050 delete rinp;
00051 }
00052 else {
00053 EV << "receiver module: RTPInnerPacket of wrong type received" << endl;
00054 delete rinp;
00055 }
00056 };
|
|
|
Initializes the receiver module, opens the output file and creates a queue for incoming packets. Subclasses must overwrite it (but should call this method too) Reimplemented in RTPAVProfilePayload10Receiver, and RTPAVProfilePayload32Receiver. 00038 {
00039 const char *fileName = par("outputFileName");
00040 openOutputFile(fileName);
00041 _packetArrival = new cOutVector("packet arrival");
00042 };
|
|
|
This method is called by initialize and opens the output file stream. For most payload receivers this method works well, only when using a library for a payload type which provides an own open method it must Reimplemented in RTPAVProfileSampleBasedAudioReceiver. 00064 {
00065 _outputFileStream.open(fileName);
00066 };
|
|
|
Writes contents of this RTPPacket into the output file. Must be overwritten by subclasses. Reimplemented in RTPAVProfilePayload32Receiver, and RTPAVProfileSampleBasedAudioReceiver. 00059 {
00060 _packetArrival->record((double)(packet->timeStamp()));
00061 };
|
|
|
The output file stream. |
|
|
An output vector used to store arrival of rtp data packets. |
|
|
The payload type this RTPPayloadReceiver module processes. |
1.4.1