New issue
Advanced search Search tips

Issue 636615 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 619729



Sign in to add a comment

Throttle MediaPlayer instances in MediaPlayerRenderer

Project Member Reported by tguilbert@chromium.org, Aug 11 2016

Issue description

BrowserMediaPlayerManager has some logic to limit the number of concurrent MediaPlayerAndroids in order not to crash the MediaRouter.

MediaPlayerRenderer should implement some similar logic, via the use of exponential backoff.
 
Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f524383bbd03acfba4ffe18b7e77a66c46228dcd

commit f524383bbd03acfba4ffe18b7e77a66c46228dcd
Author: tguilbert <tguilbert@chromium.org>
Date: Thu Nov 17 02:39:34 2016

Add MediaServiceThrottler

WMPA used the MediaThrottler to display a notification bar to the user
if an unusual number of media server crashes were detected. This was
done in order to prevent a webpage from loading the same url over and
over in order to crash the Media Server.

This change introduces the MediaServerCrashListener which reuses the
same technique that the MediaThrottler used to monitor for Media Server
crashes.

It also introduces the MediaServiceThrottler which uses the
MediaServerCrashListener, and exponentially delays the creation of new
clients (MediaPlayerBridges for now) based on the number of Media
Server crashes.

The MediaServiceThrottler resets its internal clock state after a
minute of not having schedule new client creations, and reset its
crash counter after a minute of not having detected any crashes. It
also support "burst scheduling", allowing for a fixed number of clients
to be scheduled immediately within some sliding window, in order to
minimize impact from multiple requests coming in from new page loads.

BUG= 636615 
TEST=Added UTs

Review-Url: https://codereview.chromium.org/2471903002
Cr-Commit-Position: refs/heads/master@{#432712}

[modify] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/content/browser/media/android/media_player_renderer.cc
[modify] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/content/browser/media/android/media_player_renderer.h
[modify] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/media/base/android/BUILD.gn
[add] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/media/base/android/java/src/org/chromium/media/MediaServerCrashListener.java
[add] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/media/base/android/media_server_crash_listener.cc
[add] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/media/base/android/media_server_crash_listener.h
[add] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/media/base/android/media_service_throttler.cc
[add] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/media/base/android/media_service_throttler.h
[add] https://crrev.com/f524383bbd03acfba4ffe18b7e77a66c46228dcd/media/base/android/media_service_throttler_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment