Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: webkit/renderer/media/webmediaplayer_impl.h

Issue 18123002: Migrate webkit/renderer/media/ to content/renderer/media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use closure Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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;
69 class WebAudioSourceProviderImpl; 68 class WebAudioSourceProviderImpl;
70 class WebMediaPlayerDelegate; 69 class WebMediaPlayerDelegate;
71 class WebMediaPlayerParams; 70 class WebMediaPlayerParams;
72 class WebTextTrackImpl; 71 class WebTextTrackImpl;
73 72
74 class WebMediaPlayerImpl 73 class WebMediaPlayerImpl
75 : public WebKit::WebMediaPlayer, 74 : public WebKit::WebMediaPlayer,
76 public cc::VideoFrameProvider, 75 public cc::VideoFrameProvider,
77 public base::MessageLoop::DestructionObserver, 76 public base::MessageLoop::DestructionObserver,
78 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 77 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void OnNeedKey(const std::string& type, 197 void OnNeedKey(const std::string& type,
199 const std::string& session_id, 198 const std::string& session_id,
200 scoped_ptr<uint8[]> init_data, 199 scoped_ptr<uint8[]> init_data,
201 int init_data_size); 200 int init_data_size);
202 scoped_ptr<media::TextTrack> OnTextTrack(media::TextKind kind, 201 scoped_ptr<media::TextTrack> OnTextTrack(media::TextKind kind,
203 const std::string& label, 202 const std::string& label,
204 const std::string& language); 203 const std::string& language);
205 void SetOpaque(bool); 204 void SetOpaque(bool);
206 205
207 private: 206 private:
208 // Contains common logic used across the different types loading. 207 // Called after |defer_load_cb_| has decided to allow the load. If
209 void LoadSetup(const WebKit::WebURL& url); 208 // |defer_load_cb_| is null this is called immediately.
209 void DoLoad(const WebKit::WebURL& url,
210 WebKit::WebMediaSource* media_source,
211 CORSMode cors_mode);
210 212
211 // Called after asynchronous initialization of a data source completed. 213 // Called after asynchronous initialization of a data source completed.
212 void DataSourceInitialized(const GURL& gurl, bool success); 214 void DataSourceInitialized(const GURL& gurl, bool success);
213 215
214 // Called when the data source is downloading or paused. 216 // Called when the data source is downloading or paused.
215 void NotifyDownloading(bool is_downloading); 217 void NotifyDownloading(bool is_downloading);
216 218
217 // Finishes starting the pipeline due to a call to load(). 219 // Finishes starting the pipeline due to a call to load().
218 // 220 //
219 // A non-null |media_source| will construct a Media Source pipeline. 221 // A non-null |media_source| will construct a Media Source pipeline.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 300
299 // Seek gets pending if another seek is in progress. Only last pending seek 301 // Seek gets pending if another seek is in progress. Only last pending seek
300 // will have effect. 302 // will have effect.
301 bool pending_seek_; 303 bool pending_seek_;
302 double pending_seek_seconds_; 304 double pending_seek_seconds_;
303 305
304 WebKit::WebMediaPlayerClient* client_; 306 WebKit::WebMediaPlayerClient* client_;
305 307
306 base::WeakPtr<WebMediaPlayerDelegate> delegate_; 308 base::WeakPtr<WebMediaPlayerDelegate> delegate_;
307 309
308 MediaStreamClient* media_stream_client_; 310 base::Callback<void(const base::Closure&)> defer_load_cb_;
309 311
310 scoped_refptr<media::MediaLog> media_log_; 312 scoped_refptr<media::MediaLog> media_log_;
311 313
312 // Since accelerated compositing status is only known after the first layout, 314 // Since accelerated compositing status is only known after the first layout,
313 // we delay reporting it to UMA until that time. 315 // we delay reporting it to UMA until that time.
314 bool accelerated_compositing_reported_; 316 bool accelerated_compositing_reported_;
315 317
316 bool incremented_externally_allocated_memory_; 318 bool incremented_externally_allocated_memory_;
317 319
318 // Factories for supporting GpuVideoDecoder. May be null. 320 // Factories for supporting GpuVideoDecoder. May be null.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 366
365 // Text track objects get a unique index value when they're created. 367 // Text track objects get a unique index value when they're created.
366 int text_track_index_; 368 int text_track_index_;
367 369
368 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 370 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
369 }; 371 };
370 372
371 } // namespace webkit_media 373 } // namespace webkit_media
372 374
373 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 375 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698