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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 } | 73 } |
74 | 74 |
75 namespace media { | 75 namespace media { |
76 class ChunkDemuxer; | 76 class ChunkDemuxer; |
77 class MediaLog; | 77 class MediaLog; |
78 } | 78 } |
79 | 79 |
80 namespace webkit_media { | 80 namespace webkit_media { |
81 | 81 |
82 class MediaStreamClient; | 82 class MediaStreamClient; |
| 83 class WebAudioSourceProviderImpl; |
83 class WebMediaPlayerDelegate; | 84 class WebMediaPlayerDelegate; |
84 class WebMediaPlayerParams; | 85 class WebMediaPlayerParams; |
85 class WebMediaPlayerProxy; | 86 class WebMediaPlayerProxy; |
86 | 87 |
87 class WebMediaPlayerImpl | 88 class WebMediaPlayerImpl |
88 : public WebKit::WebMediaPlayer, | 89 : public WebKit::WebMediaPlayer, |
89 public MessageLoop::DestructionObserver, | 90 public MessageLoop::DestructionObserver, |
90 public base::SupportsWeakPtr<WebMediaPlayerImpl> { | 91 public base::SupportsWeakPtr<WebMediaPlayerImpl> { |
91 public: | 92 public: |
92 // Constructs a WebMediaPlayer implementation using Chromium's media stack. | 93 // Constructs a WebMediaPlayer implementation using Chromium's media stack. |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 MediaStreamClient* media_stream_client_; | 319 MediaStreamClient* media_stream_client_; |
319 | 320 |
320 scoped_refptr<media::MediaLog> media_log_; | 321 scoped_refptr<media::MediaLog> media_log_; |
321 | 322 |
322 // Since accelerated compositing status is only known after the first layout, | 323 // Since accelerated compositing status is only known after the first layout, |
323 // we delay reporting it to UMA until that time. | 324 // we delay reporting it to UMA until that time. |
324 bool accelerated_compositing_reported_; | 325 bool accelerated_compositing_reported_; |
325 | 326 |
326 bool incremented_externally_allocated_memory_; | 327 bool incremented_externally_allocated_memory_; |
327 | 328 |
328 // TODO(scherkus): Sadly these two objects are the same and we're also forced | 329 // Routes audio playback to either AudioRendererSink or WebAudio. |
329 // to maintain an additional reference to |audio_renderer_sink_| otherwise | 330 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; |
330 // |audio_source_provider_| will go bad after |pipeline_| shuts down. | |
331 // | |
332 // See http://crbug.com/136442 for details. | |
333 WebKit::WebAudioSourceProvider* audio_source_provider_; | |
334 scoped_refptr<media::AudioRendererSink> audio_renderer_sink_; | |
335 | 331 |
336 bool is_local_source_; | 332 bool is_local_source_; |
337 bool supports_save_; | 333 bool supports_save_; |
338 | 334 |
339 // The decryptor that manages decryption keys and decrypts encrypted frames. | 335 // The decryptor that manages decryption keys and decrypts encrypted frames. |
340 scoped_ptr<ProxyDecryptor> decryptor_; | 336 scoped_ptr<ProxyDecryptor> decryptor_; |
341 | 337 |
342 bool starting_; | 338 bool starting_; |
343 | 339 |
344 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; | 340 scoped_refptr<media::ChunkDemuxer> chunk_demuxer_; |
345 | 341 |
346 // Temporary for EME v0.1. In the future the init data type should be passed | 342 // Temporary for EME v0.1. In the future the init data type should be passed |
347 // through GenerateKeyRequest() directly from WebKit. | 343 // through GenerateKeyRequest() directly from WebKit. |
348 std::string init_data_type_; | 344 std::string init_data_type_; |
349 | 345 |
350 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 346 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
351 }; | 347 }; |
352 | 348 |
353 } // namespace webkit_media | 349 } // namespace webkit_media |
354 | 350 |
355 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 351 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |