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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 scoped_ptr<media::FilterCollection> filter_collection_; | 286 scoped_ptr<media::FilterCollection> filter_collection_; |
| 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 currently selected key system. Empty string means that no key system |
| 296 scoped_ptr<media::Decryptor> decryptor_; | 297 // has been selected. |
| 298 WebKit::WebString current_key_system_; | |
| 297 | 299 |
| 298 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; | 300 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; |
| 299 | 301 |
| 300 // Playback state. | 302 // Playback state. |
| 301 // | 303 // |
| 302 // TODO(scherkus): we have these because Pipeline favours the simplicity of a | 304 // TODO(scherkus): we have these because Pipeline favours the simplicity of a |
| 303 // single "playback rate" over worrying about paused/stopped etc... It forces | 305 // single "playback rate" over worrying about paused/stopped etc... It forces |
| 304 // all clients to manage the pause+playback rate externally, but is that | 306 // all clients to manage the pause+playback rate externally, but is that |
| 305 // really a bad thing? | 307 // really a bad thing? |
| 306 // | 308 // |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 332 // Since accelerated compositing status is only known after the first layout, | 334 // Since accelerated compositing status is only known after the first layout, |
| 333 // we delay reporting it to UMA until that time. | 335 // we delay reporting it to UMA until that time. |
| 334 bool accelerated_compositing_reported_; | 336 bool accelerated_compositing_reported_; |
| 335 | 337 |
| 336 bool incremented_externally_allocated_memory_; | 338 bool incremented_externally_allocated_memory_; |
| 337 | 339 |
| 338 WebKit::WebAudioSourceProvider* audio_source_provider_; | 340 WebKit::WebAudioSourceProvider* audio_source_provider_; |
| 339 | 341 |
| 340 bool is_local_source_; | 342 bool is_local_source_; |
| 341 | 343 |
| 344 // The decryptor that manages decryption keys and decrypts encrypted frames. | |
| 345 scoped_ptr<webkit_media::ProxyDecryptor> decryptor_; | |
|
scherkus (not reviewing)
2012/06/28 18:32:52
this doesn't even have to be a scoped_ptr<> :)
ddorwin
2012/06/28 22:15:38
Yes, that's what I was trying to say. Just do:
web
xhwang
2012/06/28 23:31:42
Done.
| |
| 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 |