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

Unified Diff: webkit/glue/webmediaplayer_impl.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webmediaplayer_impl.cc
===================================================================
--- webkit/glue/webmediaplayer_impl.cc (revision 97713)
+++ webkit/glue/webmediaplayer_impl.cc (working copy)
@@ -9,6 +9,8 @@
#include "base/callback.h"
#include "base/command_line.h"
+
+#include "content/renderer/render_audiosourceprovider.h"
#include "media/base/composite_data_source_factory.h"
#include "media/base/filter_collection.h"
#include "media/base/limits.h"
@@ -86,10 +88,12 @@
WebMediaPlayerImpl::WebMediaPlayerImpl(
WebKit::WebMediaPlayerClient* client,
media::FilterCollection* collection,
+ media::AudioRendererSink::RenderCallback* audio_render_callback,
media::MessageLoopFactory* message_loop_factory,
MediaStreamClient* media_stream_client,
media::MediaLog* media_log)
- : network_state_(WebKit::WebMediaPlayer::Empty),
+ : audio_source_provider_(0),
+ network_state_(WebKit::WebMediaPlayer::Empty),
ready_state_(WebKit::WebMediaPlayer::HaveNothing),
main_loop_(NULL),
filter_collection_(collection),
@@ -107,6 +111,8 @@
main_loop_ = MessageLoop::current();
media_log_->AddEvent(
media_log_->CreateEvent(media::MediaLogEvent::WEBMEDIAPLAYER_CREATED));
+
+ audio_render_callback_ = audio_render_callback;
}
bool WebMediaPlayerImpl::Initialize(
@@ -812,4 +818,16 @@
return client_;
}
+WebKit::WebAudioSourceProvider* WebMediaPlayerImpl::audioSourceProvider() {
+ if (!audio_render_callback_)
+ return NULL;
+
+ if (!audio_source_provider_) {
+ // FIXME: should NOT call this in real-time audio thread...
+ audio_source_provider_ = new RenderAudioSourceProvider(audio_render_callback_);
+ }
+
+ return audio_source_provider_;
+}
+
} // namespace webkit_glue
« no previous file with comments | « webkit/glue/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698