OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_ANDROID_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 // Called when a seek request is acked by the render process. | 96 // Called when a seek request is acked by the render process. |
97 virtual void OnSeekRequestAck(unsigned seek_request_id); | 97 virtual void OnSeekRequestAck(unsigned seek_request_id); |
98 | 98 |
99 // Called when the demuxer has changed the duration. | 99 // Called when the demuxer has changed the duration. |
100 virtual void DurationChanged(const base::TimeDelta& duration); | 100 virtual void DurationChanged(const base::TimeDelta& duration); |
101 | 101 |
102 // Pass a drm bridge to a player. | 102 // Pass a drm bridge to a player. |
103 virtual void SetDrmBridge(MediaDrmBridge* drm_bridge); | 103 virtual void SetDrmBridge(MediaDrmBridge* drm_bridge); |
104 | 104 |
| 105 // Notifies the player that a decryption key has been added. The player |
| 106 // may want to start/resume playback if it is waiting for a key. |
| 107 virtual void OnKeyAdded(); |
| 108 |
105 int player_id() { return player_id_; } | 109 int player_id() { return player_id_; } |
106 | 110 |
107 protected: | 111 protected: |
108 MediaPlayerAndroid(int player_id, | 112 MediaPlayerAndroid(int player_id, |
109 MediaPlayerManager* manager); | 113 MediaPlayerManager* manager); |
110 | 114 |
111 // Called when player status changes. | 115 // Called when player status changes. |
112 virtual void OnMediaError(int error_type); | 116 virtual void OnMediaError(int error_type); |
113 virtual void OnVideoSizeChanged(int width, int height); | 117 virtual void OnVideoSizeChanged(int width, int height); |
114 virtual void OnBufferingUpdate(int percent); | 118 virtual void OnBufferingUpdate(int percent); |
(...skipping 16 matching lines...) Expand all Loading... |
131 | 135 |
132 // Resource manager for all the media players. | 136 // Resource manager for all the media players. |
133 MediaPlayerManager* manager_; | 137 MediaPlayerManager* manager_; |
134 | 138 |
135 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); | 139 DISALLOW_COPY_AND_ASSIGN(MediaPlayerAndroid); |
136 }; | 140 }; |
137 | 141 |
138 } // namespace media | 142 } // namespace media |
139 | 143 |
140 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ | 144 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_ANDROID_H_ |
OLD | NEW |