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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. | 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. |
6 // It contains Pipeline which is the actual media player pipeline, it glues | 6 // It contains Pipeline which is the actual media player pipeline, it glues |
7 // the media player pipeline, data source, audio renderer and renderer. | 7 // the media player pipeline, data source, audio renderer and renderer. |
8 // Pipeline would creates multiple threads and access some public methods | 8 // Pipeline would creates multiple threads and access some public methods |
9 // of this class, so we need to be extra careful about concurrent access of | 9 // of this class, so we need to be extra careful about concurrent access of |
10 // methods and members. | 10 // methods and members. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // list of the main thread. | 46 // list of the main thread. |
47 | 47 |
48 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 48 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
49 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 49 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
50 | 50 |
51 #include <string> | 51 #include <string> |
52 | 52 |
53 #include "base/memory/ref_counted.h" | 53 #include "base/memory/ref_counted.h" |
54 #include "base/memory/scoped_ptr.h" | 54 #include "base/memory/scoped_ptr.h" |
55 #include "base/memory/weak_ptr.h" | 55 #include "base/memory/weak_ptr.h" |
56 #include "base/message_loop.h" | |
57 #include "base/threading/thread.h" | 56 #include "base/threading/thread.h" |
58 #include "googleurl/src/gurl.h" | 57 #include "googleurl/src/gurl.h" |
59 #include "media/base/audio_renderer_sink.h" | 58 #include "media/base/audio_renderer_sink.h" |
60 #include "media/base/decryptor.h" | 59 #include "media/base/decryptor.h" |
61 #include "media/base/pipeline.h" | 60 #include "media/base/pipeline.h" |
62 #include "skia/ext/platform_canvas.h" | 61 #include "skia/ext/platform_canvas.h" |
63 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide
r.h" | 62 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide
r.h" |
64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" | 63 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
65 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.
h" | 64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.
h" |
66 #include "webkit/media/crypto/key_systems.h" | 65 #include "webkit/media/crypto/key_systems.h" |
67 #include "webkit/media/crypto/proxy_decryptor.h" | 66 #include "webkit/media/crypto/proxy_decryptor.h" |
68 | 67 |
69 class RenderAudioSourceProvider; | 68 class RenderAudioSourceProvider; |
70 | 69 |
71 namespace WebKit { | 70 namespace WebKit { |
72 class WebFrame; | 71 class WebFrame; |
73 } | 72 } |
74 | 73 |
| 74 namespace base { |
| 75 class MessageLoopProxy; |
| 76 } |
| 77 |
75 namespace media { | 78 namespace media { |
76 class ChunkDemuxer; | 79 class ChunkDemuxer; |
77 class MediaLog; | 80 class MediaLog; |
78 } | 81 } |
79 | 82 |
80 namespace webkit_media { | 83 namespace webkit_media { |
81 | 84 |
82 class MediaStreamClient; | 85 class MediaStreamClient; |
83 class WebAudioSourceProviderImpl; | 86 class WebAudioSourceProviderImpl; |
84 class WebMediaPlayerDelegate; | 87 class WebMediaPlayerDelegate; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 278 |
276 WebKit::WebFrame* frame_; | 279 WebKit::WebFrame* frame_; |
277 | 280 |
278 // TODO(hclam): get rid of these members and read from the pipeline directly. | 281 // TODO(hclam): get rid of these members and read from the pipeline directly. |
279 WebKit::WebMediaPlayer::NetworkState network_state_; | 282 WebKit::WebMediaPlayer::NetworkState network_state_; |
280 WebKit::WebMediaPlayer::ReadyState ready_state_; | 283 WebKit::WebMediaPlayer::ReadyState ready_state_; |
281 | 284 |
282 // Keep a list of buffered time ranges. | 285 // Keep a list of buffered time ranges. |
283 WebKit::WebTimeRanges buffered_; | 286 WebKit::WebTimeRanges buffered_; |
284 | 287 |
285 // Message loops for posting tasks between Chrome's main thread. Also used | 288 // Message loops for posting tasks on Chrome's main thread. Also used |
286 // for DCHECKs so methods calls won't execute in the wrong thread. | 289 // for DCHECKs so methods calls won't execute in the wrong thread. |
287 MessageLoop* main_loop_; | 290 const scoped_refptr<base::MessageLoopProxy> main_loop_; |
288 | 291 |
289 scoped_ptr<media::FilterCollection> filter_collection_; | 292 scoped_ptr<media::FilterCollection> filter_collection_; |
290 scoped_refptr<media::Pipeline> pipeline_; | 293 scoped_refptr<media::Pipeline> pipeline_; |
291 base::Thread media_thread_; | 294 base::Thread media_thread_; |
292 | 295 |
293 // The currently selected key system. Empty string means that no key system | 296 // The currently selected key system. Empty string means that no key system |
294 // has been selected. | 297 // has been selected. |
295 WebKit::WebString current_key_system_; | 298 WebKit::WebString current_key_system_; |
296 | 299 |
297 // Playback state. | 300 // Playback state. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // Temporary for EME v0.1. In the future the init data type should be passed | 351 // Temporary for EME v0.1. In the future the init data type should be passed |
349 // through GenerateKeyRequest() directly from WebKit. | 352 // through GenerateKeyRequest() directly from WebKit. |
350 std::string init_data_type_; | 353 std::string init_data_type_; |
351 | 354 |
352 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 355 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
353 }; | 356 }; |
354 | 357 |
355 } // namespace webkit_media | 358 } // namespace webkit_media |
356 | 359 |
357 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 360 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |