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

Unified Diff: media/base/media_android.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 | « media/base/android/webaudio_media_codec_bridge.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_android.cc
diff --git a/media/base/media_android.cc b/media/base/media_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4e6ffc02cf7859dbeba21445e1249509d0ad2169
--- /dev/null
+++ b/media/base/media_android.cc
@@ -0,0 +1,31 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/base/media.h"
+
+#include <cpu-features.h>
+
+#include "base/logging.h"
+
+namespace media {
+
+// Caches the result of the check for NEON support.
+static bool g_media_library_is_initialized = false;
+
+bool InitializeMediaLibrary(const base::FilePath& module_dir) {
+ // No real initialization is necessary but we do need to check if
+ // Neon is supported because the FFT library requires Neon.
+ g_media_library_is_initialized = (android_getCpuFeatures() &
+ ANDROID_CPU_ARM_FEATURE_NEON) != 0;
+ return g_media_library_is_initialized;
+}
+
+void InitializeMediaLibraryForTesting() {
+}
+
+bool IsMediaLibraryInitialized() {
+ return g_media_library_is_initialized;
+}
+
+} // namespace media
« no previous file with comments | « media/base/android/webaudio_media_codec_bridge.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698