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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 // Cleaning up all remaining resources as this object is about to get deleted. | 175 // Cleaning up all remaining resources as this object is about to get deleted. |
176 virtual void Destroy() = 0; | 176 virtual void Destroy() = 0; |
177 | 177 |
178 WebKit::WebMediaPlayerClient* client() { return client_; } | 178 WebKit::WebMediaPlayerClient* client() { return client_; } |
179 | 179 |
180 int player_id() const { return player_id_; } | 180 int player_id() const { return player_id_; } |
181 | 181 |
182 WebMediaPlayerManagerAndroid* manager() const { return manager_; } | 182 WebMediaPlayerManagerAndroid* manager() const { return manager_; } |
183 | 183 |
| 184 // Request external surface for out-of-band composition. |
| 185 virtual void RequestExternalSurface() = 0; |
| 186 |
184 private: | 187 private: |
185 void ReallocateVideoFrame(); | 188 void ReallocateVideoFrame(); |
186 | 189 |
187 WebKit::WebMediaPlayerClient* const client_; | 190 WebKit::WebMediaPlayerClient* const client_; |
188 | 191 |
189 // Save the list of buffered time ranges. | 192 // Save the list of buffered time ranges. |
190 WebKit::WebTimeRanges buffered_; | 193 WebKit::WebTimeRanges buffered_; |
191 | 194 |
192 // Size of the video. | 195 // Size of the video. |
193 WebKit::WebSize natural_size_; | 196 WebKit::WebSize natural_size_; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 // Whether the video size info is available. | 241 // Whether the video size info is available. |
239 bool has_size_info_; | 242 bool has_size_info_; |
240 | 243 |
241 // Object for allocating stream textures. | 244 // Object for allocating stream textures. |
242 scoped_ptr<StreamTextureFactory> stream_texture_factory_; | 245 scoped_ptr<StreamTextureFactory> stream_texture_factory_; |
243 | 246 |
244 // Object for calling back the compositor thread to repaint the video when a | 247 // Object for calling back the compositor thread to repaint the video when a |
245 // frame available. It should be initialized on the compositor thread. | 248 // frame available. It should be initialized on the compositor thread. |
246 scoped_ptr<StreamTextureProxy> stream_texture_proxy_; | 249 scoped_ptr<StreamTextureProxy> stream_texture_proxy_; |
247 | 250 |
| 251 // Whether media player needs external surface. |
| 252 bool needs_external_surface_; |
| 253 |
248 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 254 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
249 }; | 255 }; |
250 | 256 |
251 } // namespace webkit_media | 257 } // namespace webkit_media |
252 | 258 |
253 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 259 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |