mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-10 02:08:38 +09:00
Issue #2301 - Make Gecko Media Plugins optional when not building EME or WebRTC
Co-authored-by: Moonchild <moonchild@palemoon.org>
This commit is contained in:
parent
57020c1f59
commit
9e7d1492e6
54 changed files with 314 additions and 30 deletions
|
|
@ -18,7 +18,9 @@
|
|||
#ifdef MOZ_APPLEMEDIA
|
||||
#include "AppleDecoderModule.h"
|
||||
#endif
|
||||
#ifdef MOZ_GMP
|
||||
#include "GMPDecoderModule.h"
|
||||
#endif
|
||||
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/SharedThreadPool.h"
|
||||
|
|
@ -224,9 +226,11 @@ PDMFactory::CreateDecoder(const CreateDecoderParams& aParams)
|
|||
if (mFFmpegFailedToLoad) {
|
||||
diagnostics->SetFFmpegFailedToLoad();
|
||||
}
|
||||
#ifdef MOZ_GMP
|
||||
if (mGMPPDMFailedToStartup) {
|
||||
diagnostics->SetGMPPDMFailedToStartup();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
for (auto& current : mCurrentPDMs) {
|
||||
|
|
@ -396,12 +400,14 @@ PDMFactory::CreatePDMs()
|
|||
m = new AgnosticDecoderModule();
|
||||
StartupPDM(m);
|
||||
|
||||
#ifdef MOZ_GMP
|
||||
if (MediaPrefs::PDMGMPEnabled()) {
|
||||
m = new GMPDecoderModule();
|
||||
mGMPPDMFailedToStartup = !StartupPDM(m);
|
||||
} else {
|
||||
mGMPPDMFailedToStartup = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -434,9 +440,11 @@ PDMFactory::GetDecoder(const TrackInfo& aTrackInfo,
|
|||
if (mFFmpegFailedToLoad) {
|
||||
aDiagnostics->SetFFmpegFailedToLoad();
|
||||
}
|
||||
#ifdef MOZ_GMP
|
||||
if (mGMPPDMFailedToStartup) {
|
||||
aDiagnostics->SetGMPPDMFailedToStartup();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
RefPtr<PlatformDecoderModule> pdm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue