Bug 190631 - [Media] Use nanoseconds as MaximumTimeScale
Summary: [Media] Use nanoseconds as MaximumTimeScale
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alicia Boya García
Keywords: InRadar
Depends on: 190691
  Show dependency treegraph
Reported: 2018-10-16 11:19 PDT by Alicia Boya García
Modified: 2018-10-18 19:49 PDT (History)
4 users (show)

See Also:

Patch (1.47 KB, patch)
2018-10-16 13:52 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff
Patch (4.99 KB, patch)
2018-10-17 21:26 PDT, Alicia Boya García
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alicia Boya García 2018-10-16 11:19:24 PDT
The current MediaTime::MaximumTimeScale is 0x7fffffff (2^31-1), which is quite undesirable: it's a prime number, so it does not accomodate *any* other timescale without rounding.

I propose to use 1e9 (nanosecond timescale) as maximum timescale: it's very close to 2^31 (a bit under 2^30 actually) and it's already being used by both Matroska (WebM) and GStreamer.
Comment 1 Jer Noble 2018-10-16 11:56:49 PDT
LGTM. The initial choice of maximum time scale was relatively arbitrary; it's less than 1/2 of the maximum possible value of a uint32_t.
Comment 2 Alicia Boya García 2018-10-16 13:52:10 PDT
Created attachment 352499 [details]
Comment 3 WebKit Commit Bot 2018-10-16 16:18:16 PDT
Comment on attachment 352499 [details]

Clearing flags on attachment: 352499

Committed r237208: <https://trac.webkit.org/changeset/237208>
Comment 4 WebKit Commit Bot 2018-10-16 16:18:17 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-10-16 16:19:22 PDT
Comment 7 Truitt Savell 2018-10-17 08:47:40 PDT
Linked wrong build.

Correct build:
Comment 8 Jer Noble 2018-10-17 09:22:42 PDT
Looks like these tests need rebaselining.
Comment 9 Truitt Savell 2018-10-17 13:53:45 PDT
Can this be fixed today?
Comment 10 WebKit Commit Bot 2018-10-17 15:51:19 PDT
Re-opened since this is blocked by bug 190691
Comment 11 Alicia Boya García 2018-10-17 17:18:47 PDT
Yes, the tests need a rebaseline indeed.
Comment 12 Alicia Boya García 2018-10-17 21:26:01 PDT
Created attachment 352683 [details]
Comment 13 WebKit Commit Bot 2018-10-18 19:49:05 PDT
Comment on attachment 352683 [details]

Clearing flags on attachment: 352683

Committed r237278: <https://trac.webkit.org/changeset/237278>
Comment 14 WebKit Commit Bot 2018-10-18 19:49:06 PDT
All reviewed patches have been landed.  Closing bug.