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 WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 virtual void UpdateNetworkState(WebKit::WebMediaPlayer::NetworkState state); | 136 virtual void UpdateNetworkState(WebKit::WebMediaPlayer::NetworkState state); |
137 virtual void UpdateReadyState(WebKit::WebMediaPlayer::ReadyState state); | 137 virtual void UpdateReadyState(WebKit::WebMediaPlayer::ReadyState state); |
138 | 138 |
139 // Helper method to reestablish the surface texture peer for android | 139 // Helper method to reestablish the surface texture peer for android |
140 // media player. | 140 // media player. |
141 virtual void EstablishSurfaceTexturePeer(); | 141 virtual void EstablishSurfaceTexturePeer(); |
142 | 142 |
143 // Requesting whether the surface texture peer needs to be reestablished. | 143 // Requesting whether the surface texture peer needs to be reestablished. |
144 virtual void SetNeedsEstablishPeer(bool needs_establish_peer); | 144 virtual void SetNeedsEstablishPeer(bool needs_establish_peer); |
145 | 145 |
| 146 // Method called by the implementation classes to set whether the player is |
| 147 // displayed to an external surface. |
| 148 void SetIsInVideoView(bool is_in_video_view); |
| 149 |
146 // Method to be implemented by child classes. | 150 // Method to be implemented by child classes. |
147 // Initialize the media player bridge object. | 151 // Initialize the media player bridge object. |
148 virtual void InitializeMediaPlayer(GURL url) = 0; | 152 virtual void InitializeMediaPlayer(GURL url) = 0; |
149 | 153 |
150 // Inform the media player to start playing. | 154 // Inform the media player to start playing. |
151 virtual void PlayInternal() = 0; | 155 virtual void PlayInternal() = 0; |
152 | 156 |
153 // Inform the media player to pause. | 157 // Inform the media player to pause. |
154 virtual void PauseInternal() = 0; | 158 virtual void PauseInternal() = 0; |
155 | 159 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 225 |
222 // Whether the mediaplayer is playing. | 226 // Whether the mediaplayer is playing. |
223 bool is_playing_; | 227 bool is_playing_; |
224 | 228 |
225 // Whether media player needs to re-establish the surface texture peer. | 229 // Whether media player needs to re-establish the surface texture peer. |
226 bool needs_establish_peer_; | 230 bool needs_establish_peer_; |
227 | 231 |
228 // Whether the video size info is available. | 232 // Whether the video size info is available. |
229 bool has_size_info_; | 233 bool has_size_info_; |
230 | 234 |
| 235 // Whether the player is rendered to an external surface. |
| 236 bool is_in_video_view_; |
| 237 |
231 // Object for allocating stream textures. | 238 // Object for allocating stream textures. |
232 scoped_ptr<StreamTextureFactory> stream_texture_factory_; | 239 scoped_ptr<StreamTextureFactory> stream_texture_factory_; |
233 | 240 |
234 // Object for calling back the compositor thread to repaint the video when a | 241 // Object for calling back the compositor thread to repaint the video when a |
235 // frame available. It should be initialized on the compositor thread. | 242 // frame available. It should be initialized on the compositor thread. |
236 scoped_ptr<StreamTextureProxy> stream_texture_proxy_; | 243 scoped_ptr<StreamTextureProxy> stream_texture_proxy_; |
237 | 244 |
238 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 245 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
239 }; | 246 }; |
240 | 247 |
241 } // namespace webkit_media | 248 } // namespace webkit_media |
242 | 249 |
243 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 250 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |