Bug 1428719 - Adjust decrypt throttle to smooth out decrypt bursting when seeking. r=gerald

We've had reports from a partner that their EME content is failing after a
seek. This is caused by decrypting EME content too fast after a seek triggering
bug 1338924. So we need to make our decryption less "bursty". So adjust our
decrypt throttling to instead throttle the decrypt to 200ms of content every
100ms of wall-clock-time, rather than 2s of content every 1s of
wall-clock-time. This makes us decode more smoothly, and appears to resolve the
issue with the partner stream.

MozReview-Commit-ID: 1nNuTJrreN

--HG--
extra : rebase_source : 3c2c9529a5493b30db1214bba782243be509b56a
This commit is contained in:
Chris Pearce 2018-01-19 14:55:12 +13:00
Родитель 636a2a5a8f
Коммит 4c1eb3b8bf
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -35,8 +35,8 @@ public:
// We should only have one decrypt request being processed at once.
MOZ_RELEASE_ASSERT(!mThrottleScheduler.IsScheduled());
const TimeDuration WindowSize = TimeDuration::FromSeconds(1.0);
const TimeDuration MaxThroughput = TimeDuration::FromSeconds(2.0);
const TimeDuration WindowSize = TimeDuration::FromSeconds(0.1);
const TimeDuration MaxThroughput = TimeDuration::FromSeconds(0.2);
// Forget decrypts that happened before the start of our window.
const TimeStamp now = TimeStamp::Now();