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

Issue 651243003: Remove MediaPlayerAndroid::IsSurfaceInUse() call (Closed)

Created:
6 years, 2 months ago by qinmin
Modified:
6 years, 2 months ago
Reviewers:
xhwang, gunsch
CC:
chromium-reviews, darin-cc_chromium.org, jam, avayvod+watch_chromium.org, feature-media-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove MediaPlayerAndroid::IsSurfaceInUse() call When tearing down a MediaSourcePlayer, the video codec could still be decoding. Therefore, we introduced IsSurfaceInUse() call to destroy the surface view after codec finishes decoding. However, this function doesn't really help due to 2 reasons: 1. Surface view can go away any time. For example, user click exitfullscreen button. So waiting for decoder to gracefully finish decoding is not applicable in many cases. 2. Waiting for decoder to finish before destroying the surface view might introduce the following racing issue: Video A tries to exit fullscreen, but pending decoder job deletion. Video B calls enter fullscreen, but since the surface is in use, it will fail to do so. video A exits fullscreen, but video B doesn't know that, and it will wait forever. This change removes the asynchronous behavior when ReleaseMediaResources() is called. This makes the code more easy to read and avoids the racing issue above. BUG=422158 Committed: https://crrev.com/5f39149e06b561f79625450c0aaf69be3c5fc95b Cr-Commit-Position: refs/heads/master@{#299556}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -22 lines) Patch
M content/browser/media/android/browser_media_player_manager.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M media/base/android/media_player_android.h View 1 chunk +0 lines, -3 lines 0 comments Download
M media/base/android/media_player_bridge.h View 2 chunks +0 lines, -4 lines 0 comments Download
M media/base/android/media_player_bridge.cc View 4 chunks +0 lines, -7 lines 0 comments Download
M media/base/android/media_source_player.h View 1 chunk +0 lines, -1 line 0 comments Download
M media/base/android/media_source_player.cc View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
qinmin
PTAL
6 years, 2 months ago (2014-10-14 20:21:35 UTC) #2
gunsch
On 2014/10/14 20:21:35, qinmin wrote: > PTAL lgtm
6 years, 2 months ago (2014-10-14 20:23:37 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/651243003/1
6 years, 2 months ago (2014-10-14 20:42:19 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
6 years, 2 months ago (2014-10-14 21:38:22 UTC) #6
commit-bot: I haz the power
6 years, 2 months ago (2014-10-14 21:51:30 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/5f39149e06b561f79625450c0aaf69be3c5fc95b
Cr-Commit-Position: refs/heads/master@{#299556}

Powered by Google App Engine
This is Rietveld 408576698