| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/native_library.h" | 12 #include "base/native_library.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 | 14 |
| 15 namespace media { | 15 namespace media { |
| 16 | 16 |
| 17 enum FFmpegDLLKeys { | 17 enum FFmpegDLLKeys { |
| 18 FILE_LIBAVCODEC, // full path to libavcodec media decoding library. | 18 FILE_LIBAVCODEC, // full path to libavcodec media decoding library. |
| 19 FILE_LIBAVFORMAT, // full path to libavformat media parsing library. | 19 FILE_LIBAVFORMAT, // full path to libavformat media parsing library. |
| 20 FILE_LIBAVUTIL, // full path to libavutil media utility library. | 20 FILE_LIBAVUTIL, // full path to libavutil media utility library. |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 // Retrieves the DLLName for the given key. | 23 // Retrieves the DLLName for the given key. |
| 24 static FilePath::CharType* GetDLLName(FFmpegDLLKeys dll_key) { | 24 static FilePath::CharType* GetDLLName(FFmpegDLLKeys dll_key) { |
| 25 // TODO(ajwong): Do we want to lock to a specific ffmpeg version? | 25 // TODO(ajwong): Do we want to lock to a specific ffmpeg version? |
| 26 switch (dll_key) { | 26 switch (dll_key) { |
| 27 case FILE_LIBAVCODEC: | 27 case FILE_LIBAVCODEC: |
| 28 return FILE_PATH_LITERAL("avcodec-53.dll"); | 28 return FILE_PATH_LITERAL("avcodec-54.dll"); |
| 29 case FILE_LIBAVFORMAT: | 29 case FILE_LIBAVFORMAT: |
| 30 return FILE_PATH_LITERAL("avformat-53.dll"); | 30 return FILE_PATH_LITERAL("avformat-54.dll"); |
| 31 case FILE_LIBAVUTIL: | 31 case FILE_LIBAVUTIL: |
| 32 return FILE_PATH_LITERAL("avutil-51.dll"); | 32 return FILE_PATH_LITERAL("avutil-51.dll"); |
| 33 default: | 33 default: |
| 34 LOG(DFATAL) << "Invalid DLL key requested: " << dll_key; | 34 LOG(DFATAL) << "Invalid DLL key requested: " << dll_key; |
| 35 return FILE_PATH_LITERAL(""); | 35 return FILE_PATH_LITERAL(""); |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 | 38 |
| 39 static bool g_media_library_is_initialized = false; | 39 static bool g_media_library_is_initialized = false; |
| 40 | 40 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool IsMediaLibraryInitialized() { | 87 bool IsMediaLibraryInitialized() { |
| 88 return g_media_library_is_initialized; | 88 return g_media_library_is_initialized; |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { | 91 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { |
| 92 NOTIMPLEMENTED() << "OpenMAX is not used in Windows."; | 92 NOTIMPLEMENTED() << "OpenMAX is not used in Windows."; |
| 93 return false; | 93 return false; |
| 94 } | 94 } |
| 95 | 95 |
| 96 } // namespace media | 96 } // namespace media |
| OLD | NEW |