summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 17:35:08 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 17:35:08 +0000
commitc9e45da0dec9692d8f59cef2e8c5cdac28baf51b (patch)
tree6aabce08a03122a49eaeb98bddd5daa6f63ccdb3
parent7c7d8abbb23cff0291d45738e8464eba0dddb1c1 (diff)
downloadchromium_src-c9e45da0dec9692d8f59cef2e8c5cdac28baf51b.zip
chromium_src-c9e45da0dec9692d8f59cef2e8c5cdac28baf51b.tar.gz
chromium_src-c9e45da0dec9692d8f59cef2e8c5cdac28baf51b.tar.bz2
Linux: preload ffmpeg in the zygote.
When using the sandbox, the renderer cannot load the ffmpeg shared objects from disk. So we load them in the zygote before the sandbox is started. (Note that this doesn't get media working, but it's a start.) BUG=18329 http://codereview.chromium.org/159841 (Note: relanding. Original landing in r22392, reverted in r22405 due to check-deps failure.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22492 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/DEPS1
-rw-r--r--chrome/browser/zygote_main_linux.cc7
-rwxr-xr-xthird_party/ffmpeg/ffmpeg.gyp4
3 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index a4b5411..1137607 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -16,6 +16,7 @@ include_rules = [
"+chrome/third_party/hunspell",
"+libxml", # For search engine definition parsing.
"+media/audio", # Chrome's lightweight audio library.
+ "+media/base",
"+third_party/sqlite",
"+third_party/libevent", # For the remote V8 debugging server
"+third_party/cld",
diff --git a/chrome/browser/zygote_main_linux.cc b/chrome/browser/zygote_main_linux.cc
index 2df1029..6752a06 100644
--- a/chrome/browser/zygote_main_linux.cc
+++ b/chrome/browser/zygote_main_linux.cc
@@ -14,6 +14,7 @@
#include "base/command_line.h"
#include "base/eintr_wrapper.h"
#include "base/global_descriptors_posix.h"
+#include "base/path_service.h"
#include "base/pickle.h"
#include "base/rand_util.h"
#include "base/sys_info.h"
@@ -26,6 +27,8 @@
#include "chrome/common/process_watcher.h"
#include "chrome/common/sandbox_methods_linux.h"
+#include "media/base/media.h"
+
#include "skia/ext/SkFontHost_fontconfig_control.h"
// http://code.google.com/p/chromium/wiki/LinuxZygote
@@ -326,6 +329,10 @@ static bool MaybeEnterChroot() {
PATCH_GLOBAL_OFFSET_TABLE(localtime_r, sandbox_wrapper::localtime_r);
#endif
+ FilePath module_path;
+ if (PathService::Get(base::DIR_MODULE, &module_path))
+ media::InitializeMediaLibrary(module_path);
+
static const char kChrootMe = 'C';
static const char kChrootMeSuccess = 'O';
diff --git a/third_party/ffmpeg/ffmpeg.gyp b/third_party/ffmpeg/ffmpeg.gyp
index f035165..458328f 100755
--- a/third_party/ffmpeg/ffmpeg.gyp
+++ b/third_party/ffmpeg/ffmpeg.gyp
@@ -21,9 +21,11 @@
'variables': {
'generate_stubs_script': 'generate_stubs.py',
'sig_files': [
+ # Note that these must be listed in dependency order.
+ # (i.e. if A depends on B, then B must be listed before A.)
+ 'avutil-50.sigs',
'avcodec-52.sigs',
'avformat-52.sigs',
- 'avutil-50.sigs',
],
'extra_header': 'ffmpeg_stub_headers.fragment',
},