| 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 <string> | 7 #include <string> | 
| 8 | 8 | 
| 9 #include <dlfcn.h> | 9 #include <dlfcn.h> | 
| 10 | 10 | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 47 #error "Do not know how to construct DSO name for this OS." | 47 #error "Do not know how to construct DSO name for this OS." | 
| 48 #endif | 48 #endif | 
| 49 static const FilePath::CharType openmax_name[] = | 49 static const FilePath::CharType openmax_name[] = | 
| 50     FILE_PATH_LITERAL("libOmxCore.so"); | 50     FILE_PATH_LITERAL("libOmxCore.so"); | 
| 51 | 51 | 
| 52 // Retrieves the DSOName for the given key. | 52 // Retrieves the DSOName for the given key. | 
| 53 static std::string GetDSOName(tp_ffmpeg::StubModules stub_key) { | 53 static std::string GetDSOName(tp_ffmpeg::StubModules stub_key) { | 
| 54   // TODO(ajwong): Remove this once mac is migrated. Either that, or have GYP | 54   // TODO(ajwong): Remove this once mac is migrated. Either that, or have GYP | 
| 55   // set a constant that we can switch implementations based off of. | 55   // set a constant that we can switch implementations based off of. | 
| 56   switch (stub_key) { | 56   switch (stub_key) { | 
| 57     case tp_ffmpeg::kModuleAvcodec52: | 57     case tp_ffmpeg::kModuleAvcodec53: | 
| 58       return FILE_PATH_LITERAL(DSO_NAME("avcodec", AVCODEC_VERSION)); | 58       return FILE_PATH_LITERAL(DSO_NAME("avcodec", AVCODEC_VERSION)); | 
| 59     case tp_ffmpeg::kModuleAvformat52: | 59     case tp_ffmpeg::kModuleAvformat53: | 
| 60       return FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION)); | 60       return FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION)); | 
| 61     case tp_ffmpeg::kModuleAvutil50: | 61     case tp_ffmpeg::kModuleAvutil51: | 
| 62       return FILE_PATH_LITERAL(DSO_NAME("avutil", AVUTIL_VERSION)); | 62       return FILE_PATH_LITERAL(DSO_NAME("avutil", AVUTIL_VERSION)); | 
| 63     default: | 63     default: | 
| 64       LOG(DFATAL) << "Invalid stub module requested: " << stub_key; | 64       LOG(DFATAL) << "Invalid stub module requested: " << stub_key; | 
| 65       return FILE_PATH_LITERAL(""); | 65       return FILE_PATH_LITERAL(""); | 
| 66   } | 66   } | 
| 67 } | 67 } | 
| 68 | 68 | 
| 69 static bool g_media_library_is_initialized = false; | 69 static bool g_media_library_is_initialized = false; | 
| 70 | 70 | 
| 71 // Attempts to initialize the media library (loading DSOs, etc.). | 71 // Attempts to initialize the media library (loading DSOs, etc.). | 
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 115   return result; | 115   return result; | 
| 116 } | 116 } | 
| 117 #else | 117 #else | 
| 118 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { | 118 bool InitializeOpenMaxLibrary(const FilePath& module_dir) { | 
| 119   NOTIMPLEMENTED() << "OpenMAX is only used in Linux."; | 119   NOTIMPLEMENTED() << "OpenMAX is only used in Linux."; | 
| 120   return false; | 120   return false; | 
| 121 } | 121 } | 
| 122 #endif | 122 #endif | 
| 123 | 123 | 
| 124 }  // namespace media | 124 }  // namespace media | 
| OLD | NEW | 
|---|