[Live-devel] Simulate Packet loss

Ross Finlayson finlayson at live555.com
Tue Dec 9 18:17:43 PST 2008


>Hi Ross,
>in MultiFramedRTPSource.cpp there is:
>#ifdef TEST_LOSS
>     source->setPacketReorderingThresholdTime(0);
>        // don't wait for 'lost' packets to arrive out-of-order later
>     if ((our_random()%10) == 0) break; // simulate 10% packet loss
>#endif
>
>I do not understand what it means simulate 10% packet loss

What part of this code don't you understand?

This code, when enabled (note that by default, it's *not* enabled) 
randomly drops each packet, with probabilty 1/10.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list