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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 class MediaLog; | 58 class MediaLog; |
59 } | 59 } |
60 | 60 |
61 namespace webkit { | 61 namespace webkit { |
62 class WebLayerImpl; | 62 class WebLayerImpl; |
63 } | 63 } |
64 | 64 |
65 namespace webkit_media { | 65 namespace webkit_media { |
66 | 66 |
67 class BufferedDataSource; | 67 class BufferedDataSource; |
68 class MediaStreamClient; | 68 class MediaLoadDelegate; |
69 class WebAudioSourceProviderImpl; | 69 class WebAudioSourceProviderImpl; |
70 class WebMediaPlayerDelegate; | 70 class WebMediaPlayerDelegate; |
71 class WebMediaPlayerParams; | 71 class WebMediaPlayerParams; |
72 class WebTextTrackImpl; | 72 class WebTextTrackImpl; |
73 | 73 |
74 class WebMediaPlayerImpl | 74 class WebMediaPlayerImpl |
75 : public WebKit::WebMediaPlayer, | 75 : public WebKit::WebMediaPlayer, |
76 public cc::VideoFrameProvider, | 76 public cc::VideoFrameProvider, |
77 public base::MessageLoop::DestructionObserver, | 77 public base::MessageLoop::DestructionObserver, |
78 public base::SupportsWeakPtr<WebMediaPlayerImpl> { | 78 public base::SupportsWeakPtr<WebMediaPlayerImpl> { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 void OnNeedKey(const std::string& type, | 198 void OnNeedKey(const std::string& type, |
199 const std::string& session_id, | 199 const std::string& session_id, |
200 scoped_ptr<uint8[]> init_data, | 200 scoped_ptr<uint8[]> init_data, |
201 int init_data_size); | 201 int init_data_size); |
202 scoped_ptr<media::TextTrack> OnTextTrack(media::TextKind kind, | 202 scoped_ptr<media::TextTrack> OnTextTrack(media::TextKind kind, |
203 const std::string& label, | 203 const std::string& label, |
204 const std::string& language); | 204 const std::string& language); |
205 void SetOpaque(bool); | 205 void SetOpaque(bool); |
206 | 206 |
207 private: | 207 private: |
208 // Contains common logic used across the different types loading. | 208 // Called after |load_delegate_| has decided to allow the load. If |
209 void LoadSetup(const WebKit::WebURL& url); | 209 // |load_delegate_| is NULL this is called immediately. |
210 void ContinueLoad(const WebKit::WebURL& url, | |
ddorwin
2013/06/29 01:38:30
nit: "Continue" implies there was a previous step.
scherkus (not reviewing)
2013/07/02 01:46:23
Done.
| |
211 WebKit::WebMediaSource* media_source, | |
212 CORSMode cors_mode); | |
210 | 213 |
211 // Called after asynchronous initialization of a data source completed. | 214 // Called after asynchronous initialization of a data source completed. |
212 void DataSourceInitialized(const GURL& gurl, bool success); | 215 void DataSourceInitialized(const GURL& gurl, bool success); |
213 | 216 |
214 // Called when the data source is downloading or paused. | 217 // Called when the data source is downloading or paused. |
215 void NotifyDownloading(bool is_downloading); | 218 void NotifyDownloading(bool is_downloading); |
216 | 219 |
217 // Finishes starting the pipeline due to a call to load(). | 220 // Finishes starting the pipeline due to a call to load(). |
218 // | 221 // |
219 // A non-null |media_source| will construct a Media Source pipeline. | 222 // A non-null |media_source| will construct a Media Source pipeline. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
298 | 301 |
299 // Seek gets pending if another seek is in progress. Only last pending seek | 302 // Seek gets pending if another seek is in progress. Only last pending seek |
300 // will have effect. | 303 // will have effect. |
301 bool pending_seek_; | 304 bool pending_seek_; |
302 double pending_seek_seconds_; | 305 double pending_seek_seconds_; |
303 | 306 |
304 WebKit::WebMediaPlayerClient* client_; | 307 WebKit::WebMediaPlayerClient* client_; |
305 | 308 |
306 base::WeakPtr<WebMediaPlayerDelegate> delegate_; | 309 base::WeakPtr<WebMediaPlayerDelegate> delegate_; |
307 | 310 |
308 MediaStreamClient* media_stream_client_; | 311 MediaLoadDelegate* load_delegate_; |
309 | 312 |
310 scoped_refptr<media::MediaLog> media_log_; | 313 scoped_refptr<media::MediaLog> media_log_; |
311 | 314 |
312 // Since accelerated compositing status is only known after the first layout, | 315 // Since accelerated compositing status is only known after the first layout, |
313 // we delay reporting it to UMA until that time. | 316 // we delay reporting it to UMA until that time. |
314 bool accelerated_compositing_reported_; | 317 bool accelerated_compositing_reported_; |
315 | 318 |
316 bool incremented_externally_allocated_memory_; | 319 bool incremented_externally_allocated_memory_; |
317 | 320 |
318 // Factories for supporting GpuVideoDecoder. May be null. | 321 // Factories for supporting GpuVideoDecoder. May be null. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
364 | 367 |
365 // Text track objects get a unique index value when they're created. | 368 // Text track objects get a unique index value when they're created. |
366 int text_track_index_; | 369 int text_track_index_; |
367 | 370 |
368 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 371 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
369 }; | 372 }; |
370 | 373 |
371 } // namespace webkit_media | 374 } // namespace webkit_media |
372 | 375 |
373 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 376 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |