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 bool InitializeMediaLibraryForTesting() { |
| 82 FilePath file_path; |
| 83 if (!PathService::Get(base::DIR_SOURCE_ROOT, &file_path)) |
| 84 return false; |
| 85 return InitializeMediaLibrary(file_path); |
| 86 } |
| 87 |
81 bool IsMediaLibraryInitialized() { | 88 bool IsMediaLibraryInitialized() { |
82 return g_media_library_is_initialized; | 89 return g_media_library_is_initialized; |
83 } | 90 } |
84 | 91 |
85 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { | 92 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { |
86 NOTIMPLEMENTED() << "OpenMAX is not used in Windows."; | 93 NOTIMPLEMENTED() << "OpenMAX is not used in Windows."; |
87 return false; | 94 return false; |
88 } | 95 } |
89 | 96 |
90 } // namespace media | 97 } // namespace media |
OLD | NEW |