| OLD | NEW |
| 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 #include "media/base/media.h" | 5 #include "media/base/media.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Free any loaded libraries if we weren't successful. | 71 // Free any loaded libraries if we weren't successful. |
| 72 for (size_t i = 0; i < arraysize(libs) && libs[i] != NULL; ++i) { | 72 for (size_t i = 0; i < arraysize(libs) && libs[i] != NULL; ++i) { |
| 73 FreeLibrary(libs[i]); | 73 FreeLibrary(libs[i]); |
| 74 libs[i] = NULL; // Just to be safe. | 74 libs[i] = NULL; // Just to be safe. |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 return g_media_library_is_initialized; | 78 return g_media_library_is_initialized; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void InitializeMediaLibraryForTesting() { | |
| 82 FilePath file_path; | |
| 83 CHECK(PathService::Get(base::DIR_EXE, &file_path)); | |
| 84 CHECK(InitializeMediaLibrary(file_path)); | |
| 85 } | |
| 86 | |
| 87 bool IsMediaLibraryInitialized() { | 81 bool IsMediaLibraryInitialized() { |
| 88 return g_media_library_is_initialized; | 82 return g_media_library_is_initialized; |
| 89 } | 83 } |
| 90 | 84 |
| 91 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { | 85 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { |
| 92 NOTIMPLEMENTED() << "OpenMAX is not used in Windows."; | 86 NOTIMPLEMENTED() << "OpenMAX is not used in Windows."; |
| 93 return false; | 87 return false; |
| 94 } | 88 } |
| 95 | 89 |
| 96 } // namespace media | 90 } // namespace media |
| OLD | NEW |