91 if (msgIn->isSelfMessage()) {
92 switch (msgIn->getKind()) {
94 EV_INFO <<
"enterSession" << endl;
96 EV_WARN <<
"Session already entered\n";
100 RTPCIEnterSession *ci =
new RTPCIEnterSession();
106 cMessage *msg =
new RTPControlMsg(
"Enter Session");
107 msg->setControlInfo(ci);
113 EV_INFO <<
"startTransmission" << endl;
115 EV_WARN <<
"Session already left\n";
118 RTPCISenderControl *ci =
new RTPCISenderControl();
121 cMessage *msg =
new RTPControlMsg(
"senderModuleControl(PLAY)");
122 msg->setControlInfo(ci);
131 EV_INFO <<
"stopTransmission" << endl;
133 EV_WARN <<
"Session already left\n";
136 RTPCISenderControl *ci =
new RTPCISenderControl();
139 cMessage *msg =
new RTPControlMsg(
"senderModuleControl(STOP)");
140 msg->setControlInfo(ci);
146 EV_INFO <<
"leaveSession" << endl;
148 EV_WARN <<
"Session already left\n";
151 RTPCILeaveSession *ci =
new RTPCILeaveSession();
152 cMessage *msg =
new RTPControlMsg(
"Leave Session");
153 msg->setControlInfo(ci);
159 throw cRuntimeError(
"Invalid msgKind value %d in message '%s'",
160 msgIn->getKind(), msgIn->getName());
164 cObject *obj = msgIn->removeControlInfo();
165 RTPControlInfo *ci =
dynamic_cast<RTPControlInfo *
>(obj);
167 switch (ci->getType()) {
169 EV_INFO <<
"Session Entered" << endl;
170 ssrc = (check_and_cast<RTPCISessionEntered *>(ci))->getSsrc();
172 EV_INFO <<
"CreateSenderModule" << endl;
173 RTPCICreateSenderModule *ci =
new RTPCICreateSenderModule();
177 cMessage *msg =
new RTPControlMsg(
"createSenderModule()");
178 msg->setControlInfo(ci);
182 cMessage *selfMsg =
new cMessage(
"leaveSession",
LEAVE_SESSION);
183 EV_INFO <<
"Receiver Module : leaveSession" << endl;
190 EV_INFO <<
"Sender Module Created" << endl;
198 RTPCISenderStatus *rsim = check_and_cast<RTPCISenderStatus *>(ci);
199 switch (rsim->getStatus()) {
201 EV_INFO <<
"PLAYING" << endl;
205 EV_INFO <<
"FINISHED" << endl;
211 EV_INFO <<
"STOPPED" << endl;
217 throw cRuntimeError(
"Invalid sender status: %d", rsim->getStatus());
224 EV_WARN <<
"Session already left\n";
230 EV_INFO <<
"Sender Module Deleted" << endl;
Definition: RTPInterfacePacket_m.h:72
int bandwidth
Definition: RTPApplication.h:40
const char * fileName
Definition: RTPApplication.h:37
Definition: RTPInterfacePacket_m.h:78
Definition: RTPSenderControlMessage_m.h:72
Definition: RTPApplication.h:32
Definition: RTPSenderStatusMessage_m.h:62
const char * profileName
Definition: RTPApplication.h:39
simtime_t sessionLeaveDelay
Definition: RTPApplication.h:46
simtime_t transmissionStartDelay
Definition: RTPApplication.h:44
Definition: RTPInterfacePacket_m.h:80
Definition: RTPSenderStatusMessage_m.h:61
bool isActiveSession
Definition: RTPApplication.h:51
const char * commonName
Definition: RTPApplication.h:38
Definition: RTPApplication.h:31
int payloadType
Definition: RTPApplication.h:42
simtime_t transmissionStopDelay
Definition: RTPApplication.h:45
Definition: RTPApplication.h:33
Definition: RTPInterfacePacket_m.h:76
Definition: RTPInterfacePacket_m.h:74
Definition: RTPApplication.h:30
Definition: RTPSenderStatusMessage_m.h:60
IPv4Address destinationAddress
Definition: RTPApplication.h:49
Definition: RTPSenderControlMessage_m.h:76
int port
Definition: RTPApplication.h:41
uint32 ssrc
Definition: RTPApplication.h:50