diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-04-20 11:45:55 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-04-20 11:45:55 -0500 |
commit | 87dabd4e0b724bb81db3eaeefa09cfd2c5545a36 (patch) | |
tree | f91a4de96d859747a5028abf252e87d3361006cb /ipc | |
parent | 1e640f82104e57d63e268785f75914ca7d3953ce (diff) | |
download | aura-central-87dabd4e0b724bb81db3eaeefa09cfd2c5545a36.tar.gz |
Issue #1 - Restore Gecko Media Plugins
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/app/moz.build | 9 | ||||
-rw-r--r-- | ipc/contentproc/plugin-container.cpp | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/ipc/app/moz.build b/ipc/app/moz.build index d6239c5dc..41eb8ccff 100644 --- a/ipc/app/moz.build +++ b/ipc/app/moz.build @@ -16,6 +16,15 @@ LOCAL_INCLUDES += [ '/xpcom/base', ] +# We link GMPLoader into plugin-container on desktop so that its code is +# covered by the desktop DRM vendor's voucher. +SOURCES += [ + '../../dom/media/gmp/GMPLoader.cpp', +] +USE_LIBS += [ + 'rlz', +] + # DELAYLOAD_DLLS in this block ensures that the DLL blocklist is functional if CONFIG['OS_ARCH'] == 'WINNT': DELAYLOAD_DLLS += [ diff --git a/ipc/contentproc/plugin-container.cpp b/ipc/contentproc/plugin-container.cpp index a85f24d34..0e59e9d7a 100644 --- a/ipc/contentproc/plugin-container.cpp +++ b/ipc/contentproc/plugin-container.cpp @@ -20,6 +20,14 @@ #include <unistd.h> #endif +#include "GMPLoader.h" + +mozilla::gmp::SandboxStarter* +MakeSandboxStarter() +{ + return nullptr; +} + int content_process_main(int argc, char* argv[]) { @@ -42,6 +50,14 @@ content_process_main(int argc, char* argv[]) SetDllDirectoryW(L""); } #endif +#ifdef MOZ_PLUGIN_CONTAINER + // On desktop, the GMPLoader lives in plugin-container, so that its + // code can be covered by an EME/GMP vendor's voucher. + nsAutoPtr<mozilla::gmp::SandboxStarter> starter(MakeSandboxStarter()); + if (XRE_GetProcessType() == GeckoProcessType_GMPlugin) { + childData.gmpLoader = mozilla::gmp::CreateGMPLoader(starter); + } +#endif nsresult rv = XRE_InitChildProcess(argc, argv, &childData); NS_ENSURE_SUCCESS(rv, 1); |