[Live-devel] Packet Loss simulation

Ross Finlayson finlayson at live555.com
Sat Dec 19 18:44:49 PST 2009


>I am trying to simulate various levels of packet loss in the live555 
>streaming server ranging from 5-50% in steps of 5. The change has to 
>be done in MultiFramedRTPSource.cpp/MultiFramedRTPSink.cpp but it 
>uses (our_random() % 10) to generate 10% packet loss.
>
>This method does not work for values other than 10%. The other 
>possibility is to use fSeqNo instead of our_random.

Oh please.  To simulate N% packet loss (where N is an integer), just test for
	(our_random()%100) < N

If N = 10, this is
	(our_random()%100) < 10
which is equivalent to
	(our_random()%10) == 0

-- 

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


More information about the live-devel mailing list