Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: media/base/media_posix.cc

Issue 300013: Add yasm and ffmpeg into the build tree for linux. (Closed)
Patch Set: Fix mark's comments. Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/installer.gyp ('k') | third_party/bzip2/bzip2.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_posix.cc
diff --git a/media/base/media_posix.cc b/media/base/media_posix.cc
index 2f1af81c9d7088b904f526cb705b48eee02612b0..9b1035cd900570959644059faa52b16d862abed4 100644
--- a/media/base/media_posix.cc
+++ b/media/base/media_posix.cc
@@ -21,14 +21,19 @@ namespace {
#if defined(OS_MACOSX)
#define DSO_NAME(MODULE, VERSION) ("lib" MODULE "." #VERSION ".dylib")
+const FilePath::CharType sumo_name[] =
+ FILE_PATH_LITERAL("libffmpegsumo.dylib");
#elif defined(OS_POSIX)
#define DSO_NAME(MODULE, VERSION) ("lib" MODULE ".so." #VERSION)
+const FilePath::CharType sumo_name[] = FILE_PATH_LITERAL("libffmpegsumo.so");
#else
#error "Do not know how to construct DSO name for this OS."
#endif
// Retrieves the DSOName for the given key.
std::string GetDSOName(tp_ffmpeg::StubModules stub_key) {
+ // TODO(ajwong): Remove this once mac is migrated. Either that, or have GYP
+ // set a constant that we can switch implementations based off of.
switch (stub_key) {
case tp_ffmpeg::kModuleAvcodec52:
return FILE_PATH_LITERAL(DSO_NAME("avcodec", 52));
@@ -51,6 +56,11 @@ bool InitializeMediaLibrary(const FilePath& module_dir) {
tp_ffmpeg::StubPathMap paths;
for (int i = 0; i < static_cast<int>(tp_ffmpeg::kNumStubModules); ++i) {
tp_ffmpeg::StubModules module = static_cast<tp_ffmpeg::StubModules>(i);
+
+ // Add the sumo library first so it takes precedence.
+ paths[module].push_back(module_dir.Append(sumo_name).value());
+
+ // Add the more specific FFmpeg library name.
FilePath path = module_dir.Append(GetDSOName(module));
paths[module].push_back(path.value());
}
« no previous file with comments | « chrome/installer/installer.gyp ('k') | third_party/bzip2/bzip2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698