Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Issue 16823003: Replace erroneous use of base::Time with base::TimeTicks throughout media code. (Closed)

Created:
7 years, 6 months ago by miu
Modified:
7 years, 6 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Replace erroneous use of base::Time with base::TimeTicks throughout media code. This change corrects all the "low-hanging fruit," leaving the VideoCaptureDevice interface and MediaLog (?) as separate changes; as they are referenced throughout other components. Added a PRESUBMIT.py script for media/ code that will scan future code changes for use of base::Time (or base::Clock/DefaultClock) and prompt the developer with a warning explaining that clock skew is a serious and subtle source of bugs. Testing: Ran all media_unittests and content_unittests. Manually ran through demo sites that utilize all of the following (on all of Win/Mac/Linux): 1. HTML5 audio and video; 2. PPAPI Flash video; 3. WebAudio API; 4. WebRTC; 5. Tab Capture API. BUG=247881 TEST=media_unittests, content_unittests, manual confirmation of major media use cases Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=206206

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed Dale's nits. #

Patch Set 3 : s/PresubmitPromptWarning/PresubmitPromptOrNotify/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -101 lines) Patch
A media/PRESUBMIT.py View 1 2 1 chunk +62 lines, -0 lines 0 comments Download
M media/audio/audio_low_latency_input_output_unittest.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M media/audio/fake_audio_consumer.h View 1 chunk +1 line, -1 line 0 comments Download
M media/audio/fake_audio_consumer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M media/audio/fake_audio_consumer_unittest.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M media/audio/fake_audio_input_stream.h View 1 chunk +1 line, -1 line 0 comments Download
M media/audio/fake_audio_input_stream.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M media/audio/linux/alsa_input.h View 1 chunk +1 line, -1 line 0 comments Download
M media/audio/linux/alsa_input.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M media/audio/mac/audio_input_mac.h View 1 chunk +1 line, -1 line 0 comments Download
M media/audio/mac/audio_input_mac.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M media/audio/win/audio_low_latency_output_win_unittest.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M media/audio/win/audio_unified_win_unittest.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M media/base/android/media_source_player.h View 5 chunks +6 lines, -6 lines 0 comments Download
M media/base/android/media_source_player.cc View 10 chunks +11 lines, -11 lines 0 comments Download
M media/base/audio_renderer_mixer.h View 1 chunk +1 line, -1 line 0 comments Download
M media/base/audio_renderer_mixer.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M media/base/audio_renderer_mixer_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M media/base/clock.h View 4 chunks +15 lines, -12 lines 0 comments Download
M media/base/clock.cc View 4 chunks +7 lines, -6 lines 0 comments Download
M media/base/clock_unittest.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M media/base/pipeline.h View 3 chunks +4 lines, -4 lines 0 comments Download
M media/base/pipeline.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M media/base/pipeline_unittest.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M media/filters/audio_renderer_impl.h View 1 4 chunks +5 lines, -5 lines 0 comments Download
M media/filters/audio_renderer_impl.cc View 1 3 chunks +4 lines, -3 lines 0 comments Download
M media/filters/audio_renderer_impl_unittest.cc View 3 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
miu
Andrew/Dale, Please review everything. Should be a quick one since base::TimeTicks is pretty much a ...
7 years, 6 months ago (2013-06-12 22:24:53 UTC) #1
DaleCurtis
lgtm % nits. I defer to scherkus@ for the presubmit. I'd worry about false positives.. ...
7 years, 6 months ago (2013-06-13 00:23:31 UTC) #2
miu
https://codereview.chromium.org/16823003/diff/1/media/PRESUBMIT.py File media/PRESUBMIT.py (right): https://codereview.chromium.org/16823003/diff/1/media/PRESUBMIT.py#newcode1 media/PRESUBMIT.py:1: # Copyright (c) 2013 The Chromium Authors. All rights ...
7 years, 6 months ago (2013-06-13 01:42:08 UTC) #3
scherkus (not reviewing)
LGTM let's give the presubmit a shot -- if we find it's too slow / ...
7 years, 6 months ago (2013-06-13 01:47:47 UTC) #4
miu
Thanks for the review. Yep. I'm pretty sure false positives from the presubmit will be ...
7 years, 6 months ago (2013-06-13 02:28:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miu@chromium.org/16823003/8002
7 years, 6 months ago (2013-06-13 03:11:33 UTC) #6
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=8866
7 years, 6 months ago (2013-06-13 08:01:16 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miu@chromium.org/16823003/22001
7 years, 6 months ago (2013-06-13 19:30:51 UTC) #8
commit-bot: I haz the power
7 years, 6 months ago (2013-06-13 23:20:46 UTC) #9
Message was sent while issue was closed.
Change committed as 206206

Powered by Google App Engine
This is Rietveld 408576698