зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1344614 - Improve GMP clock precision to match Chromium's CDM clock. r=jwwang
The clock that GMP currently exposes to CDMs has second precision. Whereas the clock that Chromium exposes to CDMs has microsecond precision. We should use the same clock as Chromium does (since we have its code in our tree already) so that our CDM harness is as compatible to Chromium as possible. MozReview-Commit-ID: FssZZFg4vhn --HG-- extra : rebase_source : 8fab078ba0ecf351a9a8147d3f7434d40a2e0a25
This commit is contained in:
Родитель
c7acd67123
Коммит
076bd77329
|
@ -10,6 +10,7 @@
|
|||
#include "GMPChild.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "base/thread.h"
|
||||
#include "base/time.h"
|
||||
#include "mozilla/ReentrantMonitor.h"
|
||||
|
||||
#include <ctime>
|
||||
|
@ -220,8 +221,11 @@ SetTimerOnMainThread(GMPTask* aTask, int64_t aTimeoutMS)
|
|||
GMPErr
|
||||
GetClock(GMPTimestamp* aOutTime)
|
||||
{
|
||||
*aOutTime = time(0) * 1000;
|
||||
return GMPNoErr;
|
||||
if (!aOutTime) {
|
||||
return GMPGenericErr;
|
||||
}
|
||||
*aOutTime = base::Time::Now().ToDoubleT() * 1000.0;
|
||||
return GMPNoErr;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче