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/
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to