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

Issue 1993833002: Serialize usage of SurfaceView between AVDA instances. (Closed)

Created:
4 years, 7 months ago by liberato (no reviews please)
Modified:
4 years, 7 months ago
Reviewers:
watk, DaleCurtis
CC:
chromium-reviews, feature-media-reviews_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Serialize usage of SurfaceView between AVDA instances. If a new AVDA instance replaces the existing one, and both use the same SurfaceView (full screen), then there is a race between the old one forgetting about the SurfaceView and the new one starting to use it. This can happen, for example, if one changes the video element src= during playback. If the incoming AVDA tries to construct the MediaCodec before the outgoing AVDA's MediaCodec has disconnected from the SurfaceView, then the incoming AVDA can fail to MediaCodec::start() with IllegalArgumentException (undocumented, it looks like). This CL causes the incoming AVDA to wait until the outgoing AVDA completes cleanup if it will use the same SurfaceView. BUG=611502 Committed: https://crrev.com/59cd81d346a99198cdbaffca1aae9f3193b318fd Cr-Commit-Position: refs/heads/master@{#394577}

Patch Set 1 #

Patch Set 2 : comments. #

Total comments: 23

Patch Set 3 : cl feedback. #

Patch Set 4 : switched initializers. #

Total comments: 12

Patch Set 5 : cl feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -19 lines) Patch
M media/gpu/android_video_decode_accelerator.h View 1 2 3 4 4 chunks +15 lines, -5 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.cc View 1 2 3 4 12 chunks +106 lines, -14 lines 0 comments Download

Messages

Total messages: 18 (6 generated)
liberato (no reviews please)
surprisingly less code than i expected. -fl
4 years, 7 months ago (2016-05-18 17:46:53 UTC) #3
DaleCurtis
https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode259 media/gpu/android_video_decode_accelerator.cc:259: // Nobody has to wait for no surface. Move ...
4 years, 7 months ago (2016-05-18 17:59:11 UTC) #4
liberato (no reviews please)
https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode259 media/gpu/android_video_decode_accelerator.cc:259: // Nobody has to wait for no surface. On ...
4 years, 7 months ago (2016-05-18 18:49:39 UTC) #5
DaleCurtis
https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode272 media/gpu/android_video_decode_accelerator.cc:272: if (iter->second.waiter != nullptr) { On 2016/05/18 at 18:49:39, ...
4 years, 7 months ago (2016-05-18 18:55:49 UTC) #6
liberato (no reviews please)
https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode272 media/gpu/android_video_decode_accelerator.cc:272: if (iter->second.waiter != nullptr) { On 2016/05/18 18:55:49, DaleCurtis ...
4 years, 7 months ago (2016-05-18 19:51:18 UTC) #7
DaleCurtis
lgtm https://codereview.chromium.org/1993833002/diff/60001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1993833002/diff/60001/media/gpu/android_video_decode_accelerator.cc#newcode261 media/gpu/android_video_decode_accelerator.cc:261: SurfaceWaiterMap::iterator iter = surface_waiter_map_.find(surface_id); Can use auto here ...
4 years, 7 months ago (2016-05-18 19:58:48 UTC) #8
watk
lgtm with nits https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode252 media/gpu/android_video_decode_accelerator.cc:252: // |owner| would like to use ...
4 years, 7 months ago (2016-05-18 20:38:19 UTC) #9
liberato (no reviews please)
https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.cc#newcode252 media/gpu/android_video_decode_accelerator.cc:252: // |owner| would like to use |surface_id|. If it ...
4 years, 7 months ago (2016-05-18 21:13:14 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1993833002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1993833002/80001
4 years, 7 months ago (2016-05-18 21:14:02 UTC) #13
watk
https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.h File media/gpu/android_video_decode_accelerator.h (right): https://codereview.chromium.org/1993833002/diff/20001/media/gpu/android_video_decode_accelerator.h#newcode223 media/gpu/android_video_decode_accelerator.h:223: bool InitializeStrategy(); On 2016/05/18 21:13:13, liberato wrote: > On ...
4 years, 7 months ago (2016-05-18 21:21:14 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-18 22:34:10 UTC) #16
commit-bot: I haz the power
4 years, 7 months ago (2016-05-18 22:35:15 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/59cd81d346a99198cdbaffca1aae9f3193b318fd
Cr-Commit-Position: refs/heads/master@{#394577}

Powered by Google App Engine
This is Rietveld 408576698