| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "media/base/demuxer_stream.h" | 15 #include "media/base/demuxer_stream.h" |
| 16 #include "cc/layers/video_frame_provider.h" | 16 #include "cc/layers/video_frame_provider.h" |
| 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
| 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" | 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
| 21 #include "ui/gfx/rect_f.h" | 21 #include "ui/gfx/rect_f.h" |
| 22 #include "webkit/media/android/media_info_loader_android.h" |
| 22 #include "webkit/media/android/media_source_delegate.h" | 23 #include "webkit/media/android/media_source_delegate.h" |
| 23 #include "webkit/media/android/stream_texture_factory_android.h" | 24 #include "webkit/media/android/stream_texture_factory_android.h" |
| 24 | 25 |
| 25 namespace media { | 26 namespace media { |
| 26 class MediaLog; | 27 class MediaLog; |
| 27 } | 28 } |
| 28 | 29 |
| 29 namespace WebKit { | 30 namespace WebKit { |
| 30 class WebFrame; | 31 class WebFrame; |
| 31 } | 32 } |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // Requesting whether the surface texture peer needs to be reestablished. | 220 // Requesting whether the surface texture peer needs to be reestablished. |
| 220 void SetNeedsEstablishPeer(bool needs_establish_peer); | 221 void SetNeedsEstablishPeer(bool needs_establish_peer); |
| 221 | 222 |
| 222 #if defined(GOOGLE_TV) | 223 #if defined(GOOGLE_TV) |
| 223 // Request external surface for out-of-band composition. | 224 // Request external surface for out-of-band composition. |
| 224 void RequestExternalSurface(); | 225 void RequestExternalSurface(); |
| 225 #endif | 226 #endif |
| 226 | 227 |
| 227 private: | 228 private: |
| 228 void ReallocateVideoFrame(); | 229 void ReallocateVideoFrame(); |
| 230 void DidLoadMediaInfo(MediaInfoLoaderAndroid::Status status); |
| 229 | 231 |
| 230 WebKit::WebFrame* const frame_; | 232 WebKit::WebFrame* const frame_; |
| 231 | 233 |
| 232 WebKit::WebMediaPlayerClient* const client_; | 234 WebKit::WebMediaPlayerClient* const client_; |
| 233 | 235 |
| 234 // Save the list of buffered time ranges. | 236 // Save the list of buffered time ranges. |
| 235 WebKit::WebTimeRanges buffered_; | 237 WebKit::WebTimeRanges buffered_; |
| 236 | 238 |
| 237 // Size of the video. | 239 // Size of the video. |
| 238 WebKit::WebSize natural_size_; | 240 WebKit::WebSize natural_size_; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 // destructor. | 318 // destructor. |
| 317 WebMediaPlayerProxyAndroid* proxy_; | 319 WebMediaPlayerProxyAndroid* proxy_; |
| 318 | 320 |
| 319 // The current playing time. Because the media player is in the browser | 321 // The current playing time. Because the media player is in the browser |
| 320 // process, it will regularly update the |current_time_| by calling | 322 // process, it will regularly update the |current_time_| by calling |
| 321 // OnTimeUpdate(). | 323 // OnTimeUpdate(). |
| 322 double current_time_; | 324 double current_time_; |
| 323 | 325 |
| 324 media::MediaLog* media_log_; | 326 media::MediaLog* media_log_; |
| 325 | 327 |
| 328 scoped_ptr<MediaInfoLoaderAndroid> info_loader_; |
| 329 |
| 330 // The media source that is pending for |info_loader_| to complete. |
| 331 scoped_ptr<WebKit::WebMediaSource> pending_media_source_; |
| 332 |
| 326 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 333 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
| 327 }; | 334 }; |
| 328 | 335 |
| 329 } // namespace webkit_media | 336 } // namespace webkit_media |
| 330 | 337 |
| 331 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 338 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
| OLD | NEW |