2 Commits

Author SHA1 Message Date
tommi
ae695e95a6 Refactor RtpSender and SSRCDatabase.
* SSRCDatabase doesn't need to be a global instance, so I've changed it to be a "regular" class (i.e. construct via ctor, not maybe via GetSSRCDatabase( + release via ReturnSSRCDatabase())).  If we ever have parallel tests running in the same process, they won't have the problem of using the same ssrc database.

* Made RtpSender a more const.  Also added some todos for myself and holmer to look into clarifying the threading model.

* Switched from CriticalSectionWrapper to rtc::CriticalSection

* Changed the random seeding to use TickTime::Now().Ticks() since TimeInMicroseconds() could return 0 when the process was starting.  This is what TimeInMicroseconds() does anyway but now we don't need to access a global clock object.

BUG=webrtc:3062

Review URL: https://codereview.webrtc.org/1623543002

Cr-Commit-Position: refs/heads/master@{#11462}
2016-02-02 16:34:16 +00:00
terelius
84e78f9102 Rewrote the PRNG using an xorshift* algorithm and moved the files from test/ to base/.
Created a simple unit test for the new random number generator. (It mostly tests
that the generated numbers are consistent with the intended distribution, e.g. uniform.
It is not a comprehensive test of the quality of the random numbers.)

Several assertions in OveruseDetectorTest seem to depend on the exact sequence of random numbers. I updated those numbers to work with the new PRNG.

Compute the standard deviation of the expected result in TestReorderFilter instead of passing an uncertainty parameter.

BUG=webrtc:5177

Review URL: https://codereview.webrtc.org/1457023002

Cr-Commit-Position: refs/heads/master@{#10965}
2015-12-10 09:51:02 +00:00