[Live-devel] simulate RTP packet loss
Andy Stevens
stevens at electricalscience.com
Wed Sep 5 12:24:31 PDT 2012
Hi all,
I would like to simulate packet loss of RTP packets on the network, and
I would like to use Live555 to do this. In fact, there already is some
code in MultiFramedRTPSink (in the
MultiFramedRTPSink::sendPacketIfNecessary() function) which is contained
in a "TEST_LOSS" macro, and is hardcoded to simulate 10% loss:
#ifdef TEST_LOSS
if ((our_random()%10) != 0) // simulate 10% packet loss #####
#endif
I would like to do some more sophisticated testing (e.g. change the
packet loss to 5% or 25%). What is the "right" way to do this? Ideally
I would subclass MultiFramedRTPSink and then override the
sendPacketIfNecessary() function. But sendPacketIfNecessary() is
declared as "private" and so I cannot override.
How best to simulate the packet loss without modifying the Live555 code
directly?
Regards,
--Andy Stevens
New York, USA
More information about the live-devel
mailing list