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

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

Issue 10808089: Merge 146897 - WebMediaPlayerImpl needs to own the audio source provider. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 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
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h" 66 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h"
67 67
68 class RenderAudioSourceProvider; 68 class RenderAudioSourceProvider;
69 69
70 namespace WebKit { 70 namespace WebKit {
71 class WebAudioSourceProvider; 71 class WebAudioSourceProvider;
72 class WebFrame; 72 class WebFrame;
73 } 73 }
74 74
75 namespace media { 75 namespace media {
76 class AesDecryptor; 76 class AudioRendererSink;
77 class MediaLog; 77 class MediaLog;
78 } 78 }
79 79
80 namespace webkit_media { 80 namespace webkit_media {
81 81
82 class MediaStreamClient; 82 class MediaStreamClient;
83 class WebMediaPlayerDelegate; 83 class WebMediaPlayerDelegate;
84 class WebMediaPlayerProxy; 84 class WebMediaPlayerProxy;
85 85
86 class WebMediaPlayerImpl 86 class WebMediaPlayerImpl
87 : public WebKit::WebMediaPlayer, 87 : public WebKit::WebMediaPlayer,
88 public MessageLoop::DestructionObserver, 88 public MessageLoop::DestructionObserver,
89 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 89 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
90 public: 90 public:
91 // Construct a WebMediaPlayerImpl with reference to the client, and media 91 // Construct a WebMediaPlayerImpl with reference to the client, and media
92 // filter collection. By providing the filter collection the implementor can 92 // filter collection. By providing the filter collection the implementor can
93 // provide more specific media filters that does resource loading and 93 // provide more specific media filters that does resource loading and
94 // rendering. 94 // rendering.
95 // 95 //
96 // WebMediaPlayerImpl comes packaged with the following media filters: 96 // WebMediaPlayerImpl comes packaged with the following media filters:
97 // - URL fetching 97 // - URL fetching
98 // - Demuxing 98 // - Demuxing
99 // - Software audio/video decoding 99 // - Software audio/video decoding
100 // - Video rendering 100 // - Video rendering
101 // 101 //
102 // Clients are expected to add their platform-specific audio rendering media 102 // Clients are expected to add their platform-specific audio rendering media
103 // filter if they wish to hear any sound coming out the speakers, otherwise 103 // filter if they wish to hear any sound coming out the speakers, otherwise
104 // audio data is discarded and media plays back based on wall clock time. 104 // audio data is discarded and media plays back based on wall clock time.
105 // 105 //
106 // When calling this, the |audio_source_provider| and
107 // |audio_renderer_sink| arguments should be the same object.
108 //
109 // TODO(scherkus): Remove WebAudioSourceProvider parameter once we
110 // refactor RenderAudioSourceProvider to live under webkit/media/
111 // instead of content/renderer/, see http://crbug.com/136442
112
106 WebMediaPlayerImpl(WebKit::WebFrame* frame, 113 WebMediaPlayerImpl(WebKit::WebFrame* frame,
107 WebKit::WebMediaPlayerClient* client, 114 WebKit::WebMediaPlayerClient* client,
108 base::WeakPtr<WebMediaPlayerDelegate> delegate, 115 base::WeakPtr<WebMediaPlayerDelegate> delegate,
109 media::FilterCollection* collection, 116 media::FilterCollection* collection,
110 WebKit::WebAudioSourceProvider* audio_source_provider, 117 WebKit::WebAudioSourceProvider* audio_source_provider,
118 media::AudioRendererSink* audio_renderer_sink,
111 media::MessageLoopFactory* message_loop_factory, 119 media::MessageLoopFactory* message_loop_factory,
112 MediaStreamClient* media_stream_client, 120 MediaStreamClient* media_stream_client,
113 media::MediaLog* media_log); 121 media::MediaLog* media_log);
114 virtual ~WebMediaPlayerImpl(); 122 virtual ~WebMediaPlayerImpl();
115 123
116 virtual void load(const WebKit::WebURL& url, CORSMode cors_mode); 124 virtual void load(const WebKit::WebURL& url, CORSMode cors_mode);
117 virtual void cancelLoad(); 125 virtual void cancelLoad();
118 126
119 // Playback controls. 127 // Playback controls.
120 virtual void play(); 128 virtual void play();
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 scoped_refptr<media::MediaLog> media_log_; 339 scoped_refptr<media::MediaLog> media_log_;
332 340
333 // Since accelerated compositing status is only known after the first layout, 341 // Since accelerated compositing status is only known after the first layout,
334 // we delay reporting it to UMA until that time. 342 // we delay reporting it to UMA until that time.
335 bool accelerated_compositing_reported_; 343 bool accelerated_compositing_reported_;
336 344
337 bool incremented_externally_allocated_memory_; 345 bool incremented_externally_allocated_memory_;
338 346
339 WebKit::WebAudioSourceProvider* audio_source_provider_; 347 WebKit::WebAudioSourceProvider* audio_source_provider_;
340 348
349 scoped_refptr<media::AudioRendererSink> audio_renderer_sink_;
350
341 bool is_local_source_; 351 bool is_local_source_;
342 352
343 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 353 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
344 }; 354 };
345 355
346 } // namespace webkit_media 356 } // namespace webkit_media
347 357
348 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 358 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | webkit/media/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698