Closed Bug 1344614 Opened 3 years ago Closed 3 years ago

Improve GMP clock from second to millisecond precision

Categories

(Core :: Audio/Video: GMP, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The clock that GMP currently exposes to CDMs has second precision:

https://dxr.mozilla.org/mozilla-central/rev/8d026c60151005ad942e3d4389318fe28a0c8c54/dom/media/gmp/GMPPlatform.cpp#223

However the clock the Chromium exposes to CDMs has microsecond precision:

https://cs.chromium.org/chromium/src/media/cdm/cdm_adapter.cc?l=733&rcl=9a71b6540c7dce7068c4abe0317e740f504986fc
https://cs.chromium.org/chromium/src/base/time/time.cc?l=160&rcl=9a71b6540c7dce7068c4abe0317e740f504986fc

We have Chromium's base::Time in our source tree, so we should use that so that the clock we provide Widevine is as close to what Chrome provides it.

I'm not aware of this causing issues, AFAICT Widevine doesn't need super high precision timers, so we can let this ride the trains.
Comment on attachment 8843828 [details]
Bug 1344614 - Improve GMP clock precision to match Chromium's CDM clock.

https://reviewboard.mozilla.org/r/117430/#review119058
Attachment #8843828 - Flags: review?(jwwang) → review+
Pushed by cpearce@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e5cb10f268e5
Improve GMP clock precision to match Chromium's CDM clock. r=jwwang
https://hg.mozilla.org/mozilla-central/rev/e5cb10f268e5
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.