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

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

Issue 7631033: Very early implementation for HTMLMediaElement / Web Audio API integration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | « media/filters/audio_renderer_sink.h ('k') | webkit/glue/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) 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 #ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ 48 #ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
49 #define WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ 49 #define WEBKIT_GLUE_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/message_loop.h" 53 #include "base/message_loop.h"
54 #include "media/base/filters.h" 54 #include "media/base/filters.h"
55 #include "media/base/message_loop_factory.h" 55 #include "media/base/message_loop_factory.h"
56 #include "media/base/pipeline.h" 56 #include "media/base/pipeline.h"
57 #include "media/filters/audio_renderer_sink.h"
57 #include "skia/ext/platform_canvas.h" 58 #include "skia/ext/platform_canvas.h"
58 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" 59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h"
59 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h" 60 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient. h"
60 61
61 class GURL; 62 class GURL;
62 63
64 class RenderAudioSourceProvider;
65
63 namespace WebKit { 66 namespace WebKit {
64 class WebFrame; 67 class WebFrame;
65 } 68 }
66 69
67 namespace media { 70 namespace media {
68 class MediaLog; 71 class MediaLog;
69 } 72 }
70 73
71 namespace webkit_glue { 74 namespace webkit_glue {
72 75
(...skipping 23 matching lines...) Expand all
96 // The video renderer provided by this class is using the graphics context 99 // The video renderer provided by this class is using the graphics context
97 // provided by WebKit to perform renderering. The simple data source does 100 // provided by WebKit to perform renderering. The simple data source does
98 // resource loading by loading the whole resource object into memory. Null 101 // resource loading by loading the whole resource object into memory. Null
99 // audio renderer is a fake audio device that plays silence. Provider of the 102 // audio renderer is a fake audio device that plays silence. Provider of the
100 // |collection| can override the default filters by adding extra filters to 103 // |collection| can override the default filters by adding extra filters to
101 // |collection| before calling this method. 104 // |collection| before calling this method.
102 // 105 //
103 // Callers must call |Initialize()| before they can use the object. 106 // Callers must call |Initialize()| before they can use the object.
104 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, 107 WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client,
105 media::FilterCollection* collection, 108 media::FilterCollection* collection,
109 media::AudioRendererSink::RenderCallback* audio_render_call back,
106 media::MessageLoopFactory* message_loop_factory, 110 media::MessageLoopFactory* message_loop_factory,
107 MediaStreamClient* media_stream_client, 111 MediaStreamClient* media_stream_client,
108 media::MediaLog* media_log); 112 media::MediaLog* media_log);
109 virtual ~WebMediaPlayerImpl(); 113 virtual ~WebMediaPlayerImpl();
110 114
111 // Finalizes initialization of the object. 115 // Finalizes initialization of the object.
112 bool Initialize( 116 bool Initialize(
113 WebKit::WebFrame* frame, 117 WebKit::WebFrame* frame,
114 bool use_simple_data_source, 118 bool use_simple_data_source,
115 scoped_refptr<WebVideoRenderer> web_video_renderer); 119 scoped_refptr<WebVideoRenderer> web_video_renderer);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 virtual float mediaTimeForTimeValue(float timeValue) const; 172 virtual float mediaTimeForTimeValue(float timeValue) const;
169 173
170 virtual unsigned decodedFrameCount() const; 174 virtual unsigned decodedFrameCount() const;
171 virtual unsigned droppedFrameCount() const; 175 virtual unsigned droppedFrameCount() const;
172 virtual unsigned audioDecodedByteCount() const; 176 virtual unsigned audioDecodedByteCount() const;
173 virtual unsigned videoDecodedByteCount() const; 177 virtual unsigned videoDecodedByteCount() const;
174 178
175 virtual WebKit::WebVideoFrame* getCurrentFrame(); 179 virtual WebKit::WebVideoFrame* getCurrentFrame();
176 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); 180 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame);
177 181
182 virtual WebKit::WebAudioSourceProvider* audioSourceProvider();
183 scoped_refptr<RenderAudioSourceProvider> audio_source_provider_;
184 media::AudioRendererSink::RenderCallback* audio_render_callback_;
185
178 // TODO(acolwell): Uncomment once WebKit changes are checked in. 186 // TODO(acolwell): Uncomment once WebKit changes are checked in.
179 // https://bugs.webkit.org/show_bug.cgi?id=64731 187 // https://bugs.webkit.org/show_bug.cgi?id=64731
180 //virtual bool sourceAppend(const unsigned char* data, unsigned length); 188 //virtual bool sourceAppend(const unsigned char* data, unsigned length);
181 //virtual void sourceEndOfStream(EndOfStreamStatus status); 189 //virtual void sourceEndOfStream(EndOfStreamStatus status);
182 190
183 // As we are closing the tab or even the browser, |main_loop_| is destroyed 191 // As we are closing the tab or even the browser, |main_loop_| is destroyed
184 // even before this object gets destructed, so we need to know when 192 // even before this object gets destructed, so we need to know when
185 // |main_loop_| is being destroyed and we can stop posting repaint task 193 // |main_loop_| is being destroyed and we can stop posting repaint task
186 // to it. 194 // to it.
187 virtual void WillDestroyCurrentMessageLoop(); 195 virtual void WillDestroyCurrentMessageLoop();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 #endif 262 #endif
255 263
256 scoped_refptr<media::MediaLog> media_log_; 264 scoped_refptr<media::MediaLog> media_log_;
257 265
258 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 266 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
259 }; 267 };
260 268
261 } // namespace webkit_glue 269 } // namespace webkit_glue
262 270
263 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ 271 #endif // WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_sink.h ('k') | webkit/glue/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698