| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 #include "googleurl/src/gurl.h" | 57 #include "googleurl/src/gurl.h" |
| 58 #include "media/base/audio_renderer_sink.h" | 58 #include "media/base/audio_renderer_sink.h" |
| 59 #include "media/base/decryptor.h" | 59 #include "media/base/decryptor.h" |
| 60 #include "media/base/filters.h" | 60 #include "media/base/filters.h" |
| 61 #include "media/base/message_loop_factory.h" | 61 #include "media/base/message_loop_factory.h" |
| 62 #include "media/base/pipeline.h" | 62 #include "media/base/pipeline.h" |
| 63 #include "skia/ext/platform_canvas.h" | 63 #include "skia/ext/platform_canvas.h" |
| 64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide
r.h" | 64 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide
r.h" |
| 65 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" | 65 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
| 66 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.
h" | 66 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.
h" |
| 67 #include "webkit/media/crypto/key_systems.h" |
| 68 #include "webkit/media/crypto/proxy_decryptor.h" |
| 67 | 69 |
| 68 class RenderAudioSourceProvider; | 70 class RenderAudioSourceProvider; |
| 69 | 71 |
| 70 namespace WebKit { | 72 namespace WebKit { |
| 71 class WebAudioSourceProvider; | 73 class WebAudioSourceProvider; |
| 72 class WebFrame; | 74 class WebFrame; |
| 73 } | 75 } |
| 74 | 76 |
| 75 namespace media { | 77 namespace media { |
| 76 class MediaLog; | 78 class MediaLog; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 scoped_ptr<media::FilterCollection> filter_collection_; | 287 scoped_ptr<media::FilterCollection> filter_collection_; |
| 286 | 288 |
| 287 // The media pipeline and a bool tracking whether we have started it yet. | 289 // The media pipeline and a bool tracking whether we have started it yet. |
| 288 // | 290 // |
| 289 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and | 291 // TODO(scherkus): replace |started_| with a pointer check for |pipeline_| and |
| 290 // have WebMediaPlayerImpl return the default values to WebKit instead of | 292 // have WebMediaPlayerImpl return the default values to WebKit instead of |
| 291 // relying on Pipeline to take care of default values. | 293 // relying on Pipeline to take care of default values. |
| 292 scoped_refptr<media::Pipeline> pipeline_; | 294 scoped_refptr<media::Pipeline> pipeline_; |
| 293 bool started_; | 295 bool started_; |
| 294 | 296 |
| 295 // The decryptor that manages decryption keys and decrypts encrypted frames. | 297 // The currently selected key system. Empty string means that no key system |
| 296 scoped_ptr<media::Decryptor> decryptor_; | 298 // has been selected. |
| 299 WebKit::WebString current_key_system_; |
| 297 | 300 |
| 298 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; | 301 scoped_ptr<media::MessageLoopFactory> message_loop_factory_; |
| 299 | 302 |
| 300 // Playback state. | 303 // Playback state. |
| 301 // | 304 // |
| 302 // TODO(scherkus): we have these because Pipeline favours the simplicity of a | 305 // TODO(scherkus): we have these because Pipeline favours the simplicity of a |
| 303 // single "playback rate" over worrying about paused/stopped etc... It forces | 306 // single "playback rate" over worrying about paused/stopped etc... It forces |
| 304 // all clients to manage the pause+playback rate externally, but is that | 307 // all clients to manage the pause+playback rate externally, but is that |
| 305 // really a bad thing? | 308 // really a bad thing? |
| 306 // | 309 // |
| (...skipping 25 matching lines...) Expand all Loading... |
| 332 // Since accelerated compositing status is only known after the first layout, | 335 // Since accelerated compositing status is only known after the first layout, |
| 333 // we delay reporting it to UMA until that time. | 336 // we delay reporting it to UMA until that time. |
| 334 bool accelerated_compositing_reported_; | 337 bool accelerated_compositing_reported_; |
| 335 | 338 |
| 336 bool incremented_externally_allocated_memory_; | 339 bool incremented_externally_allocated_memory_; |
| 337 | 340 |
| 338 WebKit::WebAudioSourceProvider* audio_source_provider_; | 341 WebKit::WebAudioSourceProvider* audio_source_provider_; |
| 339 | 342 |
| 340 bool is_local_source_; | 343 bool is_local_source_; |
| 341 | 344 |
| 345 // The decryptor that manages decryption keys and decrypts encrypted frames. |
| 346 ProxyDecryptor decryptor_; |
| 347 |
| 342 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 348 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 343 }; | 349 }; |
| 344 | 350 |
| 345 } // namespace webkit_media | 351 } // namespace webkit_media |
| 346 | 352 |
| 347 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 353 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |