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

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

Issue 8980008: Integrate HTMLMediaElement with Web Audio API's MediaElementAudioSourceNode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PipelineImpl which is the actual media player pipeline, it glues 6 // It contains PipelineImpl 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 // PipelineImpl would creates multiple threads and access some public methods 8 // PipelineImpl 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 48 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
49 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 49 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
50 50
51 #include "base/memory/ref_counted.h" 51 #include "base/memory/ref_counted.h"
52 #include "base/memory/scoped_ptr.h" 52 #include "base/memory/scoped_ptr.h"
53 #include "base/memory/weak_ptr.h" 53 #include "base/memory/weak_ptr.h"
54 #include "base/message_loop.h" 54 #include "base/message_loop.h"
55 #include "media/base/filters.h" 55 #include "media/base/filters.h"
56 #include "media/base/message_loop_factory.h" 56 #include "media/base/message_loop_factory.h"
57 #include "media/base/pipeline.h" 57 #include "media/base/pipeline.h"
58 #include "media/filters/audio_renderer_sink.h"
58 #include "skia/ext/platform_canvas.h" 59 #include "skia/ext/platform_canvas.h"
59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" 60 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
60 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h" 61 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h"
61 62
63 class RenderAudioSourceProvider;
64
62 namespace WebKit { 65 namespace WebKit {
66 class WebAudioSourceProvider;
67 class WebAudioSourceProviderClient;
63 class WebFrame; 68 class WebFrame;
64 } 69 }
65 70
66 namespace media { 71 namespace media {
67 class MediaLog; 72 class MediaLog;
68 } 73 }
69 74
70 namespace webkit_media { 75 namespace webkit_media {
71 76
72 class MediaStreamClient; 77 class MediaStreamClient;
(...skipping 23 matching lines...) Expand all
96 // provided by WebKit to perform renderering. The simple data source does 101 // provided by WebKit to perform renderering. The simple data source does
97 // resource loading by loading the whole resource object into memory. Null 102 // resource loading by loading the whole resource object into memory. Null
98 // audio renderer is a fake audio device that plays silence. Provider of the 103 // audio renderer is a fake audio device that plays silence. Provider of the
99 // |collection| can override the default filters by adding extra filters to 104 // |collection| can override the default filters by adding extra filters to
100 // |collection| before calling this method. 105 // |collection| before calling this method.
101 // 106 //
102 // Callers must call |Initialize()| before they can use the object. 107 // Callers must call |Initialize()| before they can use the object.
103 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, 108 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client,
104 base::WeakPtr<WebMediaPlayerDelegate> delegate, 109 base::WeakPtr<WebMediaPlayerDelegate> delegate,
105 media::FilterCollection* collection, 110 media::FilterCollection* collection,
111 media::AudioRendererSink::RenderCallback* render_callback,
106 media::MessageLoopFactory* message_loop_factory, 112 media::MessageLoopFactory* message_loop_factory,
107 MediaStreamClient* media_stream_client, 113 MediaStreamClient* media_stream_client,
108 media::MediaLog* media_log); 114 media::MediaLog* media_log);
109 virtual ~WebMediaPlayerImpl(); 115 virtual ~WebMediaPlayerImpl();
110 116
111 // Finalizes initialization of the object. 117 // Finalizes initialization of the object.
112 bool Initialize(WebKit::WebFrame* frame, bool use_simple_data_source); 118 bool Initialize(WebKit::WebFrame* frame, bool use_simple_data_source);
113 119
114 virtual void load(const WebKit::WebURL& url); 120 virtual void load(const WebKit::WebURL& url);
115 virtual void cancelLoad(); 121 virtual void cancelLoad();
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 virtual float mediaTimeForTimeValue(float timeValue) const; 171 virtual float mediaTimeForTimeValue(float timeValue) const;
166 172
167 virtual unsigned decodedFrameCount() const; 173 virtual unsigned decodedFrameCount() const;
168 virtual unsigned droppedFrameCount() const; 174 virtual unsigned droppedFrameCount() const;
169 virtual unsigned audioDecodedByteCount() const; 175 virtual unsigned audioDecodedByteCount() const;
170 virtual unsigned videoDecodedByteCount() const; 176 virtual unsigned videoDecodedByteCount() const;
171 177
172 virtual WebKit::WebVideoFrame* getCurrentFrame(); 178 virtual WebKit::WebVideoFrame* getCurrentFrame();
173 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); 179 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame);
174 180
181 virtual WebKit::WebAudioSourceProvider* audioSourceProvider();
182 scoped_refptr<RenderAudioSourceProvider> audio_source_provider_;
tommi (sloooow) - chröme 2011/12/19 15:26:24 make member variables private.
Chris Rogers 2011/12/19 21:40:35 Done.
183 media::AudioRendererSink::RenderCallback* audio_sink_render_callback_;
184
175 virtual bool sourceAppend(const unsigned char* data, unsigned length); 185 virtual bool sourceAppend(const unsigned char* data, unsigned length);
176 virtual void sourceEndOfStream(EndOfStreamStatus status); 186 virtual void sourceEndOfStream(EndOfStreamStatus status);
177 187
178 // As we are closing the tab or even the browser, |main_loop_| is destroyed 188 // As we are closing the tab or even the browser, |main_loop_| is destroyed
179 // even before this object gets destructed, so we need to know when 189 // even before this object gets destructed, so we need to know when
180 // |main_loop_| is being destroyed and we can stop posting repaint task 190 // |main_loop_| is being destroyed and we can stop posting repaint task
181 // to it. 191 // to it.
182 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; 192 virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
183 193
184 void Repaint(); 194 void Repaint();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 bool is_accelerated_compositing_active_; 273 bool is_accelerated_compositing_active_;
264 274
265 bool incremented_externally_allocated_memory_; 275 bool incremented_externally_allocated_memory_;
266 276
267 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 277 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
268 }; 278 };
269 279
270 } // namespace webkit_media 280 } // namespace webkit_media
271 281
272 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 282 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698