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 /system | |
parent | 1e640f82104e57d63e268785f75914ca7d3953ce (diff) | |
download | aura-central-87dabd4e0b724bb81db3eaeefa09cfd2c5545a36.tar.gz |
Issue #1 - Restore Gecko Media Plugins
Diffstat (limited to 'system')
-rw-r--r-- | system/graphics/layers/ipc/PAPZCTreeManager.ipdl | 4 | ||||
-rw-r--r-- | system/platform-prefs.js | 46 | ||||
-rw-r--r-- | system/runtime/nsAppRunner.cpp | 1 | ||||
-rw-r--r-- | system/runtime/nsEmbedFunctions.cpp | 17 |
4 files changed, 64 insertions, 4 deletions
diff --git a/system/graphics/layers/ipc/PAPZCTreeManager.ipdl b/system/graphics/layers/ipc/PAPZCTreeManager.ipdl index 134a222ad..21d899f91 100644 --- a/system/graphics/layers/ipc/PAPZCTreeManager.ipdl +++ b/system/graphics/layers/ipc/PAPZCTreeManager.ipdl @@ -8,10 +8,6 @@ include "ipc/nsGUIEventIPC.h"; include protocol PCompositorBridge; -// Workaround to prevent error if PContentChild.cpp & PAPZCTreeManagerChild.cpp -// are put into different UnifiedProtocolsXX.cpp files. -include "mozilla/dom/TabMessageUtils.h"; - using CSSRect from "Units.h"; using LayoutDeviceCoord from "Units.h"; using LayoutDeviceIntPoint from "Units.h"; diff --git a/system/platform-prefs.js b/system/platform-prefs.js index 2a8acb7bc..934796ee6 100644 --- a/system/platform-prefs.js +++ b/system/platform-prefs.js @@ -393,6 +393,9 @@ pref("media.libavcodec.allow-obsolete", false); #if defined(MOZ_FFVPX) pref("media.ffvpx.enabled", true); #endif +pref("media.gmp.decoder.enabled", false); +pref("media.gmp.decoder.aac", 0); +pref("media.gmp.decoder.h264", 0); #ifdef MOZ_RAW pref("media.raw.enabled", true); #endif @@ -401,6 +404,13 @@ pref("media.opus.enabled", true); pref("media.wave.enabled", true); pref("media.webm.enabled", true); +// GMP storage version number. At startup we check the version against +// media.gmp.storage.version.observed, and if the versions don't match, +// we clear storage and set media.gmp.storage.version.observed=expected. +// This provides a mechanism to clear GMP storage when non-compatible +// changes are made. +pref("media.gmp.storage.version.expected", 1); + // Filter what triggers user notifications. // See DecoderDoctorDocumentWatcher::ReportAnalysis for details. pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaCannotPlayNoDecoders,MediaUnsupportedLibavcodec"); @@ -4325,6 +4335,42 @@ pref("browser.search.reset.whitelist", ""); pref("browser.search.official", true); #endif +// GMPInstallManager prefs + +// User-settable override to media.gmp-manager.url for testing purposes. +//pref("media.gmp-manager.url.override", ""); + +// Update service URL for GMP install/updates: +pref("media.gmp-manager.url", "https://aus5.mozilla.org/update/3/GMP/60.0/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml"); + +// When |media.gmp-manager.cert.requireBuiltIn| is true or not specified the +// final certificate and all certificates the connection is redirected to before +// the final certificate for the url specified in the |media.gmp-manager.url| +// preference must be built-in. +pref("media.gmp-manager.cert.requireBuiltIn", true); + +// The |media.gmp-manager.certs.| preference branch contains branches that are +// sequentially numbered starting at 1 that contain attribute name / value +// pairs for the certificate used by the server that hosts the update xml file +// as specified in the |media.gmp-manager.url| preference. When these preferences are +// present the following conditions apply for a successful update check: +// 1. the uri scheme must be https +// 2. the preference name must exist as an attribute name on the certificate and +// the value for the name must be the same as the value for the attribute name +// on the certificate. +// If these conditions aren't met it will be treated the same as when there is +// no update available. This validation will not be performed when the +// |media.gmp-manager.url.override| user preference has been set for testing updates or +// when the |media.gmp-manager.cert.checkAttributes| preference is set to false. Also, +// the |media.gmp-manager.url.override| preference should ONLY be used for testing. +// IMPORTANT! app.update.certs.* prefs should also be updated if these +// are updated. +pref("media.gmp-manager.cert.checkAttributes", true); +pref("media.gmp-manager.certs.1.issuerName", "CN=DigiCert SHA2 Secure Server CA,O=DigiCert Inc,C=US"); +pref("media.gmp-manager.certs.1.commonName", "aus5.mozilla.org"); +pref("media.gmp-manager.certs.2.issuerName", "CN=thawte SSL CA - G2,O=\"thawte, Inc.\",C=US"); +pref("media.gmp-manager.certs.2.commonName", "aus5.mozilla.org"); + // Whether or not to perform reader mode article parsing on page load. // If this pref is disabled, we will never show a reader mode icon in the toolbar. pref("reader.parse-on-load.enabled", true); diff --git a/system/runtime/nsAppRunner.cpp b/system/runtime/nsAppRunner.cpp index 32834580b..4071e7730 100644 --- a/system/runtime/nsAppRunner.cpp +++ b/system/runtime/nsAppRunner.cpp @@ -783,6 +783,7 @@ SYNC_ENUMS(DEFAULT, Default) SYNC_ENUMS(PLUGIN, Plugin) SYNC_ENUMS(CONTENT, Content) SYNC_ENUMS(IPDLUNITTEST, IPDLUnitTest) +SYNC_ENUMS(GMPLUGIN, GMPlugin) SYNC_ENUMS(GPU, GPU) // .. and ensure that that is all of them: diff --git a/system/runtime/nsEmbedFunctions.cpp b/system/runtime/nsEmbedFunctions.cpp index 9c1aca494..841ea2a2d 100644 --- a/system/runtime/nsEmbedFunctions.cpp +++ b/system/runtime/nsEmbedFunctions.cpp @@ -63,6 +63,8 @@ #include "mozilla/ipc/XPCShellEnvironment.h" #include "mozilla/WindowsDllBlocklist.h" +#include "GMPProcessChild.h" +#include "GMPLoader.h" #include "mozilla/gfx/GPUProcessImpl.h" #include "GeckoProfiler.h" @@ -87,6 +89,10 @@ using mozilla::dom::ContentProcess; using mozilla::dom::ContentParent; using mozilla::dom::ContentChild; +using mozilla::gmp::GMPLoader; +using mozilla::gmp::CreateGMPLoader; +using mozilla::gmp::GMPProcessChild; + using mozilla::ipc::TestShellParent; using mozilla::ipc::TestShellCommandParent; using mozilla::ipc::XPCShellEnvironment; @@ -234,6 +240,10 @@ XRE_InitChildProcess(int aArgc, NS_ENSURE_ARG_POINTER(aArgv[0]); MOZ_ASSERT(aChildData); + // On non-Fennec Gecko, the GMPLoader code resides in plugin-container, + // and we must forward it through to the GMP code here. + GMPProcessChild::SetGMPLoader(aChildData->gmpLoader.get()); + #if defined(XP_WIN) // From the --attach-console support in nsNativeAppSupportWin.cpp, but // here we are a content child process, so we always attempt to attach @@ -347,6 +357,9 @@ XRE_InitChildProcess(int aArgc, // Content processes need the XPCOM/chromium frankenventloop uiLoopType = MessageLoop::TYPE_MOZILLA_CHILD; break; + case GeckoProcessType_GMPlugin: + uiLoopType = MessageLoop::TYPE_DEFAULT; + break; default: uiLoopType = MessageLoop::TYPE_UI; break; @@ -408,6 +421,10 @@ XRE_InitChildProcess(int aArgc, #endif break; + case GeckoProcessType_GMPlugin: + process = new gmp::GMPProcessChild(parentPID); + break; + case GeckoProcessType_GPU: process = new gfx::GPUProcessImpl(parentPID); break; |