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

Issue 2890603004: Freeze the reported media time while audio is restarted (Closed)

Created:
3 years, 7 months ago by servolk
Modified:
3 years, 7 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Freeze the reported media time while audio is restarted Audio renderer clock is used as a time source for the RendererImpl when we have an audio stream. But audio renderer clock gets recreated when switching audio streams, so we must avoid calling ARI::CurrentMediaTime while an audio renderer is being restarted. This fixes a crash in the media/avtrack/track-switching.html layout test. BUG=715191 Review-Url: https://codereview.chromium.org/2890603004 Cr-Commit-Position: refs/heads/master@{#474175} Committed: https://chromium.googlesource.com/chromium/src/+/9dd6cc8ed582ed45422be5c4a0dad00464d2639a

Patch Set 1 #

Patch Set 2 : Use std::atomic<bool> for restarting_audio_ #

Patch Set 3 : Use a lock for restarting_audio_ flag, instead of std::atomic #

Total comments: 2

Patch Set 4 : Use inline initialization for restarting_audio_time_ #

Total comments: 6

Patch Set 5 : Fixed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -2 lines) Patch
M media/renderers/renderer_impl.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M media/renderers/renderer_impl.cc View 1 2 3 4 3 chunks +17 lines, -2 lines 0 comments Download

Messages

Total messages: 55 (37 generated)
servolk
Previous discussion (with a bit more context) is in https://codereview.chromium.org/2837303003/
3 years, 7 months ago (2017-05-17 21:54:41 UTC) #14
DaleCurtis
std::atomic is banned. Also is it possible to get other calls into the VRI/ARI then ...
3 years, 7 months ago (2017-05-17 21:56:09 UTC) #15
servolk
On 2017/05/17 21:56:09, DaleCurtis_OOO_May_5_To_May23 wrote: > std::atomic is banned. Also is it possible to get ...
3 years, 7 months ago (2017-05-17 22:10:31 UTC) #16
DaleCurtis
check chromium-cxx@ it's listed as banned.
3 years, 7 months ago (2017-05-17 22:14:37 UTC) #17
servolk
On 2017/05/17 22:14:37, DaleCurtis_OOO_May_5_To_May23 wrote: > check chromium-cxx@ it's listed as banned. Would it be ...
3 years, 7 months ago (2017-05-17 22:27:50 UTC) #18
DaleCurtis
Anytime you start looking at base::subtle you're likely doing it wrong -- it's in "subtle" ...
3 years, 7 months ago (2017-05-17 22:31:54 UTC) #19
servolk
On 2017/05/17 22:31:54, DaleCurtis_OOO_May_5_To_May23 wrote: > Anytime you start looking at base::subtle you're likely doing ...
3 years, 7 months ago (2017-05-17 22:47:56 UTC) #20
DaleCurtis
On 2017/05/17 at 22:47:56, servolk wrote: > On 2017/05/17 22:31:54, DaleCurtis_OOO_May_5_To_May23 wrote: > > Anytime ...
3 years, 7 months ago (2017-05-17 23:02:59 UTC) #21
servolk
On 2017/05/17 23:02:59, DaleCurtis_OOO_May_5_To_May23 wrote: > On 2017/05/17 at 22:47:56, servolk wrote: > > On ...
3 years, 7 months ago (2017-05-19 01:38:28 UTC) #24
xhwang
On 2017/05/19 01:38:28, servolk wrote: > On 2017/05/17 23:02:59, DaleCurtis_OOO_May_5_To_May23 wrote: > > On 2017/05/17 ...
3 years, 7 months ago (2017-05-19 03:46:17 UTC) #25
servolk
On 2017/05/19 03:46:17, xhwang wrote: > On 2017/05/19 01:38:28, servolk wrote: > > On 2017/05/17 ...
3 years, 7 months ago (2017-05-20 00:31:26 UTC) #28
DaleCurtis
lgtm https://codereview.chromium.org/2890603004/diff/40001/media/renderers/renderer_impl.cc File media/renderers/renderer_impl.cc (right): https://codereview.chromium.org/2890603004/diff/40001/media/renderers/renderer_impl.cc#newcode97 media/renderers/renderer_impl.cc:97: restarting_audio_time_(kNoTimestamp), Can inline initialize this too?
3 years, 7 months ago (2017-05-23 23:35:53 UTC) #35
servolk
https://codereview.chromium.org/2890603004/diff/40001/media/renderers/renderer_impl.cc File media/renderers/renderer_impl.cc (right): https://codereview.chromium.org/2890603004/diff/40001/media/renderers/renderer_impl.cc#newcode97 media/renderers/renderer_impl.cc:97: restarting_audio_time_(kNoTimestamp), On 2017/05/23 23:35:53, DaleCurtis wrote: > Can inline ...
3 years, 7 months ago (2017-05-23 23:45:23 UTC) #37
xhwang
https://codereview.chromium.org/2890603004/diff/60001/media/renderers/renderer_impl.cc File media/renderers/renderer_impl.cc (right): https://codereview.chromium.org/2890603004/diff/60001/media/renderers/renderer_impl.cc#newcode271 media/renderers/renderer_impl.cc:271: } If time_source_->CurrentMediaTime() calls back into this class we ...
3 years, 7 months ago (2017-05-24 00:23:41 UTC) #39
servolk
https://codereview.chromium.org/2890603004/diff/60001/media/renderers/renderer_impl.cc File media/renderers/renderer_impl.cc (right): https://codereview.chromium.org/2890603004/diff/60001/media/renderers/renderer_impl.cc#newcode271 media/renderers/renderer_impl.cc:271: } On 2017/05/24 00:23:41, xhwang wrote: > If time_source_->CurrentMediaTime() ...
3 years, 7 months ago (2017-05-24 00:28:00 UTC) #40
xhwang
wow, that's quick LGTM!
3 years, 7 months ago (2017-05-24 00:32:48 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2890603004/80001
3 years, 7 months ago (2017-05-24 05:31:57 UTC) #52
commit-bot: I haz the power
3 years, 7 months ago (2017-05-24 05:39:23 UTC) #55
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/9dd6cc8ed582ed45422be5c4a0da...

Powered by Google App Engine
This is Rietveld 408576698