diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 22:01:46 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-01 22:01:46 +0000 |
commit | 087e552e12e474e93cd0b18c98806a46e431c4d8 (patch) | |
tree | b0c47041cc5cafd876950b2654413a82dbe39d82 /remoting/host | |
parent | c3fcd0e4716b5406e2cf0a87a274c573d7dfb16b (diff) | |
download | chromium_src-087e552e12e474e93cd0b18c98806a46e431c4d8.zip chromium_src-087e552e12e474e93cd0b18c98806a46e431c4d8.tar.gz chromium_src-087e552e12e474e93cd0b18c98806a46e431c4d8.tar.bz2 |
Statically link VPX into the Host Plugin.
BUG=
TEST=Host plugin loads and doesn't mysteriously crash trying to call into VPX when a connection is first made.
Review URL: http://codereview.chromium.org/7065026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/host_plugin.cc | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/remoting/host/host_plugin.cc b/remoting/host/host_plugin.cc index 11069d4..bc9bd41 100644 --- a/remoting/host/host_plugin.cc +++ b/remoting/host/host_plugin.cc @@ -21,10 +21,6 @@ #include "base/task.h" #include "base/threading/platform_thread.h" #include "base/threading/thread.h" -#if defined(OS_MACOSX) -#include "base/mac/foundation_util.h" -#endif -#include "media/base/media.h" #include "remoting/base/auth_token_util.h" #include "remoting/host/chromoting_host.h" #include "remoting/host/chromoting_host_context.h" @@ -43,6 +39,22 @@ #define OSCALL __attribute__((visibility("default"))) #endif +#if defined(OS_WIN) +// TODO(wez): libvpx expects these 64-bit division functions to be provided +// by libgcc.a, which we aren't linked against. These implementations can +// be removed once we have native MSVC libvpx builds for Windows. +extern "C" { + +int64_t __cdecl __divdi3(int64_t a, int64_t b) { + return a / b; +} +uint64_t __cdecl __udivdi3(uint64_t a, uint64_t b) { + return a / b; +} + +} +#endif + /* Supported Javascript interface: readonly attribute string accessCode; @@ -401,29 +413,6 @@ bool HostNPScriptObject::Connect(const NPVariant* args, return false; } - // TODO(wez): Load the media libraries to get the VP8 encoder. - // This won't be needed once we link libvpx in statically. - FilePath media_path; -#if defined(OS_MACOSX) - // MainAppBundlePath returns the Chromium Helper bundle, which in dev builds - // sits alongside the Framework bundle, which contains the Libraries we need. - media_path = base::mac::MainAppBundlePath(); - media_path = media_path.DirName(); - media_path = - media_path.Append(FILE_PATH_LITERAL("Chromium Framework.framework")); - media_path = - media_path.Append(FILE_PATH_LITERAL("Libraries")); -#else - if (!PathService::Get(base::DIR_EXE, &media_path)) { - SetException("Failed to find media path"); - return false; - } -#endif - if (!media::InitializeMediaLibrary(media_path)) { - SetException("Failed to load media library"); - return false; - } - // Store the supplied user ID and token to the Host configuration. scoped_refptr<remoting::MutableHostConfig> host_config = new remoting::InMemoryHostConfig; |