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

Issue 1372203002: Throttle media decoding after excessive Android media server crashes (Closed)

Created:
5 years, 2 months ago by qinmin
Modified:
5 years, 2 months ago
CC:
avayvod+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, liberato (no reviews please), mcasas+watch_chromium.org, mlamouri+watch-media_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

Throttle media decoding after excessive Android media server crashes This change adds a watch dog player to listen to android MediaServer crashes. When the number of crashes reaches a certain threshold, all media decoding using Android MediaPlayer/MediaCodec will be throttled. This will throttle both media and webaudio implementation. BUG=532745 Committed: https://crrev.com/b2341d25796fe6f94fb9a2d00104f2f88ca67a7c Cr-Commit-Position: refs/heads/master@{#352740}

Patch Set 1 : #

Total comments: 48

Patch Set 2 : addressing comments #

Total comments: 10

Patch Set 3 : addressing comments #

Total comments: 23

Patch Set 4 : make "block" button default #

Patch Set 5 : addressing tedchoc's comments #

Patch Set 6 : rebase #

Patch Set 7 : new infobar text per UI review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+712 lines, -175 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/browser/android/media/media_throttle_infobar_delegate.h View 1 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/browser/android/media/media_throttle_infobar_delegate.cc View 1 2 3 1 chunk +74 lines, -0 lines 0 comments Download
M chrome/browser/android/tab_web_contents_delegate_android.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/android/tab_web_contents_delegate_android.cc View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M components/infobars/core/infobar_delegate.h View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M components/infobars/core/infobar_delegate.cc View 1 2 3 4 5 1 chunk +8 lines, -1 line 0 comments Download
M content/browser/media/android/browser_media_player_manager.h View 1 2 3 4 5 4 chunks +31 lines, -10 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.cc View 1 2 3 4 5 11 chunks +99 lines, -46 lines 0 comments Download
A content/browser/media/android/media_throttler.h View 1 1 chunk +45 lines, -0 lines 0 comments Download
A content/browser/media/android/media_throttler.cc View 1 1 chunk +48 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 4 5 3 chunks +26 lines, -8 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M content/content_jni.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A content/public/android/java/res/raw/empty.wav View Binary file 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java View 1 2 3 4 5 1 chunk +204 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaPlayerListener.java View 2 chunks +1 line, -4 lines 0 comments Download
M media/base/android/media_codec_decoder_unittest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M media/base/android/media_codec_player.h View 1 2 3 4 5 6 3 chunks +6 lines, -7 lines 0 comments Download
M media/base/android/media_codec_player.cc View 1 2 3 4 5 6 5 chunks +13 lines, -13 lines 0 comments Download
M media/base/android/media_codec_video_decoder.h View 1 2 3 4 5 6 2 chunks +1 line, -5 lines 0 comments Download
M media/base/android/media_codec_video_decoder.cc View 1 2 3 4 5 6 3 chunks +2 lines, -6 lines 0 comments Download
M media/base/android/media_player_android.h View 1 2 3 4 5 4 chunks +9 lines, -8 lines 0 comments Download
M media/base/android/media_player_android.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/android/media_player_bridge.h View 1 2 3 4 5 2 chunks +13 lines, -9 lines 0 comments Download
M media/base/android/media_player_bridge.cc View 1 2 3 4 5 9 chunks +13 lines, -10 lines 0 comments Download
M media/base/android/media_source_player.h View 1 2 3 4 5 6 1 chunk +6 lines, -5 lines 0 comments Download
M media/base/android/media_source_player.cc View 1 2 3 4 5 6 4 chunks +4 lines, -4 lines 0 comments Download
M media/base/android/media_source_player_unittest.cc View 1 2 3 4 5 9 chunks +2 lines, -22 lines 0 comments Download
M media/base/android/video_decoder_job.h View 1 2 3 4 5 6 2 chunks +0 lines, -6 lines 0 comments Download
M media/base/android/video_decoder_job.cc View 1 2 3 4 5 6 3 chunks +1 line, -4 lines 0 comments Download
M media/base/android/webaudio_media_codec_bridge.h View 2 chunks +3 lines, -1 line 0 comments Download
M media/base/android/webaudio_media_codec_bridge.cc View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 47 (8 generated)
qinmin
PTAL tedchoc@ for java/ and infobar related changes jochen@ for content/ and component/ OWNER timav@ ...
5 years, 2 months ago (2015-09-28 20:38:54 UTC) #3
Raymond Toy
lgtm for media/base/android/*
5 years, 2 months ago (2015-09-28 20:44:48 UTC) #4
qinmin
Reviewers, please prioritize this code review as this bug has quite big impact on our ...
5 years, 2 months ago (2015-09-28 20:45:42 UTC) #5
Raymond Toy
On 2015/09/28 at 20:44:48, Raymond Toy wrote: > lgtm for media/base/android/* Oops. media/base/android/webaudio*
5 years, 2 months ago (2015-09-28 20:47:18 UTC) #6
DaleCurtis
Why do you need to keep a watchdog player alive? Why not just have all ...
5 years, 2 months ago (2015-09-28 21:13:23 UTC) #7
qinmin
On 2015/09/28 21:13:23, DaleCurtis wrote: > Why do you need to keep a watchdog player ...
5 years, 2 months ago (2015-09-28 21:20:57 UTC) #8
DaleCurtis
I see, thanks for the explanation! Have you quantified just how much overhead this actually ...
5 years, 2 months ago (2015-09-28 21:26:34 UTC) #9
qinmin
On 2015/09/28 21:26:34, DaleCurtis wrote: > I see, thanks for the explanation! Have you quantified ...
5 years, 2 months ago (2015-09-28 21:46:44 UTC) #10
Tima Vaisburd
lgtm for media_codec_player with comments https://codereview.chromium.org/1372203002/diff/20001/content/browser/media/android/browser_media_player_manager.cc File content/browser/media/android/browser_media_player_manager.cc (right): https://codereview.chromium.org/1372203002/diff/20001/content/browser/media/android/browser_media_player_manager.cc#newcode545 content/browser/media/android/browser_media_player_manager.cc:545: MediaPlayerAndroid* player = GetPlayer(player_id); ...
5 years, 2 months ago (2015-09-28 22:09:12 UTC) #11
Ted C
Seems like the infobar code is missing? https://codereview.chromium.org/1372203002/diff/20001/content/browser/media/android/browser_media_player_manager.cc File content/browser/media/android/browser_media_player_manager.cc (right): https://codereview.chromium.org/1372203002/diff/20001/content/browser/media/android/browser_media_player_manager.cc#newcode156 content/browser/media/android/browser_media_player_manager.cc:156: || !RequestDecoderResources(media_player_params.player_id, ...
5 years, 2 months ago (2015-09-28 22:42:30 UTC) #12
Tima Vaisburd
https://codereview.chromium.org/1372203002/diff/20001/media/base/android/media_codec_player.cc File media/base/android/media_codec_player.cc (right): https://codereview.chromium.org/1372203002/diff/20001/media/base/android/media_codec_player.cc#newcode301 media/base/android/media_codec_player.cc:301: on_player_released_cb_.Run(player_id()); On 2015/09/28 22:42:30, Ted C wrote: > On ...
5 years, 2 months ago (2015-09-28 23:04:47 UTC) #13
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1372203002/diff/20001/content/browser/renderer_host/render_message_filter.cc File content/browser/renderer_host/render_message_filter.cc (right): https://codereview.chromium.org/1372203002/diff/20001/content/browser/renderer_host/render_message_filter.cc#newcode512 content/browser/renderer_host/render_message_filter.cc:512: if (close(pcm_output.fd)) { why not just post it to ...
5 years, 2 months ago (2015-09-29 07:14:29 UTC) #14
qinmin
added the missing media_throttle_infobar_delegate.h(cc) file https://codereview.chromium.org/1372203002/diff/20001/content/browser/media/android/browser_media_player_manager.cc File content/browser/media/android/browser_media_player_manager.cc (right): https://codereview.chromium.org/1372203002/diff/20001/content/browser/media/android/browser_media_player_manager.cc#newcode156 content/browser/media/android/browser_media_player_manager.cc:156: || !RequestDecoderResources(media_player_params.player_id, true)) { ...
5 years, 2 months ago (2015-09-29 23:16:23 UTC) #15
jochen (gone - plz use gerrit)
components and content (except for stuff inside /android/ or /media/) lgtm with comments https://codereview.chromium.org/1372203002/diff/40001/chrome/app/generated_resources.grd File ...
5 years, 2 months ago (2015-09-30 09:43:28 UTC) #16
ctserng
https://codereview.chromium.org/1372203002/diff/40001/content/browser/media/android/browser_media_player_manager.h File content/browser/media/android/browser_media_player_manager.h (right): https://codereview.chromium.org/1372203002/diff/40001/content/browser/media/android/browser_media_player_manager.h#newcode172 content/browser/media/android/browser_media_player_manager.h:172: virtual bool RequestDecoderResources(int player_id, bool temporary); Can we make ...
5 years, 2 months ago (2015-09-30 17:41:11 UTC) #18
qinmin
https://codereview.chromium.org/1372203002/diff/40001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1372203002/diff/40001/chrome/app/generated_resources.grd#newcode13326 chrome/app/generated_resources.grd:13326: + Android media server has crashed several times. Do ...
5 years, 2 months ago (2015-09-30 19:27:42 UTC) #20
cpu_(ooo_6.6-7.5)
can you place a screenshot into the bug? I can find a UX person to ...
5 years, 2 months ago (2015-09-30 22:04:57 UTC) #21
qinmin
On 2015/09/30 22:04:57, cpu wrote: > can you place a screenshot into the bug? I ...
5 years, 2 months ago (2015-09-30 22:33:22 UTC) #22
Raymond Toy
https://chromiumcodereview.appspot.com/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java File content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java (right): https://chromiumcodereview.appspot.com/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java#newcode49 content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java:49: // Intervals between media server crashes that are considered ...
5 years, 2 months ago (2015-09-30 22:37:54 UTC) #23
qinmin
https://chromiumcodereview.appspot.com/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java File content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java (right): https://chromiumcodereview.appspot.com/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java#newcode49 content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java:49: // Intervals between media server crashes that are considered ...
5 years, 2 months ago (2015-09-30 22:56:04 UTC) #24
Ted C
https://codereview.chromium.org/1372203002/diff/60001/chrome/browser/android/media/media_throttle_infobar_delegate.cc File chrome/browser/android/media/media_throttle_infobar_delegate.cc (right): https://codereview.chromium.org/1372203002/diff/60001/chrome/browser/android/media/media_throttle_infobar_delegate.cc#newcode29 chrome/browser/android/media/media_throttle_infobar_delegate.cc:29: old_infobar->delegate()->AsMediaThrottleInfoBarDelegate(); It's unfortunate to have to add AsMediaThrottleInfobarDelegate() to ...
5 years, 2 months ago (2015-10-01 02:19:57 UTC) #25
qinmin
https://codereview.chromium.org/1372203002/diff/60001/content/browser/media/android/browser_media_player_manager.h File content/browser/media/android/browser_media_player_manager.h (right): https://codereview.chromium.org/1372203002/diff/60001/content/browser/media/android/browser_media_player_manager.h#newcode154 content/browser/media/android/browser_media_player_manager.h:154: // permitted, or false otherwise. The manager object maintains ...
5 years, 2 months ago (2015-10-01 18:14:02 UTC) #26
Raymond Toy
https://codereview.chromium.org/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java File content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java (right): https://codereview.chromium.org/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java#newcode49 content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java:49: // Intervals between media server crashes that are considered ...
5 years, 2 months ago (2015-10-01 21:58:21 UTC) #27
qinmin
https://chromiumcodereview.appspot.com/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java File content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java (right): https://chromiumcodereview.appspot.com/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java#newcode49 content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java:49: // Intervals between media server crashes that are considered ...
5 years, 2 months ago (2015-10-01 22:53:34 UTC) #28
Ted C
https://codereview.chromium.org/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java File content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java (right): https://codereview.chromium.org/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java#newcode134 content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java:134: new StartWatchDogTask().execute(); On 2015/10/01 18:14:02, qinmin wrote: > On ...
5 years, 2 months ago (2015-10-02 17:23:38 UTC) #29
qinmin
https://codereview.chromium.org/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java File content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java (right): https://codereview.chromium.org/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java#newcode134 content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java:134: new StartWatchDogTask().execute(); On 2015/10/02 17:23:38, Ted C wrote: > ...
5 years, 2 months ago (2015-10-02 17:31:55 UTC) #30
qinmin
5 years, 2 months ago (2015-10-02 17:31:56 UTC) #31
Ted C
lgtm https://codereview.chromium.org/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java File content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java (right): https://codereview.chromium.org/1372203002/diff/60001/content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java#newcode134 content/public/android/java/src/org/chromium/content/browser/MediaThrottler.java:134: new StartWatchDogTask().execute(); On 2015/10/02 17:31:55, qinmin wrote: > ...
5 years, 2 months ago (2015-10-02 18:34:20 UTC) #32
cpu_(ooo_6.6-7.5)
there does not seem to be blissful agreement on the bug?
5 years, 2 months ago (2015-10-02 19:24:26 UTC) #33
qinmin
On 2015/10/02 19:24:26, cpu wrote: > there does not seem to be blissful agreement on ...
5 years, 2 months ago (2015-10-02 21:07:21 UTC) #34
qinmin
On 2015/10/02 21:07:21, qinmin wrote: > On 2015/10/02 19:24:26, cpu wrote: > > there does ...
5 years, 2 months ago (2015-10-02 23:11:32 UTC) #35
qinmin
@cpu, PTAL again. I have modified the infobar message and button labels according to suggestions ...
5 years, 2 months ago (2015-10-06 21:45:26 UTC) #36
cpu_(ooo_6.6-7.5)
Still I don't see visible consensus on the bug. Afaik the bug is in the ...
5 years, 2 months ago (2015-10-06 21:48:29 UTC) #37
jschuh
On 2015/10/06 21:48:29, cpu wrote: > Still I don't see visible consensus on the bug. ...
5 years, 2 months ago (2015-10-06 21:51:48 UTC) #38
qinmin
On 2015/10/06 21:51:48, jschuh (very slow) wrote: > On 2015/10/06 21:48:29, cpu wrote: > > ...
5 years, 2 months ago (2015-10-06 22:00:58 UTC) #39
cpu_(ooo_6.6-7.5)
lgtm Note the petition for UMA data. One the change lands wait a week and ...
5 years, 2 months ago (2015-10-06 22:27:23 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1372203002/130001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1372203002/130001
5 years, 2 months ago (2015-10-06 22:38:47 UTC) #45
commit-bot: I haz the power
Committed patchset #7 (id:130001)
5 years, 2 months ago (2015-10-07 01:42:00 UTC) #46
commit-bot: I haz the power
5 years, 2 months ago (2015-10-07 01:43:02 UTC) #47
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/b2341d25796fe6f94fb9a2d00104f2f88ca67a7c
Cr-Commit-Position: refs/heads/master@{#352740}

Powered by Google App Engine
This is Rietveld 408576698