| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 class WebLayerImpl; | 60 class WebLayerImpl; |
| 61 } | 61 } |
| 62 | 62 |
| 63 namespace webkit_media { | 63 namespace webkit_media { |
| 64 | 64 |
| 65 class BufferedDataSource; | 65 class BufferedDataSource; |
| 66 class MediaStreamClient; | 66 class MediaStreamClient; |
| 67 class WebAudioSourceProviderImpl; | 67 class WebAudioSourceProviderImpl; |
| 68 class WebMediaPlayerDelegate; | 68 class WebMediaPlayerDelegate; |
| 69 class WebMediaPlayerParams; | 69 class WebMediaPlayerParams; |
| 70 class WebInbandTextTrackImpl; |
| 70 | 71 |
| 71 class WebMediaPlayerImpl | 72 class WebMediaPlayerImpl |
| 72 : public WebKit::WebMediaPlayer, | 73 : public WebKit::WebMediaPlayer, |
| 73 public cc::VideoFrameProvider, | 74 public cc::VideoFrameProvider, |
| 74 public MessageLoop::DestructionObserver, | 75 public MessageLoop::DestructionObserver, |
| 75 public base::SupportsWeakPtr<WebMediaPlayerImpl> { | 76 public base::SupportsWeakPtr<WebMediaPlayerImpl> { |
| 76 public: | 77 public: |
| 77 // Constructs a WebMediaPlayer implementation using Chromium's media stack. | 78 // Constructs a WebMediaPlayer implementation using Chromium's media stack. |
| 78 // | 79 // |
| 79 // |delegate| may be null. | 80 // |delegate| may be null. |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 int system_code); | 203 int system_code); |
| 203 void OnKeyMessage(const std::string& key_system, | 204 void OnKeyMessage(const std::string& key_system, |
| 204 const std::string& session_id, | 205 const std::string& session_id, |
| 205 const std::string& message, | 206 const std::string& message, |
| 206 const std::string& default_url); | 207 const std::string& default_url); |
| 207 void OnNeedKey(const std::string& key_system, | 208 void OnNeedKey(const std::string& key_system, |
| 208 const std::string& type, | 209 const std::string& type, |
| 209 const std::string& session_id, | 210 const std::string& session_id, |
| 210 scoped_array<uint8> init_data, | 211 scoped_array<uint8> init_data, |
| 211 int init_data_size); | 212 int init_data_size); |
| 213 void OnTextTrack(const media::TextKind kind, |
| 214 const std::string& label, |
| 215 const std::string& language); |
| 216 void OnText(const base::TimeDelta& time); |
| 212 void SetOpaque(bool); | 217 void SetOpaque(bool); |
| 213 | 218 |
| 214 private: | 219 private: |
| 215 // Contains common logic used across the different types loading. | 220 // Contains common logic used across the different types loading. |
| 216 void LoadSetup(const WebKit::WebURL& url); | 221 void LoadSetup(const WebKit::WebURL& url); |
| 217 | 222 |
| 218 // Called after asynchronous initialization of a data source completed. | 223 // Called after asynchronous initialization of a data source completed. |
| 219 void DataSourceInitialized(const GURL& gurl, bool success); | 224 void DataSourceInitialized(const GURL& gurl, bool success); |
| 220 | 225 |
| 221 // Called when the data source is downloading or paused. | 226 // Called when the data source is downloading or paused. |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 // The compositor layer for displaying the video content when using composited | 360 // The compositor layer for displaying the video content when using composited |
| 356 // playback. | 361 // playback. |
| 357 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; | 362 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; |
| 358 | 363 |
| 359 // A pointer back to the compositor to inform it about state changes. This is | 364 // A pointer back to the compositor to inform it about state changes. This is |
| 360 // not NULL while the compositor is actively using this webmediaplayer. | 365 // not NULL while the compositor is actively using this webmediaplayer. |
| 361 cc::VideoFrameProvider::Client* video_frame_provider_client_; | 366 cc::VideoFrameProvider::Client* video_frame_provider_client_; |
| 362 | 367 |
| 363 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; | 368 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; |
| 364 | 369 |
| 370 // TODO(matthewjheaney): resolve cardinality |
| 371 scoped_refptr<WebInbandTextTrackImpl> text_track_; |
| 372 |
| 365 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 373 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 366 }; | 374 }; |
| 367 | 375 |
| 368 } // namespace webkit_media | 376 } // namespace webkit_media |
| 369 | 377 |
| 370 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 378 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |