Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 29 matching lines...) Expand all Loading... | |
| 40 #include "skia/ext/platform_canvas.h" | 40 #include "skia/ext/platform_canvas.h" |
| 41 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" | 41 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" |
| 42 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 42 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 43 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 43 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
| 44 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" | 44 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" |
| 45 #include "url/gurl.h" | 45 #include "url/gurl.h" |
| 46 | 46 |
| 47 class RenderAudioSourceProvider; | 47 class RenderAudioSourceProvider; |
| 48 | 48 |
| 49 namespace blink { | 49 namespace blink { |
| 50 class WebContentDecryptionModule; | |
| 50 class WebFrame; | 51 class WebFrame; |
| 51 } | 52 } |
| 52 | 53 |
| 53 namespace base { | 54 namespace base { |
| 54 class MessageLoopProxy; | 55 class MessageLoopProxy; |
| 55 } | 56 } |
| 56 | 57 |
| 57 namespace media { | 58 namespace media { |
| 58 class ChunkDemuxer; | 59 class ChunkDemuxer; |
| 59 class GpuVideoAcceleratorFactories; | 60 class GpuVideoAcceleratorFactories; |
| 60 class MediaLog; | 61 class MediaLog; |
| 61 } | 62 } |
| 62 | 63 |
| 63 namespace webkit { | 64 namespace webkit { |
| 64 class WebLayerImpl; | 65 class WebLayerImpl; |
| 65 } | 66 } |
| 66 | 67 |
| 67 namespace content { | 68 namespace content { |
| 68 class BufferedDataSource; | 69 class BufferedDataSource; |
| 69 class WebAudioSourceProviderImpl; | 70 class WebAudioSourceProviderImpl; |
| 71 class WebContentDecryptionModuleImpl; | |
| 70 class WebMediaPlayerDelegate; | 72 class WebMediaPlayerDelegate; |
| 71 class WebMediaPlayerParams; | 73 class WebMediaPlayerParams; |
| 72 class WebTextTrackImpl; | 74 class WebTextTrackImpl; |
| 73 | 75 |
| 74 class WebMediaPlayerImpl | 76 class WebMediaPlayerImpl |
| 75 : public blink::WebMediaPlayer, | 77 : public blink::WebMediaPlayer, |
| 76 public cc::VideoFrameProvider, | 78 public cc::VideoFrameProvider, |
| 77 public content::RenderViewObserver, | 79 public content::RenderViewObserver, |
| 78 public base::SupportsWeakPtr<WebMediaPlayerImpl> { | 80 public base::SupportsWeakPtr<WebMediaPlayerImpl> { |
| 79 public: | 81 public: |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 const unsigned char* key, | 170 const unsigned char* key, |
| 169 unsigned key_length, | 171 unsigned key_length, |
| 170 const unsigned char* init_data, | 172 const unsigned char* init_data, |
| 171 unsigned init_data_length, | 173 unsigned init_data_length, |
| 172 const blink::WebString& session_id); | 174 const blink::WebString& session_id); |
| 173 | 175 |
| 174 virtual MediaKeyException cancelKeyRequest( | 176 virtual MediaKeyException cancelKeyRequest( |
| 175 const blink::WebString& key_system, | 177 const blink::WebString& key_system, |
| 176 const blink::WebString& session_id); | 178 const blink::WebString& session_id); |
| 177 | 179 |
| 180 virtual void contentDecryptionModuleChanged( | |
| 181 blink::WebContentDecryptionModule* cdm); | |
| 182 | |
| 178 // content::RenderViewObserver implementation. | 183 // content::RenderViewObserver implementation. |
| 179 virtual void OnDestruct() OVERRIDE; | 184 virtual void OnDestruct() OVERRIDE; |
| 180 | 185 |
| 181 void Repaint(); | 186 void Repaint(); |
| 182 | 187 |
| 183 void OnPipelineSeek(media::PipelineStatus status); | 188 void OnPipelineSeek(media::PipelineStatus status); |
| 184 void OnPipelineEnded(); | 189 void OnPipelineEnded(); |
| 185 void OnPipelineError(media::PipelineStatus error); | 190 void OnPipelineError(media::PipelineStatus error); |
| 186 void OnPipelineBufferingState( | 191 void OnPipelineBufferingState( |
| 187 media::Pipeline::BufferingState buffering_state); | 192 media::Pipeline::BufferingState buffering_state); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 366 // playback. | 371 // playback. |
| 367 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; | 372 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; |
| 368 | 373 |
| 369 // A pointer back to the compositor to inform it about state changes. This is | 374 // A pointer back to the compositor to inform it about state changes. This is |
| 370 // not NULL while the compositor is actively using this webmediaplayer. | 375 // not NULL while the compositor is actively using this webmediaplayer. |
| 371 cc::VideoFrameProvider::Client* video_frame_provider_client_; | 376 cc::VideoFrameProvider::Client* video_frame_provider_client_; |
| 372 | 377 |
| 373 // Text track objects get a unique index value when they're created. | 378 // Text track objects get a unique index value when they're created. |
| 374 int text_track_index_; | 379 int text_track_index_; |
| 375 | 380 |
| 381 // Non-owned pointer to the CDM. Updated via calls to | |
| 382 // contentDecryptionModuleChanged(). | |
| 383 WebContentDecryptionModuleImpl* cdm_; | |
|
ddorwin
2013/12/20 05:26:14
Because we have multiple levels of CDM, it might b
jrummell
2013/12/20 23:32:10
Done.
| |
| 384 | |
| 376 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 385 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 377 }; | 386 }; |
| 378 | 387 |
| 379 } // namespace content | 388 } // namespace content |
| 380 | 389 |
| 381 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 390 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |