Open Bug 1245019 Opened 4 years ago Updated 3 years ago

Replace use of int64_t for microseconds by TimeUnit whenever possible


(Core :: Audio/Video: Playback, defect, P3)




Tracking Status
firefox47 --- affected


(Reporter: jya, Assigned: jya)




(4 files)

This bug is to track the replacement of int64_t that is used thorough the media code by TimeUnit objects.

Uploaded the WIP patches I have. I tried to keep each self-contained to aid reviewing. This means that there are places where TimeUnit -> uint64_t -> TimeUnit happens, or TimeUnit -> uint64_t. I have a list of notes of such things to clean up as I saw them, such as:
* WebM - SeekInternal - replace magic with TimeUnit
* WaveReader - Seek - replace magic with TimeUnit
* OggReader - SeekInternal - update to use TimeUnit
* SeekTarget - change mTime from int64 to TimeUnit
* mAudioSeekTimeUs - change to TimeUnit
* mediaData - mTime - change from int64_t to TimeUnit
* MaybeSetChannelStartTime - change TimeUnit
* DecodedAudioDataSink - replace mStartTime
* mCurrentTimeBeforeSeek MDSM.

I don't know any of these are useful. You mentioned that you didn't think all uint64_t should be changed to TimeUnit. Use of TimeUnit certainly helped make clear what units some calculations are in, especially code that converted between seconds, microseconds and nanoseconds.
Flags: needinfo?(jyavenard)
I've done SeekTarget ; overall comment, const SeekTarget& should probably be used whenever possible, prevent a construction + copy.

Can't use references however whenever InvokeAsync is involved.
Flags: needinfo?(jyavenard)
Mass change P2 -> P3
Priority: P2 → P3
Depends on: 1350266
Depends on: 1350790
Depends on: 1350791
Depends on: 1350811
Depends on: 1350813
Depends on: 1350814
Depends on: 1350815
Depends on: 1350819
Depends on: 1350826
Depends on: 1350832
Depends on: 1350837
Depends on: 1351160
Depends on: 1351203
Depends on: 1351574
Depends on: 1351586
Depends on: 1352319
Depends on: 1353607
Depends on: 1353644
Depends on: 1355740
Depends on: 1355745
Depends on: 1355756
Depends on: 1356502
Depends on: 1356506
Depends on: 1356530
Depends on: 1357983
Depends on: 1357986
Depends on: 1357987
Depends on: 1358969
Depends on: 1358972
Depends on: 1359715
You need to log in before you can comment on or make changes to this bug.