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

Unified Diff: webkit/glue/webkitplatformsupport_impl.cc

Issue 12457043: Android implementation of WebAudio audio file decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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/webkitplatformsupport_impl.h ('k') | webkit/media/android/audio_decoder_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webkitplatformsupport_impl.cc
diff --git a/webkit/glue/webkitplatformsupport_impl.cc b/webkit/glue/webkitplatformsupport_impl.cc
index e6b92363486d4e937c8ff19c17d616e909602f1e..445fc2552036dfc4dd3a5d200d46b531ae8e40c5 100644
--- a/webkit/glue/webkitplatformsupport_impl.cc
+++ b/webkit/glue/webkitplatformsupport_impl.cc
@@ -121,6 +121,13 @@ class MemoryUsageCache {
base::Lock lock_;
};
+#if defined(OS_ANDROID)
+void NullRunWebAudioMediaCodec(
+ base::SharedMemoryHandle encoded_data_handle,
+ base::FileDescriptor pcm_output) {
+}
+#endif
+
} // anonymous namespace
namespace webkit_glue {
@@ -675,10 +682,20 @@ WebData WebKitPlatformSupportImpl::loadResource(const char* name) {
bool WebKitPlatformSupportImpl::loadAudioResource(
WebKit::WebAudioBus* destination_bus, const char* audio_file_data,
size_t data_size, double sample_rate) {
+#if !defined(OS_ANDROID)
return webkit_media::DecodeAudioFileData(destination_bus,
audio_file_data,
data_size,
sample_rate);
+#else
+ webkit_media::WebAudioMediaCodecRunner runner = GetWebAudioMediaCodecRunner();
+ return webkit_media::DecodeAudioFileData(
+ destination_bus,
+ audio_file_data,
+ data_size,
+ sample_rate,
+ runner);
+#endif
}
WebString WebKitPlatformSupportImpl::queryLocalizedString(
@@ -961,5 +978,11 @@ WebKit::WebDiscardableMemory*
return NULL;
}
+#if defined(OS_ANDROID)
+webkit_media::WebAudioMediaCodecRunner
+ WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() {
+ return base::Bind(&NullRunWebAudioMediaCodec);
+}
+#endif
} // namespace webkit_glue
« no previous file with comments | « webkit/glue/webkitplatformsupport_impl.h ('k') | webkit/media/android/audio_decoder_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698