OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "media/base/media.h" |
| 6 |
| 7 #include <cpu-features.h> |
| 8 |
| 9 #include "base/logging.h" |
| 10 |
| 11 namespace media { |
| 12 |
| 13 // Caches the result of the check for NEON support. |
| 14 static bool g_media_library_is_initialized = false; |
| 15 |
| 16 bool InitializeMediaLibrary(const base::FilePath& module_dir) { |
| 17 // No real initialization is necessary but we do need to check if |
| 18 // Neon is supported because the FFT library requires Neon. |
| 19 g_media_library_is_initialized = (android_getCpuFeatures() & |
| 20 ANDROID_CPU_ARM_FEATURE_NEON) != 0; |
| 21 return g_media_library_is_initialized; |
| 22 } |
| 23 |
| 24 void InitializeMediaLibraryForTesting() { |
| 25 } |
| 26 |
| 27 bool IsMediaLibraryInitialized() { |
| 28 return g_media_library_is_initialized; |
| 29 } |
| 30 |
| 31 } // namespace media |
OLD | NEW |