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

Unified Diff: media/base/media_posix.cc

Issue 11364077: Linux: fix build with system ffmpeg (Chromium side). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 8 years, 1 month 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 | « build/common.gypi ('k') | media/ffmpeg/ffmpeg_common.h » ('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 ff50287ba6a678b11c1bf009c811efab25208296..a6bebaa853083f62f4ac6e8d91896bcb0eef5f92 100644
--- a/media/base/media_posix.cc
+++ b/media/base/media_posix.cc
@@ -11,12 +11,15 @@
#include "base/path_service.h"
#include "base/stringize_macros.h"
#include "media/ffmpeg/ffmpeg_common.h"
+
+#if !defined(USE_SYSTEM_FFMPEG)
#include "third_party/ffmpeg/ffmpeg_stubs.h"
using third_party_ffmpeg::kNumStubModules;
using third_party_ffmpeg::kModuleFfmpegsumo;
using third_party_ffmpeg::InitializeStubs;
using third_party_ffmpeg::StubPathMap;
+#endif // !defined(USE_SYSTEM_FFMPEG)
namespace media {
@@ -52,6 +55,11 @@ static bool g_media_library_is_initialized = false;
static bool InitializeMediaLibraryInternal(const FilePath& module_dir) {
DCHECK(!g_media_library_is_initialized);
+#if defined(USE_SYSTEM_FFMPEG)
+ // No initialization is necessary when using system ffmpeg,
+ // we just link directly with system ffmpeg libraries.
+ g_media_library_is_initialized = true;
+#else
StubPathMap paths;
// First try to initialize with Chrome's sumo library.
@@ -67,6 +75,7 @@ static bool InitializeMediaLibraryInternal(const FilePath& module_dir) {
FILE_PATH_LITERAL(DSO_NAME("avformat", AVFORMAT_VERSION))).value());
g_media_library_is_initialized = InitializeStubs(paths);
+#endif // !defined(USE_SYSTEM_FFMPEG)
return g_media_library_is_initialized;
}
« no previous file with comments | « build/common.gypi ('k') | media/ffmpeg/ffmpeg_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698