OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define CONTENT_RENDERER_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/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "cc/layers/video_frame_provider.h" | 16 #include "cc/layers/video_frame_provider.h" |
17 #include "content/renderer/media/android/media_info_loader.h" | 17 #include "content/renderer/media/android/media_info_loader.h" |
18 #include "content/renderer/media/android/media_source_delegate.h" | 18 #include "content/renderer/media/android/media_source_delegate.h" |
19 #include "content/renderer/media/android/stream_texture_factory_android.h" | 19 #include "content/renderer/media/android/stream_texture_factory_android.h" |
| 20 #include "gpu/command_buffer/common/mailbox.h" |
20 #include "media/base/android/media_player_android.h" | 21 #include "media/base/android/media_player_android.h" |
21 #include "media/base/demuxer_stream.h" | 22 #include "media/base/demuxer_stream.h" |
22 #include "media/base/media_keys.h" | 23 #include "media/base/media_keys.h" |
23 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 24 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
24 #include "third_party/WebKit/public/platform/WebSize.h" | 25 #include "third_party/WebKit/public/platform/WebSize.h" |
25 #include "third_party/WebKit/public/platform/WebURL.h" | 26 #include "third_party/WebKit/public/platform/WebURL.h" |
26 #include "third_party/WebKit/public/web/WebMediaPlayer.h" | 27 #include "third_party/WebKit/public/web/WebMediaPlayer.h" |
27 #include "ui/gfx/rect_f.h" | 28 #include "ui/gfx/rect_f.h" |
28 #include "webkit/renderer/media/crypto/proxy_decryptor.h" | 29 #include "webkit/renderer/media/crypto/proxy_decryptor.h" |
29 | 30 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // Player ID assigned by the |manager_|. | 326 // Player ID assigned by the |manager_|. |
326 int player_id_; | 327 int player_id_; |
327 | 328 |
328 // Current player states. | 329 // Current player states. |
329 WebKit::WebMediaPlayer::NetworkState network_state_; | 330 WebKit::WebMediaPlayer::NetworkState network_state_; |
330 WebKit::WebMediaPlayer::ReadyState ready_state_; | 331 WebKit::WebMediaPlayer::ReadyState ready_state_; |
331 | 332 |
332 // GL texture ID allocated to the video. | 333 // GL texture ID allocated to the video. |
333 unsigned int texture_id_; | 334 unsigned int texture_id_; |
334 | 335 |
| 336 // GL texture mailbox for texture_id_ to provide in the VideoFrame, and sync |
| 337 // point for when the mailbox was produced. |
| 338 gpu::Mailbox texture_mailbox_; |
| 339 unsigned int texture_mailbox_sync_point_; |
| 340 |
335 // Stream texture ID allocated to the video. | 341 // Stream texture ID allocated to the video. |
336 unsigned int stream_id_; | 342 unsigned int stream_id_; |
337 | 343 |
338 // Whether the mediaplayer is playing. | 344 // Whether the mediaplayer is playing. |
339 bool is_playing_; | 345 bool is_playing_; |
340 | 346 |
341 // Whether media player needs to re-establish the surface texture peer. | 347 // Whether media player needs to re-establish the surface texture peer. |
342 bool needs_establish_peer_; | 348 bool needs_establish_peer_; |
343 | 349 |
344 // Whether |stream_texture_proxy_| is initialized. | 350 // Whether |stream_texture_proxy_| is initialized. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 | 418 |
413 // The decryptor that manages decryption keys and decrypts encrypted frames. | 419 // The decryptor that manages decryption keys and decrypts encrypted frames. |
414 scoped_ptr<webkit_media::ProxyDecryptor> decryptor_; | 420 scoped_ptr<webkit_media::ProxyDecryptor> decryptor_; |
415 | 421 |
416 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 422 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
417 }; | 423 }; |
418 | 424 |
419 } // namespace content | 425 } // namespace content |
420 | 426 |
421 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 427 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |