Chromium Code Reviews| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 class WebFrame; | 72 class WebFrame; |
| 73 } | 73 } |
| 74 | 74 |
| 75 namespace media { | 75 namespace media { |
| 76 class MediaLog; | 76 class MediaLog; |
| 77 } | 77 } |
| 78 | 78 |
| 79 namespace webkit_media { | 79 namespace webkit_media { |
| 80 | 80 |
| 81 class MediaStreamClient; | 81 class MediaStreamClient; |
| 82 class ProxyDecryptor; | |
| 82 class WebMediaPlayerDelegate; | 83 class WebMediaPlayerDelegate; |
| 83 class WebMediaPlayerProxy; | 84 class WebMediaPlayerProxy; |
| 84 | 85 |
| 85 class WebMediaPlayerImpl | 86 class WebMediaPlayerImpl |
| 86 : public WebKit::WebMediaPlayer, | 87 : public WebKit::WebMediaPlayer, |
| 87 public MessageLoop::DestructionObserver, | 88 public MessageLoop::DestructionObserver, |
| 88 public base::SupportsWeakPtr<WebMediaPlayerImpl> { | 89 public base::SupportsWeakPtr<WebMediaPlayerImpl> { |
| 89 public: | 90 public: |
| 90 // Construct a WebMediaPlayerImpl with reference to the client, and media | 91 // Construct a WebMediaPlayerImpl with reference to the client, and media |
| 91 // filter collection. By providing the filter collection the implementor can | 92 // filter collection. By providing the filter collection the implementor can |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 | 287 |
| 287 // The media pipeline and a bool tracking whether we have started it yet. | 288 // The media pipeline and a bool tracking whether we have started it yet. |
| 288 // | 289 // |
| 289 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and | 290 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and |
| 290 // have WebMediaPlayerImpl return the default values to WebKit instead of | 291 // have WebMediaPlayerImpl return the default values to WebKit instead of |
| 291 // relying on Pipeline to take care of default values. | 292 // relying on Pipeline to take care of default values. |
| 292 scoped_refptr<media::Pipeline> pipeline_; | 293 scoped_refptr<media::Pipeline> pipeline_; |
| 293 bool started_; | 294 bool started_; |
| 294 | 295 |
| 295 // The decryptor that manages decryption keys and decrypts encrypted frames. | 296 // The decryptor that manages decryption keys and decrypts encrypted frames. |
| 296 scoped_ptr<media::Decryptor> decryptor_; | 297 scoped_ptr<webkit_media::ProxyDecryptor> decryptor_; |
|
ddorwin
2012/06/27 04:00:08
This could just be a member - just initialize it i
xhwang
2012/06/27 21:41:26
Done.
| |
| 298 | |
| 299 // The currently selected key system. Empty string means that no key system | |
| 300 // has been selected. | |
| 301 WebKit::WebString current_key_system_; | |
| 297 | 302 |
| 298 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; | 303 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; |
| 299 | 304 |
| 300 // Playback state. | 305 // Playback state. |
| 301 // | 306 // |
| 302 // TODO(scherkus): we have these because Pipeline favours the simplicity of a | 307 // TODO(scherkus): we have these because Pipeline favours the simplicity of a |
| 303 // single "playback rate" over worrying about paused/stopped etc... It forces | 308 // single "playback rate" over worrying about paused/stopped etc... It forces |
| 304 // all clients to manage the pause+playback rate externally, but is that | 309 // all clients to manage the pause+playback rate externally, but is that |
| 305 // really a bad thing? | 310 // really a bad thing? |
| 306 // | 311 // |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 338 WebKit::WebAudioSourceProvider* audio_source_provider_; | 343 WebKit::WebAudioSourceProvider* audio_source_provider_; |
| 339 | 344 |
| 340 bool is_local_source_; | 345 bool is_local_source_; |
| 341 | 346 |
| 342 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 347 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 343 }; | 348 }; |
| 344 | 349 |
| 345 } // namespace webkit_media | 350 } // namespace webkit_media |
| 346 | 351 |
| 347 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 352 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |