| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "media/base/android/demuxer_stream_player_params.h" | |
| 10 #include "media/base/media_export.h" | 9 #include "media/base/media_export.h" |
| 11 | 10 |
| 12 namespace media { | 11 namespace media { |
| 13 | 12 |
| 14 class MediaPlayerAndroid; | 13 class MediaPlayerAndroid; |
| 15 class MediaResourceGetter; | 14 class MediaResourceGetter; |
| 16 class MediaUrlInterceptor; | 15 class MediaUrlInterceptor; |
| 17 | 16 |
| 18 // This class is responsible for managing active MediaPlayerAndroid objects. | 17 // This class is responsible for managing active MediaPlayerAndroid objects. |
| 19 class MEDIA_EXPORT MediaPlayerManager { | 18 class MEDIA_EXPORT MediaPlayerManager { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 virtual void OnSeekComplete( | 54 virtual void OnSeekComplete( |
| 56 int player_id, | 55 int player_id, |
| 57 const base::TimeDelta& current_time) = 0; | 56 const base::TimeDelta& current_time) = 0; |
| 58 | 57 |
| 59 // Called when error happens. Args: player ID, error type. | 58 // Called when error happens. Args: player ID, error type. |
| 60 virtual void OnError(int player_id, int error) = 0; | 59 virtual void OnError(int player_id, int error) = 0; |
| 61 | 60 |
| 62 // Called when video size has changed. Args: player ID, width, height. | 61 // Called when video size has changed. Args: player ID, width, height. |
| 63 virtual void OnVideoSizeChanged(int player_id, int width, int height) = 0; | 62 virtual void OnVideoSizeChanged(int player_id, int width, int height) = 0; |
| 64 | 63 |
| 65 // Called when the player pauses as a new key is required to decrypt | |
| 66 // encrypted content. | |
| 67 virtual void OnWaitingForDecryptionKey(int player_id) = 0; | |
| 68 | |
| 69 // Returns the player that's in the fullscreen mode currently. | 64 // Returns the player that's in the fullscreen mode currently. |
| 70 virtual MediaPlayerAndroid* GetFullscreenPlayer() = 0; | 65 virtual MediaPlayerAndroid* GetFullscreenPlayer() = 0; |
| 71 | 66 |
| 72 // Returns the player with the specified id. | 67 // Returns the player with the specified id. |
| 73 virtual MediaPlayerAndroid* GetPlayer(int player_id) = 0; | 68 virtual MediaPlayerAndroid* GetPlayer(int player_id) = 0; |
| 74 | 69 |
| 75 // Called by the player to request the playback for given duration. The | 70 // Called by the player to request the playback for given duration. The |
| 76 // manager should use this opportunity to check if the current context is | 71 // manager should use this opportunity to check if the current context is |
| 77 // appropriate for a media to play. | 72 // appropriate for a media to play. |
| 78 // Returns whether the request was granted. | 73 // Returns whether the request was granted. |
| 79 virtual bool RequestPlay(int player_id, | 74 virtual bool RequestPlay(int player_id, |
| 80 base::TimeDelta duration, | 75 base::TimeDelta duration, |
| 81 bool has_audio) = 0; | 76 bool has_audio) = 0; |
| 82 }; | 77 }; |
| 83 | 78 |
| 84 } // namespace media | 79 } // namespace media |
| 85 | 80 |
| 86 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ | 81 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |