/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=2 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* static */ void UtilityAudioDecoderParent::GenericPreloadForSandbox() { #ifdefined(MOZ_SANDBOX) && defined(XP_WIN) // Preload AV dlls so we can enable Binary Signature Policy // to restrict further dll loads.
UtilityProcessImpl::LoadLibraryOrCrash(L"mozavcodec.dll");
UtilityProcessImpl::LoadLibraryOrCrash(L"mozavutil.dll"); #endif// defined(MOZ_SANDBOX) && defined(XP_WIN)
}
/* static */ void UtilityAudioDecoderParent::WMFPreloadForSandbox() { #ifdefined(MOZ_SANDBOX) && defined(XP_WIN) // mfplat.dll and mf.dll will be preloaded by // wmf::MediaFoundationInitializer::HasInitialized()
# ifdefined(NS_FREE_PERMANENT_DATA) // WMF Shutdown requires this or it will badly crash
UtilityProcessImpl::LoadLibraryOrCrash(L"ole32.dll"); # endif // defined(NS_FREE_PERMANENT_DATA)
auto rv = wmf::MediaFoundationInitializer::HasInitialized(); if (!rv) {
NS_WARNING("Failed to init Media Foundation in the Utility process"); return;
} #endif// defined(MOZ_SANDBOX) && defined(XP_WIN)
}
IPCResult UtilityAudioDecoderParent::RecvUpdateVar( const GfxVarUpdate& aUpdate) {
MOZ_ASSERT(mKind == SandboxingKind::MF_MEDIA_ENGINE_CDM); auto scopeExit = MakeScopeExit(
[self = RefPtr<UtilityAudioDecoderParent>{this},
location = GetRemoteDecodeInFromKind(mKind),
couldUseHWDecoder = gfx::gfxVars::CanUseHardwareVideoDecoding()] { if (couldUseHWDecoder != gfx::gfxVars::CanUseHardwareVideoDecoding()) { // The capabilities of the system may have changed, force a refresh by // re-initializing the PDM.
Unused << self->SendUpdateMediaCodecsSupported(
location, PDMFactory::Supported(true/* force refresh */));
}
});
gfx::gfxVars::ApplyUpdate(aUpdate); return IPC_OK();
} #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.