| Index: webkit/media/android/webmediaplayer_manager_android.h
|
| diff --git a/webkit/media/android/webmediaplayer_manager_android.h b/webkit/media/android/webmediaplayer_manager_android.h
|
| index e8a046a664d561412fc9ae3955adbf277e14e859..d6b133c147e246d08af0b29fdf7271984078ab34 100644
|
| --- a/webkit/media/android/webmediaplayer_manager_android.h
|
| +++ b/webkit/media/android/webmediaplayer_manager_android.h
|
| @@ -26,6 +26,13 @@ class WebMediaPlayerManagerAndroid {
|
| int RegisterMediaPlayer(WebMediaPlayerAndroid* player);
|
| void UnregisterMediaPlayer(int player_id);
|
|
|
| + // Called when a mediaplayer starts to decode media. If the number
|
| + // of active decoders hits the limit, release some resources.
|
| + // TODO(qinmin): we need to classify between video and audio decoders.
|
| + // Audio decoders are inexpensive. And css animations often come with
|
| + // lots of small audio files.
|
| + void RequestMediaResources(int player_id);
|
| +
|
| // Release all the media resources on the renderer process.
|
| void ReleaseMediaResources();
|
|
|
| @@ -34,8 +41,8 @@ class WebMediaPlayerManagerAndroid {
|
|
|
| private:
|
| // Information needed to manage WebMediaPlayerAndroid.
|
| - // TODO(qinmin): more informations will be added here for resource management.
|
| struct MediaPlayerInfo {
|
| + bool is_active_;
|
| webkit_media::WebMediaPlayerAndroid* player;
|
| };
|
|
|
| @@ -45,6 +52,9 @@ class WebMediaPlayerManagerAndroid {
|
|
|
| int32 next_media_player_id_;
|
|
|
| + // Number of active players.
|
| + int32 num_active_players_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerManagerAndroid);
|
| };
|
|
|
|
|