OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 7 #include <string> |
8 | 8 |
9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
10 | 10 |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #error "Do not know how to construct DSO name for this OS." | 48 #error "Do not know how to construct DSO name for this OS." |
49 #endif | 49 #endif |
50 static const FilePath::CharType openmax_name[] = | 50 static const FilePath::CharType openmax_name[] = |
51 FILE_PATH_LITERAL("libOmxCore.so"); | 51 FILE_PATH_LITERAL("libOmxCore.so"); |
52 | 52 |
53 // Retrieves the DSOName for the given key. | 53 // Retrieves the DSOName for the given key. |
54 static std::string GetDSOName(tp_ffmpeg::StubModules stub_key) { | 54 static std::string GetDSOName(tp_ffmpeg::StubModules stub_key) { |
55 // TODO(ajwong): Remove this once mac is migrated. Either that, or have GYP | 55 // TODO(ajwong): Remove this once mac is migrated. Either that, or have GYP |
56 // set a constant that we can switch implementations based off of. | 56 // set a constant that we can switch implementations based off of. |
57 switch (stub_key) { | 57 switch (stub_key) { |
58 case tp_ffmpeg::kModuleAvcodec53: | 58 case tp_ffmpeg::kModuleAvcodec54: |
59 return FILE_PATH_LITERAL(DSO_NAME("avcodec", AVCODEC_VERSION)); | 59 return FILE_PATH_LITERAL(DSO_NAME("avcodec", AVCODEC_VERSION)); |
60 case tp_ffmpeg::kModuleAvformat53: | 60 case tp_ffmpeg::kModuleAvformat54: |
61 return FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION)); | 61 return FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION)); |
62 case tp_ffmpeg::kModuleAvutil51: | 62 case tp_ffmpeg::kModuleAvutil51: |
63 return FILE_PATH_LITERAL(DSO_NAME("avutil", AVUTIL_VERSION)); | 63 return FILE_PATH_LITERAL(DSO_NAME("avutil", AVUTIL_VERSION)); |
64 default: | 64 default: |
65 LOG(DFATAL) << "Invalid stub module requested: " << stub_key; | 65 LOG(DFATAL) << "Invalid stub module requested: " << stub_key; |
66 return FILE_PATH_LITERAL(""); | 66 return FILE_PATH_LITERAL(""); |
67 } | 67 } |
68 } | 68 } |
69 | 69 |
70 static bool g_media_library_is_initialized = false; | 70 static bool g_media_library_is_initialized = false; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 return result; | 122 return result; |
123 } | 123 } |
124 #else | 124 #else |
125 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { | 125 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { |
126 NOTIMPLEMENTED() << "OpenMAX is only used in Linux."; | 126 NOTIMPLEMENTED() << "OpenMAX is only used in Linux."; |
127 return false; | 127 return false; |
128 } | 128 } |
129 #endif | 129 #endif |
130 | 130 |
131 } // namespace media | 131 } // namespace media |
OLD | NEW |