| Index: remoting/host/host_plugin.cc
|
| diff --git a/remoting/host/host_plugin.cc b/remoting/host/host_plugin.cc
|
| index 09550aed2ee37cd2c9463a0bfa9a865a5ca692f1..371d91f7e7e71786dfa0946e9508679a386a1435 100644
|
| --- a/remoting/host/host_plugin.cc
|
| +++ b/remoting/host/host_plugin.cc
|
| @@ -9,15 +9,22 @@
|
| #include <vector>
|
|
|
| #include "base/at_exit.h"
|
| +#include "base/base_paths.h"
|
| #include "base/basictypes.h"
|
| #include "base/bind.h"
|
| +#include "base/file_path.h"
|
| #include "base/logging.h"
|
| #include "base/message_loop.h"
|
| +#include "base/path_service.h"
|
| #include "base/rand_util.h"
|
| #include "base/stringize_macros.h"
|
| #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/host/chromoting_host.h"
|
| #include "remoting/host/chromoting_host_context.h"
|
| #include "remoting/host/host_config.h"
|
| @@ -387,6 +394,29 @@ 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;
|
|
|