|
INET Framework for OMNeT++/OMNEST
|
A "Realtime" VideoStream client application.
More...
#include <UdpVideoStreamClient.h>
A "Realtime" VideoStream client application.
Basic video stream application. Clients connect to server and get a stream of video back.
◆ UdpVideoStreamClient()
| inet::UdpVideoStreamClient::UdpVideoStreamClient |
( |
| ) |
|
|
inline |
◆ ~UdpVideoStreamClient()
| virtual inet::UdpVideoStreamClient::~UdpVideoStreamClient |
( |
| ) |
|
|
inlinevirtual |
◆ finish()
| void inet::UdpVideoStreamClient::finish |
( |
| ) |
|
|
overrideprotectedvirtual |
32 ApplicationBase::finish();
◆ handleCrashOperation()
◆ handleMessageWhenUp()
| void inet::UdpVideoStreamClient::handleMessageWhenUp |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
◆ handleStartOperation()
◆ handleStopOperation()
◆ initialize()
| void inet::UdpVideoStreamClient::initialize |
( |
int |
stage | ) |
|
|
overrideprotectedvirtual |
◆ numInitStages()
| virtual int inet::UdpVideoStreamClient::numInitStages |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ receiveStream()
| void inet::UdpVideoStreamClient::receiveStream |
( |
Packet * |
msg | ) |
|
|
protectedvirtual |
◆ requestStream()
| void inet::UdpVideoStreamClient::requestStream |
( |
| ) |
|
|
protectedvirtual |
64 int svrPort = par(
"serverPort");
65 int localPort = par(
"localPort");
66 const char *address = par(
"serverAddress");
67 L3Address svrAddr = L3AddressResolver().resolve(address);
69 if (svrAddr.isUnspecified()) {
70 EV_ERROR <<
"Server address is unspecified, skip sending video stream request\n";
74 EV_INFO <<
"Requesting video stream from " << svrAddr <<
":" << svrPort <<
"\n";
80 Packet *pk =
new Packet(
"VideoStrmReq");
81 const auto& payload = makeShared<ByteCountChunk>(
B(1));
82 pk->insertAtBack(payload);
Referenced by handleMessageWhenUp().
◆ socketClosed()
| void inet::UdpVideoStreamClient::socketClosed |
( |
UdpSocket * |
socket | ) |
|
|
overrideprotectedvirtual |
◆ socketDataArrived()
| void inet::UdpVideoStreamClient::socketDataArrived |
( |
UdpSocket * |
socket, |
|
|
Packet * |
packet |
|
) |
| |
|
overrideprotectedvirtual |
◆ socketErrorArrived()
| void inet::UdpVideoStreamClient::socketErrorArrived |
( |
UdpSocket * |
socket, |
|
|
Indication * |
indication |
|
) |
| |
|
overrideprotectedvirtual |
Notifies about error indication arrival, indication ownership is transferred to the callee.
Implements inet::UdpSocket::ICallback.
52 EV_WARN <<
"Ignoring UDP error report " << indication->getName() << endl;
◆ selfMsg
| cMessage* inet::UdpVideoStreamClient::selfMsg = nullptr |
|
protected |
◆ socket
The documentation for this class was generated from the following files:
void setOutputGate(cGate *toUdp)
Sets the gate on which to send to UDP.
Definition: UdpSocket.h:117
State operationalState
Definition: OperationalMixin.h:23
void bind(int localPort)
Bind the socket to a local port number.
Definition: UdpSocket.cc:34
void sendTo(Packet *msg, L3Address destAddr, int destPort)
Sends a data packet to the given address and port.
Definition: UdpSocket.cc:69
static std::string getReceivedPacketInfo(Packet *pk)
Utility function: returns a line of information about a packet received via UDP.
Definition: UdpSocket.cc:315
cModule * getContainingNode(const cModule *from)
Find the node containing the given module.
Definition: ModuleAccess.cc:40
virtual void initialize(int stage) override
Definition: OperationalMixinImpl.h:26
virtual void destroy() override
Notify the protocol that the owner of ISocket has destroyed the socket.
Definition: UdpSocket.cc:98
cMessage * selfMsg
Definition: UdpVideoStreamClient.h:31
void setCallback(ICallback *cb)
Sets a callback object, to be used with processMessage().
Definition: UdpSocket.cc:338
intscale< b, 1, 8 > B
Definition: Units.h:1168
simsignal_t packetReceivedSignal
Definition: Simsignals.cc:97
virtual void processMessage(cMessage *msg) override
Examines the message, takes ownership, and updates socket state.
Definition: UdpSocket.cc:343
virtual void requestStream()
Definition: UdpVideoStreamClient.cc:62
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
virtual void close() override
Unbinds the socket.
Definition: UdpSocket.cc:87
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
double max(const double a, const double b)
Returns the maximum of a and b.
Definition: SctpAssociation.h:266
UdpSocket socket
Definition: UdpVideoStreamClient.h:30
virtual void delayActiveOperationFinish(simtime_t timeout)
Definition: OperationalMixinImpl.h:161
virtual void startActiveOperationExtraTimeOrFinish(simtime_t extraTime)
Definition: OperationalMixinImpl.h:179
virtual void receiveStream(Packet *msg)
Definition: UdpVideoStreamClient.cc:86