Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
2023-09-14 10:49:05 +08:00
55 changed files with 320 additions and 34 deletions
+8
View File
@@ -59,7 +59,9 @@
#include "mozilla/BasePrincipal.h" #include "mozilla/BasePrincipal.h"
#include "mozilla/WebBrowserPersistDocumentChild.h" #include "mozilla/WebBrowserPersistDocumentChild.h"
#include "imgLoader.h" #include "imgLoader.h"
#ifdef MOZ_GMP
#include "GMPServiceChild.h" #include "GMPServiceChild.h"
#endif
#include "mozilla/Unused.h" #include "mozilla/Unused.h"
@@ -161,7 +163,9 @@
#include "mozilla/net/NeckoMessageUtils.h" #include "mozilla/net/NeckoMessageUtils.h"
#include "mozilla/widget/PuppetBidiKeyboard.h" #include "mozilla/widget/PuppetBidiKeyboard.h"
#include "mozilla/mozSpellChecker.h" #include "mozilla/mozSpellChecker.h"
#ifdef MOZ_GMP
#include "GMPServiceChild.h" #include "GMPServiceChild.h"
#endif
#include "gfxPlatform.h" #include "gfxPlatform.h"
#include "nscore.h" // for NS_FREE_PERMANENT_DATA #include "nscore.h" // for NS_FREE_PERMANENT_DATA
@@ -171,7 +175,9 @@ using namespace mozilla::dom::ipc;
using namespace mozilla::dom::workers; using namespace mozilla::dom::workers;
using namespace mozilla::media; using namespace mozilla::media;
using namespace mozilla::embedding; using namespace mozilla::embedding;
#ifdef MOZ_GMP
using namespace mozilla::gmp; using namespace mozilla::gmp;
#endif
using namespace mozilla::hal_sandbox; using namespace mozilla::hal_sandbox;
using namespace mozilla::ipc; using namespace mozilla::ipc;
using namespace mozilla::layers; using namespace mozilla::layers;
@@ -1123,6 +1129,7 @@ ContentChild::AllocPContentBridgeParent(mozilla::ipc::Transport* aTransport,
return mLastBridge; return mLastBridge;
} }
#ifdef MOZ_GMP
PGMPServiceChild* PGMPServiceChild*
ContentChild::AllocPGMPServiceChild(mozilla::ipc::Transport* aTransport, ContentChild::AllocPGMPServiceChild(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) base::ProcessId aOtherProcess)
@@ -1136,6 +1143,7 @@ ContentChild::RecvGMPsChanged(nsTArray<GMPCapabilityData>&& capabilities)
GeckoMediaPluginServiceChild::UpdateGMPCapabilities(Move(capabilities)); GeckoMediaPluginServiceChild::UpdateGMPCapabilities(Move(capabilities));
return true; return true;
} }
#endif
bool bool
ContentChild::RecvInitRendering(Endpoint<PCompositorBridgeChild>&& aCompositor, ContentChild::RecvInitRendering(Endpoint<PCompositorBridgeChild>&& aCompositor,
+2
View File
@@ -140,12 +140,14 @@ public:
AllocPContentBridgeChild(mozilla::ipc::Transport* transport, AllocPContentBridgeChild(mozilla::ipc::Transport* transport,
base::ProcessId otherProcess) override; base::ProcessId otherProcess) override;
#ifdef MOZ_GMP
PGMPServiceChild* PGMPServiceChild*
AllocPGMPServiceChild(mozilla::ipc::Transport* transport, AllocPGMPServiceChild(mozilla::ipc::Transport* transport,
base::ProcessId otherProcess) override; base::ProcessId otherProcess) override;
bool bool
RecvGMPsChanged(nsTArray<GMPCapabilityData>&& capabilities) override; RecvGMPsChanged(nsTArray<GMPCapabilityData>&& capabilities) override;
#endif
bool bool
RecvInitRendering( RecvInitRendering(
+10
View File
@@ -21,7 +21,9 @@
#include "AppProcessChecker.h" #include "AppProcessChecker.h"
#include "AudioChannelService.h" #include "AudioChannelService.h"
#include "BlobParent.h" #include "BlobParent.h"
#ifdef MOZ_GMP
#include "GMPServiceParent.h" #include "GMPServiceParent.h"
#endif
#include "HandlerServiceParent.h" #include "HandlerServiceParent.h"
#include "IHistory.h" #include "IHistory.h"
#include "imgIContainer.h" #include "imgIContainer.h"
@@ -231,7 +233,9 @@ using namespace mozilla::dom::power;
using namespace mozilla::media; using namespace mozilla::media;
using namespace mozilla::embedding; using namespace mozilla::embedding;
using namespace mozilla::gfx; using namespace mozilla::gfx;
#ifdef MOZ_GMP
using namespace mozilla::gmp; using namespace mozilla::gmp;
#endif
using namespace mozilla::hal; using namespace mozilla::hal;
using namespace mozilla::ipc; using namespace mozilla::ipc;
using namespace mozilla::layers; using namespace mozilla::layers;
@@ -867,11 +871,13 @@ static nsIDocShell* GetOpenerDocShellHelper(Element* aFrameElement)
return docShell; return docShell;
} }
#ifdef MOZ_GMP
bool bool
ContentParent::RecvCreateGMPService() ContentParent::RecvCreateGMPService()
{ {
return PGMPService::Open(this); return PGMPService::Open(this);
} }
#endif
bool bool
ContentParent::RecvLoadPlugin(const uint32_t& aPluginId, nsresult* aRv, uint32_t* aRunID) ContentParent::RecvLoadPlugin(const uint32_t& aPluginId, nsresult* aRv, uint32_t* aRunID)
@@ -1275,8 +1281,10 @@ ContentParent::Init()
} }
#endif #endif
#ifdef MOZ_GMP
RefPtr<GeckoMediaPluginServiceParent> gmps(GeckoMediaPluginServiceParent::GetSingleton()); RefPtr<GeckoMediaPluginServiceParent> gmps(GeckoMediaPluginServiceParent::GetSingleton());
gmps->UpdateContentProcessGMPCapabilities(); gmps->UpdateContentProcessGMPCapabilities();
#endif
} }
void void
@@ -2551,12 +2559,14 @@ ContentParent::Observe(nsISupports* aSubject,
return NS_OK; return NS_OK;
} }
#ifdef MOZ_GMP
PGMPServiceParent* PGMPServiceParent*
ContentParent::AllocPGMPServiceParent(mozilla::ipc::Transport* aTransport, ContentParent::AllocPGMPServiceParent(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) base::ProcessId aOtherProcess)
{ {
return GMPServiceParent::Create(aTransport, aOtherProcess); return GMPServiceParent::Create(aTransport, aOtherProcess);
} }
#endif
PBackgroundParent* PBackgroundParent*
ContentParent::AllocPBackgroundParent(Transport* aTransport, ContentParent::AllocPBackgroundParent(Transport* aTransport,
+4
View File
@@ -237,7 +237,9 @@ public:
virtual bool RecvBridgeToChildProcess(const ContentParentId& aCpId) override; virtual bool RecvBridgeToChildProcess(const ContentParentId& aCpId) override;
#ifdef MOZ_GMP
virtual bool RecvCreateGMPService() override; virtual bool RecvCreateGMPService() override;
#endif
virtual bool RecvLoadPlugin(const uint32_t& aPluginId, nsresult* aRv, virtual bool RecvLoadPlugin(const uint32_t& aPluginId, nsresult* aRv,
uint32_t* aRunID) override; uint32_t* aRunID) override;
@@ -670,9 +672,11 @@ private:
TabParent* aTopLevel, const TabId& aTabId, TabParent* aTopLevel, const TabId& aTabId,
uint64_t* aId); uint64_t* aId);
#ifdef MOZ_GMP
PGMPServiceParent* PGMPServiceParent*
AllocPGMPServiceParent(mozilla::ipc::Transport* aTransport, AllocPGMPServiceParent(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) override; base::ProcessId aOtherProcess) override;
#endif
PBackgroundParent* PBackgroundParent*
AllocPBackgroundParent(Transport* aTransport, ProcessId aOtherProcess) AllocPBackgroundParent(Transport* aTransport, ProcessId aOtherProcess)
+12 -1
View File
@@ -26,10 +26,14 @@ include protocol PNecko;
// bridging PContent and PGMP. As soon as it registers the bridge between // bridging PContent and PGMP. As soon as it registers the bridge between
// PContent and PPluginModule it seems to think that PContent's parent and // PContent and PPluginModule it seems to think that PContent's parent and
// child live in the same process! // child live in the same process!
#ifdef MOZ_GMP
include protocol PGMPContent; include protocol PGMPContent;
include protocol PGMPService; include protocol PGMPService;
include protocol PPluginModule; include protocol PPluginModule;
include protocol PGMP; include protocol PGMP;
#else
include protocol PPluginModule;
#endif
include protocol PPrinting; include protocol PPrinting;
include protocol PSendStream; include protocol PSendStream;
include protocol POfflineCacheUpdate; include protocol POfflineCacheUpdate;
@@ -211,6 +215,7 @@ struct BlobURLRegistrationData
Principal principal; Principal principal;
}; };
#ifdef MOZ_GMP
struct GMPAPITags struct GMPAPITags
{ {
nsCString api; nsCString api;
@@ -223,13 +228,16 @@ struct GMPCapabilityData
nsCString version; nsCString version;
GMPAPITags[] capabilities; GMPAPITags[] capabilities;
}; };
#endif
nested(upto inside_cpow) sync protocol PContent nested(upto inside_cpow) sync protocol PContent
{ {
parent spawns PPluginModule; parent spawns PPluginModule;
parent opens PProcessHangMonitor; parent opens PProcessHangMonitor;
#ifdef MOZ_GMP
parent opens PGMPService; parent opens PGMPService;
#endif
child opens PBackground; child opens PBackground;
manages PBlob; manages PBlob;
@@ -516,8 +524,9 @@ child:
async BlobURLUnregistration(nsCString aURI); async BlobURLUnregistration(nsCString aURI);
#ifdef MOZ_GMP
async GMPsChanged(GMPCapabilityData[] capabilities); async GMPsChanged(GMPCapabilityData[] capabilities);
#endif
parent: parent:
/** /**
@@ -550,7 +559,9 @@ parent:
returns (ContentParentId cpId, bool isForApp, bool isForBrowser, TabId tabId); returns (ContentParentId cpId, bool isForApp, bool isForBrowser, TabId tabId);
sync BridgeToChildProcess(ContentParentId cpId); sync BridgeToChildProcess(ContentParentId cpId);
#ifdef MOZ_GMP
async CreateGMPService(); async CreateGMPService();
#endif
/** /**
* This call connects the content process to a plugin process. While this * This call connects the content process to a plugin process. While this
+1 -1
View File
@@ -73,7 +73,7 @@ SOURCES += [
'ProcessHangMonitor.cpp', 'ProcessHangMonitor.cpp',
] ]
IPDL_SOURCES += [ PREPROCESSED_IPDL_SOURCES += [
'BlobTypes.ipdlh', 'BlobTypes.ipdlh',
'DOMTypes.ipdlh', 'DOMTypes.ipdlh',
'PBlob.ipdl', 'PBlob.ipdl',
@@ -22,6 +22,7 @@ suffixes_label=Suffixes
learn_more_label=Learn More learn_more_label=Learn More
# GMP Plugins # GMP Plugins
#ifdef MOZ_GMP
gmp_license_info=License information gmp_license_info=License information
gmp_privacy_info=Privacy Information gmp_privacy_info=Privacy Information
@@ -32,3 +33,4 @@ eme-adobe_name=Primetime Content Decryption Module provided by Adobe Systems, In
eme-adobe_description=Play back protected web video. eme-adobe_description=Play back protected web video.
widevine_description=Widevine Content Decryption Module provided by Google Inc. widevine_description=Widevine Content Decryption Module provided by Google Inc.
#endif
+1 -1
View File
@@ -15,7 +15,7 @@
locale/@AB_CD@/global/global.dtd (%chrome/global.dtd) locale/@AB_CD@/global/global.dtd (%chrome/global.dtd)
locale/@AB_CD@/global/appstrings.properties (%chrome/appstrings.properties) locale/@AB_CD@/global/appstrings.properties (%chrome/appstrings.properties)
locale/@AB_CD@/global/global-strres.properties (%chrome/global-strres.properties) locale/@AB_CD@/global/global-strres.properties (%chrome/global-strres.properties)
locale/@AB_CD@/global/plugins.properties (%chrome/plugins.properties) * locale/@AB_CD@/global/plugins.properties (%chrome/plugins.properties)
locale/@AB_CD@/global/nsWebBrowserPersist.properties (%chrome/nsWebBrowserPersist.properties) locale/@AB_CD@/global/nsWebBrowserPersist.properties (%chrome/nsWebBrowserPersist.properties)
locale/@AB_CD@/global/xslt/xslt.properties (%chrome/xslt/xslt.properties) locale/@AB_CD@/global/xslt/xslt.properties (%chrome/xslt/xslt.properties)
locale/@AB_CD@/global/dom/dom.properties (%chrome/dom/dom.properties) locale/@AB_CD@/global/dom/dom.properties (%chrome/dom/dom.properties)
+4
View File
@@ -16,7 +16,9 @@
#include "nsDataHashtable.h" #include "nsDataHashtable.h"
#include "nsThreadUtils.h" #include "nsThreadUtils.h"
#ifdef MOZ_GMP
class GMPCrashHelper; class GMPCrashHelper;
#endif
namespace mozilla namespace mozilla
{ {
@@ -110,7 +112,9 @@ public:
// Set by Reader if the current audio track can be offloaded // Set by Reader if the current audio track can be offloaded
virtual void SetPlatformCanOffloadAudio(bool aCanOffloadAudio) {} virtual void SetPlatformCanOffloadAudio(bool aCanOffloadAudio) {}
#ifdef MOZ_GMP
virtual already_AddRefed<GMPCrashHelper> GetCrashHelper() { return nullptr; } virtual already_AddRefed<GMPCrashHelper> GetCrashHelper() { return nullptr; }
#endif
// Stack based class to assist in notifying the frame statistics of // Stack based class to assist in notifying the frame statistics of
// parsed and decoded frames. Use inside video demux & decode functions // parsed and decoded frames. Use inside video demux & decode functions
+2
View File
@@ -845,6 +845,7 @@ DecoderDoctorDiagnostics::GetDescription() const
if (mFFmpegFailedToLoad) { if (mFFmpegFailedToLoad) {
s += ", Linux platform decoder failed to load"; s += ", Linux platform decoder failed to load";
} }
#ifdef MOZ_GMP
if (mGMPPDMFailedToStartup) { if (mGMPPDMFailedToStartup) {
s += ", GMP PDM failed to startup"; s += ", GMP PDM failed to startup";
} else if (!mGMP.IsEmpty()) { } else if (!mGMP.IsEmpty()) {
@@ -852,6 +853,7 @@ DecoderDoctorDiagnostics::GetDescription() const
s += mGMP; s += mGMP;
s += "'"; s += "'";
} }
#endif
break; break;
case eMediaKeySystemAccessRequest: case eMediaKeySystemAccessRequest:
s = "key system='"; s = "key system='";
+8
View File
@@ -78,14 +78,18 @@ public:
void SetFFmpegFailedToLoad() { mFFmpegFailedToLoad = true; } void SetFFmpegFailedToLoad() { mFFmpegFailedToLoad = true; }
bool DidFFmpegFailToLoad() const { return mFFmpegFailedToLoad; } bool DidFFmpegFailToLoad() const { return mFFmpegFailedToLoad; }
#ifdef MOZ_GMP
void SetGMPPDMFailedToStartup() { mGMPPDMFailedToStartup = true; } void SetGMPPDMFailedToStartup() { mGMPPDMFailedToStartup = true; }
bool DidGMPPDMFailToStartup() const { return mGMPPDMFailedToStartup; } bool DidGMPPDMFailToStartup() const { return mGMPPDMFailedToStartup; }
#endif
void SetVideoNotSupported() { mVideoNotSupported = true; } void SetVideoNotSupported() { mVideoNotSupported = true; }
void SetAudioNotSupported() { mAudioNotSupported = true; } void SetAudioNotSupported() { mAudioNotSupported = true; }
#ifdef MOZ_GMP
void SetGMP(const nsACString& aGMP) { mGMP = aGMP; } void SetGMP(const nsACString& aGMP) { mGMP = aGMP; }
const nsACString& GMP() const { return mGMP; } const nsACString& GMP() const { return mGMP; }
#endif
const nsAString& KeySystem() const { return mKeySystem; } const nsAString& KeySystem() const { return mKeySystem; }
bool IsKeySystemSupported() const { return mIsKeySystemSupported; } bool IsKeySystemSupported() const { return mIsKeySystemSupported; }
@@ -119,10 +123,14 @@ private:
bool mWMFFailedToLoad = false; bool mWMFFailedToLoad = false;
bool mFFmpegFailedToLoad = false; bool mFFmpegFailedToLoad = false;
#ifdef MOZ_GMP
bool mGMPPDMFailedToStartup = false; bool mGMPPDMFailedToStartup = false;
#endif
bool mVideoNotSupported = false; bool mVideoNotSupported = false;
bool mAudioNotSupported = false; bool mAudioNotSupported = false;
#ifdef MOZ_GMP
nsCString mGMP; nsCString mGMP;
#endif
nsString mKeySystem; nsString mKeySystem;
bool mIsKeySystemSupported = false; bool mIsKeySystemSupported = false;
+4
View File
@@ -29,7 +29,9 @@
#include "mozilla/dom/VideoTrack.h" #include "mozilla/dom/VideoTrack.h"
#include "mozilla/dom/VideoTrackList.h" #include "mozilla/dom/VideoTrackList.h"
#include "nsPrintfCString.h" #include "nsPrintfCString.h"
#ifdef MOZ_GMP
#include "GMPService.h" #include "GMPService.h"
#endif
#include "Layers.h" #include "Layers.h"
#include "mozilla/layers/ShadowLayers.h" #include "mozilla/layers/ShadowLayers.h"
@@ -929,6 +931,7 @@ MediaDecoder::OwnerHasError() const
return mOwner->HasError(); return mOwner->HasError();
} }
#ifdef MOZ_GMP
class MediaElementGMPCrashHelper : public GMPCrashHelper class MediaElementGMPCrashHelper : public GMPCrashHelper
{ {
public: public:
@@ -956,6 +959,7 @@ MediaDecoder::GetCrashHelper()
return mOwner->GetMediaElement() ? return mOwner->GetMediaElement() ?
MakeAndAddRef<MediaElementGMPCrashHelper>(mOwner->GetMediaElement()) : nullptr; MakeAndAddRef<MediaElementGMPCrashHelper>(mOwner->GetMediaElement()) : nullptr;
} }
#endif
bool bool
MediaDecoder::IsEnded() const MediaDecoder::IsEnded() const
+2
View File
@@ -242,7 +242,9 @@ public:
// Must be called before Shutdown(). // Must be called before Shutdown().
bool OwnerHasError() const; bool OwnerHasError() const;
#ifdef MOZ_GMP
already_AddRefed<GMPCrashHelper> GetCrashHelper() override; already_AddRefed<GMPCrashHelper> GetCrashHelper() override;
#endif
protected: protected:
// Updates the media duration. This is called while the media is being // Updates the media duration. This is called while the media is being
+6
View File
@@ -365,7 +365,9 @@ MediaFormatReader::DecoderFactory::DoCreateDecoder(TrackType aTrack)
: *ownerData.mOriginalInfo->GetAsAudioInfo(), : *ownerData.mOriginalInfo->GetAsAudioInfo(),
ownerData.mTaskQueue, ownerData.mTaskQueue,
ownerData.mCallback.get(), ownerData.mCallback.get(),
#ifdef MOZ_GMP
mOwner->mCrashHelper, mOwner->mCrashHelper,
#endif
ownerData.mIsBlankDecode, ownerData.mIsBlankDecode,
&result &result
}); });
@@ -383,7 +385,9 @@ MediaFormatReader::DecoderFactory::DoCreateDecoder(TrackType aTrack)
ownerData.mCallback.get(), ownerData.mCallback.get(),
mOwner->mKnowsCompositor, mOwner->mKnowsCompositor,
mOwner->GetImageContainer(), mOwner->GetImageContainer(),
#ifdef MOZ_GMP
mOwner->mCrashHelper, mOwner->mCrashHelper,
#endif
ownerData.mIsBlankDecode, ownerData.mIsBlankDecode,
&result &result
}); });
@@ -576,9 +580,11 @@ MediaFormatReader::InitInternal()
mVideo.mTaskQueue = mVideo.mTaskQueue =
new TaskQueue(GetMediaThreadPool(MediaThreadType::PLATFORM_DECODER)); new TaskQueue(GetMediaThreadPool(MediaThreadType::PLATFORM_DECODER));
#ifdef MOZ_GMP
// Note: GMPCrashHelper must be created on main thread, as it may use // Note: GMPCrashHelper must be created on main thread, as it may use
// weak references, which aren't threadsafe. // weak references, which aren't threadsafe.
mCrashHelper = mDecoder->GetCrashHelper(); mCrashHelper = mDecoder->GetCrashHelper();
#endif
return NS_OK; return NS_OK;
} }
+2
View File
@@ -585,7 +585,9 @@ private:
RefPtr<CDMProxy> mCDMProxy; RefPtr<CDMProxy> mCDMProxy;
#ifdef MOZ_GMP
RefPtr<GMPCrashHelper> mCrashHelper; RefPtr<GMPCrashHelper> mCrashHelper;
#endif
void SetBlankDecode(TrackType aTrack, bool aIsBlankDecode); void SetBlankDecode(TrackType aTrack, bool aIsBlankDecode);
+8
View File
@@ -35,7 +35,9 @@ static StripAtomic<Type> Get##Name##PrefDefault() { return Default; } \
PrefTemplate<Type, Get##Name##PrefDefault, Get##Name##PrefName> mPref##Name PrefTemplate<Type, Get##Name##PrefDefault, Get##Name##PrefName> mPref##Name
// Custom Definitions. // Custom Definitions.
#ifdef MOZ_GMP
#define GMP_DEFAULT_ASYNC_SHUTDOWN_TIMEOUT 3000 #define GMP_DEFAULT_ASYNC_SHUTDOWN_TIMEOUT 3000
#endif
#define SUSPEND_BACKGROUND_VIDEO_DELAY_MS 10000 #define SUSPEND_BACKGROUND_VIDEO_DELAY_MS 10000
#define TEST_PREFERENCE_FAKE_RECOGNITION_SERVICE "media.webspeech.test.fake_recognition_service" #define TEST_PREFERENCE_FAKE_RECOGNITION_SERVICE "media.webspeech.test.fake_recognition_service"
@@ -96,9 +98,13 @@ private:
// PlatformDecoderModule // PlatformDecoderModule
DECL_MEDIA_PREF("media.apple.forcevda", AppleForceVDA, bool, false); DECL_MEDIA_PREF("media.apple.forcevda", AppleForceVDA, bool, false);
#ifdef MOZ_GMP
DECL_MEDIA_PREF("media.gmp.insecure.allow", GMPAllowInsecure, bool, false); DECL_MEDIA_PREF("media.gmp.insecure.allow", GMPAllowInsecure, bool, false);
DECL_MEDIA_PREF("media.gmp.async-shutdown-timeout", GMPAsyncShutdownTimeout, uint32_t, GMP_DEFAULT_ASYNC_SHUTDOWN_TIMEOUT); DECL_MEDIA_PREF("media.gmp.async-shutdown-timeout", GMPAsyncShutdownTimeout, uint32_t, GMP_DEFAULT_ASYNC_SHUTDOWN_TIMEOUT);
#endif
#ifdef MOZ_EME
DECL_MEDIA_PREF("media.eme.enabled", EMEEnabled, bool, false); DECL_MEDIA_PREF("media.eme.enabled", EMEEnabled, bool, false);
#endif
DECL_MEDIA_PREF("media.use-blank-decoder", PDMUseBlankDecoder, bool, false); DECL_MEDIA_PREF("media.use-blank-decoder", PDMUseBlankDecoder, bool, false);
DECL_MEDIA_PREF("media.gpu-process-decoder", PDMUseGPUDecoder, bool, false); DECL_MEDIA_PREF("media.gpu-process-decoder", PDMUseGPUDecoder, bool, false);
#ifdef MOZ_FFMPEG #ifdef MOZ_FFMPEG
@@ -124,9 +130,11 @@ private:
DECL_MEDIA_PREF("media.decoder.fuzzing.enabled", PDMFuzzingEnabled, bool, false); DECL_MEDIA_PREF("media.decoder.fuzzing.enabled", PDMFuzzingEnabled, bool, false);
DECL_MEDIA_PREF("media.decoder.fuzzing.video-output-minimum-interval-ms", PDMFuzzingInterval, uint32_t, 0); DECL_MEDIA_PREF("media.decoder.fuzzing.video-output-minimum-interval-ms", PDMFuzzingInterval, uint32_t, 0);
DECL_MEDIA_PREF("media.decoder.fuzzing.dont-delay-inputexhausted", PDMFuzzingDelayInputExhausted, bool, true); DECL_MEDIA_PREF("media.decoder.fuzzing.dont-delay-inputexhausted", PDMFuzzingDelayInputExhausted, bool, true);
#ifdef MOZ_GMP
DECL_MEDIA_PREF("media.gmp.decoder.enabled", PDMGMPEnabled, bool, true); DECL_MEDIA_PREF("media.gmp.decoder.enabled", PDMGMPEnabled, bool, true);
DECL_MEDIA_PREF("media.gmp.decoder.aac", GMPAACPreferred, uint32_t, 0); DECL_MEDIA_PREF("media.gmp.decoder.aac", GMPAACPreferred, uint32_t, 0);
DECL_MEDIA_PREF("media.gmp.decoder.h264", GMPH264Preferred, uint32_t, 0); DECL_MEDIA_PREF("media.gmp.decoder.h264", GMPH264Preferred, uint32_t, 0);
#endif
// MediaDecoderStateMachine // MediaDecoderStateMachine
DECL_MEDIA_PREF("media.suspend-bkgnd-video.enabled", MDSMSuspendBackgroundVideoEnabled, bool, false); DECL_MEDIA_PREF("media.suspend-bkgnd-video.enabled", MDSMSuspendBackgroundVideoEnabled, bool, false);
+12 -4
View File
@@ -10,9 +10,6 @@ UNIFIED_SOURCES += [
'TestAudioMixer.cpp', 'TestAudioMixer.cpp',
'TestAudioPacketizer.cpp', 'TestAudioPacketizer.cpp',
'TestAudioSegment.cpp', 'TestAudioSegment.cpp',
'TestGMPCrossOrigin.cpp',
'TestGMPRemoveAndDelete.cpp',
'TestGMPUtils.cpp',
'TestIntervalSet.cpp', 'TestIntervalSet.cpp',
'TestMediaDataDecoder.cpp', 'TestMediaDataDecoder.cpp',
'TestMediaEventSource.cpp', 'TestMediaEventSource.cpp',
@@ -27,6 +24,13 @@ UNIFIED_SOURCES += [
'TestWebMBuffered.cpp', 'TestWebMBuffered.cpp',
] ]
if CONFIG['MOZ_GMP']:
UNIFIED_SOURCES += [
'TestGMPCrossOrigin.cpp',
'TestGMPRemoveAndDelete.cpp',
'TestGMPUtils.cpp',
]
if CONFIG['MOZ_WEBM_ENCODER']: if CONFIG['MOZ_WEBM_ENCODER']:
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
'TestVideoTrackEncoder.cpp', 'TestVideoTrackEncoder.cpp',
@@ -59,11 +63,15 @@ LOCAL_INCLUDES += [
'/dom/media', '/dom/media',
'/dom/media/encoder', '/dom/media/encoder',
'/dom/media/fmp4', '/dom/media/fmp4',
'/dom/media/gmp',
'/security/certverifier', '/security/certverifier',
'/security/pkix/include', '/security/pkix/include',
] ]
if CONFIG['MOZ_GMP']:
LOCAL_INCLUDES += [
'/dom/media/gmp',
]
FINAL_LIBRARY = 'xul-gtest' FINAL_LIBRARY = 'xul-gtest'
if CONFIG['GNU_CXX']: if CONFIG['GNU_CXX']:
+10 -4
View File
@@ -19,12 +19,8 @@ with Files('GetUserMedia*'):
BUG_COMPONENT = component_av BUG_COMPONENT = component_av
DIRS += [ DIRS += [
'eme',
'encoder', 'encoder',
'flac', 'flac',
'gmp',
'gmp-plugin',
'gmp-plugin-openh264',
'imagecapture', 'imagecapture',
'ipc', 'ipc',
'mediasink', 'mediasink',
@@ -48,6 +44,16 @@ if CONFIG['MOZ_FMP4']:
if CONFIG['MOZ_WEBRTC']: if CONFIG['MOZ_WEBRTC']:
DIRS += ['bridge'] DIRS += ['bridge']
if CONFIG['MOZ_EME']:
DIRS += ['eme']
if CONFIG['MOZ_GMP']:
DIRS += [
'gmp',
'gmp-plugin',
'gmp-plugin-openh264',
]
TEST_DIRS += [ TEST_DIRS += [
'gtest', 'gtest',
] ]
+8
View File
@@ -18,7 +18,9 @@
#ifdef MOZ_APPLEMEDIA #ifdef MOZ_APPLEMEDIA
#include "AppleDecoderModule.h" #include "AppleDecoderModule.h"
#endif #endif
#ifdef MOZ_GMP
#include "GMPDecoderModule.h" #include "GMPDecoderModule.h"
#endif
#include "mozilla/CDMProxy.h" #include "mozilla/CDMProxy.h"
#include "mozilla/ClearOnShutdown.h" #include "mozilla/ClearOnShutdown.h"
@@ -221,9 +223,11 @@ PDMFactory::CreateDecoder(const CreateDecoderParams& aParams)
if (mFFmpegFailedToLoad) { if (mFFmpegFailedToLoad) {
diagnostics->SetFFmpegFailedToLoad(); diagnostics->SetFFmpegFailedToLoad();
} }
#ifdef MOZ_GMP
if (mGMPPDMFailedToStartup) { if (mGMPPDMFailedToStartup) {
diagnostics->SetGMPPDMFailedToStartup(); diagnostics->SetGMPPDMFailedToStartup();
} }
#endif
} }
for (auto& current : mCurrentPDMs) { for (auto& current : mCurrentPDMs) {
@@ -393,12 +397,14 @@ PDMFactory::CreatePDMs()
m = new AgnosticDecoderModule(); m = new AgnosticDecoderModule();
StartupPDM(m); StartupPDM(m);
#ifdef MOZ_GMP
if (MediaPrefs::PDMGMPEnabled()) { if (MediaPrefs::PDMGMPEnabled()) {
m = new GMPDecoderModule(); m = new GMPDecoderModule();
mGMPPDMFailedToStartup = !StartupPDM(m); mGMPPDMFailedToStartup = !StartupPDM(m);
} else { } else {
mGMPPDMFailedToStartup = false; mGMPPDMFailedToStartup = false;
} }
#endif
} }
void void
@@ -431,9 +437,11 @@ PDMFactory::GetDecoder(const TrackInfo& aTrackInfo,
if (mFFmpegFailedToLoad) { if (mFFmpegFailedToLoad) {
aDiagnostics->SetFFmpegFailedToLoad(); aDiagnostics->SetFFmpegFailedToLoad();
} }
#ifdef MOZ_GMP
if (mGMPPDMFailedToStartup) { if (mGMPPDMFailedToStartup) {
aDiagnostics->SetGMPPDMFailedToStartup(); aDiagnostics->SetGMPPDMFailedToStartup();
} }
#endif
} }
RefPtr<PlatformDecoderModule> pdm; RefPtr<PlatformDecoderModule> pdm;
+2
View File
@@ -70,7 +70,9 @@ private:
bool mWMFFailedToLoad = false; bool mWMFFailedToLoad = false;
bool mFFmpegFailedToLoad = false; bool mFFmpegFailedToLoad = false;
#ifdef MOZ_GMP
bool mGMPPDMFailedToStartup = false; bool mGMPPDMFailedToStartup = false;
#endif
void EnsureInit() const; void EnsureInit() const;
template<class T> friend class StaticAutoPtr; template<class T> friend class StaticAutoPtr;
@@ -16,7 +16,9 @@
#include "mozilla/layers/KnowsCompositor.h" #include "mozilla/layers/KnowsCompositor.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "mozilla/RefPtr.h" #include "mozilla/RefPtr.h"
#ifdef MOZ_GMP
#include "GMPService.h" #include "GMPService.h"
#endif
#include <queue> #include <queue>
#include "MediaResult.h" #include "MediaResult.h"
@@ -38,7 +40,9 @@ class RemoteDecoderModule;
class MediaDataDecoder; class MediaDataDecoder;
class MediaDataDecoderCallback; class MediaDataDecoderCallback;
class TaskQueue; class TaskQueue;
#ifdef MOZ_EME
class CDMProxy; class CDMProxy;
#endif
static LazyLogModule sPDMLog("PlatformDecoderModule"); static LazyLogModule sPDMLog("PlatformDecoderModule");
@@ -81,7 +85,9 @@ struct MOZ_STACK_CLASS CreateDecoderParams final {
layers::ImageContainer* mImageContainer = nullptr; layers::ImageContainer* mImageContainer = nullptr;
MediaResult* mError = nullptr; MediaResult* mError = nullptr;
RefPtr<layers::KnowsCompositor> mKnowsCompositor; RefPtr<layers::KnowsCompositor> mKnowsCompositor;
#ifdef MOZ_GMP
RefPtr<GMPCrashHelper> mCrashHelper; RefPtr<GMPCrashHelper> mCrashHelper;
#endif
bool mUseBlankDecoder = false; bool mUseBlankDecoder = false;
private: private:
@@ -90,7 +96,9 @@ private:
void Set(DecoderDoctorDiagnostics* aDiagnostics) { mDiagnostics = aDiagnostics; } void Set(DecoderDoctorDiagnostics* aDiagnostics) { mDiagnostics = aDiagnostics; }
void Set(layers::ImageContainer* aImageContainer) { mImageContainer = aImageContainer; } void Set(layers::ImageContainer* aImageContainer) { mImageContainer = aImageContainer; }
void Set(MediaResult* aError) { mError = aError; } void Set(MediaResult* aError) { mError = aError; }
#ifdef MOZ_GMP
void Set(GMPCrashHelper* aCrashHelper) { mCrashHelper = aCrashHelper; } void Set(GMPCrashHelper* aCrashHelper) { mCrashHelper = aCrashHelper; }
#endif
void Set(bool aUseBlankDecoder) { mUseBlankDecoder = aUseBlankDecoder; } void Set(bool aUseBlankDecoder) { mUseBlankDecoder = aUseBlankDecoder; }
void Set(layers::KnowsCompositor* aKnowsCompositor) { mKnowsCompositor = aKnowsCompositor; } void Set(layers::KnowsCompositor* aKnowsCompositor) { mKnowsCompositor = aKnowsCompositor; }
template <typename T1, typename T2, typename... Ts> template <typename T1, typename T2, typename... Ts>
+6 -2
View File
@@ -29,11 +29,15 @@ UNIFIED_SOURCES += [
] ]
DIRS += [ DIRS += [
'agnostic/eme',
'agnostic/gmp',
'omx' 'omx'
] ]
if CONFIG['MOZ_EME']:
DIRS += ['agnostic/eme']
if CONFIG['MOZ_GMP']:
DIRS += ['agnostic/gmp']
if CONFIG['MOZ_WMF']: if CONFIG['MOZ_WMF']:
DIRS += [ 'wmf' ]; DIRS += [ 'wmf' ];
@@ -25,7 +25,9 @@
#include "IMFYCbCrImage.h" #include "IMFYCbCrImage.h"
#include "mozilla/WindowsVersion.h" #include "mozilla/WindowsVersion.h"
#include "nsPrintfCString.h" #include "nsPrintfCString.h"
#ifdef MOZ_GMP
#include "GMPUtils.h" // For SplitAt. TODO: Move SplitAt to a central place. #include "GMPUtils.h" // For SplitAt. TODO: Move SplitAt to a central place.
#endif
#include "MP4Decoder.h" #include "MP4Decoder.h"
#include "VPXDecoder.h" #include "VPXDecoder.h"
#include "mozilla/SyncRunnable.h" #include "mozilla/SyncRunnable.h"
@@ -66,6 +68,23 @@ const CLSID CLSID_WebmMfVpxDec =
namespace mozilla { namespace mozilla {
#ifndef MOZ_GMP
// Utility function only used when not building GMP
// XXXMC: Perhaps make this available globally?
void
SplitAt(const char* aDelims,
const nsACString& aInput,
nsTArray<nsCString>& aOutTokens)
{
nsAutoCString str(aInput);
char* end = str.BeginWriting();
const char* start = nullptr;
while (!!(start = NS_strtok(aDelims, &end))) {
aOutTokens.AppendElement(nsCString(start));
}
}
#endif
LayersBackend LayersBackend
GetCompositorBackendType(layers::KnowsCompositor* aKnowsCompositor) GetCompositorBackendType(layers::KnowsCompositor* aKnowsCompositor)
{ {
@@ -25,7 +25,9 @@ H264Converter::H264Converter(PlatformDecoderModule* aPDM,
, mTaskQueue(aParams.mTaskQueue) , mTaskQueue(aParams.mTaskQueue)
, mCallback(aParams.mCallback) , mCallback(aParams.mCallback)
, mDecoder(nullptr) , mDecoder(nullptr)
#ifdef MOZ_GMP
, mGMPCrashHelper(aParams.mCrashHelper) , mGMPCrashHelper(aParams.mCrashHelper)
#endif
, mNeedAVCC(aPDM->DecoderNeedsConversion(aParams.mConfig) , mNeedAVCC(aPDM->DecoderNeedsConversion(aParams.mConfig)
== PlatformDecoderModule::ConversionRequired::kNeedAVCC) == PlatformDecoderModule::ConversionRequired::kNeedAVCC)
, mLastError(NS_OK) , mLastError(NS_OK)
@@ -201,8 +203,12 @@ H264Converter::CreateDecoder(DecoderDoctorDiagnostics* aDiagnostics)
mCallback, mCallback,
aDiagnostics, aDiagnostics,
mImageContainer, mImageContainer,
#ifdef MOZ_GMP
mKnowsCompositor, mKnowsCompositor,
mGMPCrashHelper mGMPCrashHelper
#else
mKnowsCompositor
#endif
}); });
if (!mDecoder) { if (!mDecoder) {
@@ -62,7 +62,9 @@ private:
MediaDataDecoderCallback* mCallback; MediaDataDecoderCallback* mCallback;
RefPtr<MediaDataDecoder> mDecoder; RefPtr<MediaDataDecoder> mDecoder;
MozPromiseRequestHolder<InitPromise> mInitPromiseRequest; MozPromiseRequestHolder<InitPromise> mInitPromiseRequest;
#ifdef MOZ_GMP
RefPtr<GMPCrashHelper> mGMPCrashHelper; RefPtr<GMPCrashHelper> mGMPCrashHelper;
#endif
bool mNeedAVCC; bool mNeedAVCC;
nsresult mLastError; nsresult mLastError;
bool mNeedKeyframe = true; bool mNeedKeyframe = true;
+6
View File
@@ -425,7 +425,9 @@ support-files =
dirac.ogg^headers^ dirac.ogg^headers^
dynamic_redirect.sjs dynamic_redirect.sjs
dynamic_resource.sjs dynamic_resource.sjs
#ifdef MOZ_EME
eme.js eme.js
#endif
file_access_controls.html file_access_controls.html
flac-s24.flac flac-s24.flac
flac-s24.flac^headers^ flac-s24.flac^headers^
@@ -682,6 +684,7 @@ tags=capturestream
[test_decoder_disable.html] [test_decoder_disable.html]
[test_defaultMuted.html] [test_defaultMuted.html]
[test_delay_load.html] [test_delay_load.html]
#ifdef MOZ_EME
[test_eme_session_callable_value.html] [test_eme_session_callable_value.html]
[test_eme_canvas_blocked.html] [test_eme_canvas_blocked.html]
skip-if = toolkit == 'android' # bug 1149374 skip-if = toolkit == 'android' # bug 1149374
@@ -712,13 +715,16 @@ tags=msg capturestream
skip-if = toolkit == 'android' # bug 1149374 skip-if = toolkit == 'android' # bug 1149374
[test_eme_waitingforkey.html] [test_eme_waitingforkey.html]
skip-if = toolkit == 'android' # bug 1149374 skip-if = toolkit == 'android' # bug 1149374
#endif
[test_empty_resource.html] [test_empty_resource.html]
[test_error_in_video_document.html] [test_error_in_video_document.html]
[test_error_on_404.html] [test_error_on_404.html]
[test_fastSeek.html] [test_fastSeek.html]
[test_fastSeek-forwards.html] [test_fastSeek-forwards.html]
#ifdef MOZ_GMP
[test_gmp_playback.html] [test_gmp_playback.html]
skip-if = (os != 'win' || os_version == '5.1') # Only gmp-clearkey on Windows Vista and later decodes skip-if = (os != 'win' || os_version == '5.1') # Only gmp-clearkey on Windows Vista and later decodes
#endif
[test_imagecapture.html] [test_imagecapture.html]
[test_info_leak.html] [test_info_leak.html]
[test_invalid_reject.html] [test_invalid_reject.html]
+10
View File
@@ -7,15 +7,23 @@
#include "nsISupports.h" #include "nsISupports.h"
#include "MediaResource.h" #include "MediaResource.h"
#ifdef MOZ_GMP
#include "GMPService.h" #include "GMPService.h"
#endif
namespace mozilla { namespace mozilla {
NS_IMPL_ISUPPORTS0(BufferDecoder) NS_IMPL_ISUPPORTS0(BufferDecoder)
#ifdef MOZ_GMP
BufferDecoder::BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper) BufferDecoder::BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper)
#else
BufferDecoder::BufferDecoder(MediaResource* aResource)
#endif
: mResource(aResource) : mResource(aResource)
#ifdef MOZ_GMP
, mCrashHelper(aCrashHelper) , mCrashHelper(aCrashHelper)
#endif
{ {
MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(NS_IsMainThread());
MOZ_COUNT_CTOR(BufferDecoder); MOZ_COUNT_CTOR(BufferDecoder);
@@ -67,10 +75,12 @@ BufferDecoder::GetOwner() const
return nullptr; return nullptr;
} }
#ifdef MOZ_GMP
already_AddRefed<GMPCrashHelper> already_AddRefed<GMPCrashHelper>
BufferDecoder::GetCrashHelper() BufferDecoder::GetCrashHelper()
{ {
return do_AddRef(mCrashHelper); return do_AddRef(mCrashHelper);
} }
#endif
} // namespace mozilla } // namespace mozilla
+8
View File
@@ -23,7 +23,11 @@ class BufferDecoder final : public AbstractMediaDecoder
public: public:
// This class holds a weak pointer to MediaResource. It's the responsibility // This class holds a weak pointer to MediaResource. It's the responsibility
// of the caller to manage the memory of the MediaResource object. // of the caller to manage the memory of the MediaResource object.
#ifdef MOZ_GMP
explicit BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper); explicit BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper);
#else
explicit BufferDecoder(MediaResource* aResource);
#endif
NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_THREADSAFE_ISUPPORTS
@@ -39,13 +43,17 @@ public:
MediaDecoderOwner* GetOwner() const final override; MediaDecoderOwner* GetOwner() const final override;
#ifdef MOZ_GMP
already_AddRefed<GMPCrashHelper> GetCrashHelper() override; already_AddRefed<GMPCrashHelper> GetCrashHelper() override;
#endif
private: private:
virtual ~BufferDecoder(); virtual ~BufferDecoder();
RefPtr<TaskQueue> mTaskQueueIdentity; RefPtr<TaskQueue> mTaskQueueIdentity;
RefPtr<MediaResource> mResource; RefPtr<MediaResource> mResource;
#ifdef MOZ_GMP
RefPtr<GMPCrashHelper> mCrashHelper; RefPtr<GMPCrashHelper> mCrashHelper;
#endif
}; };
} // namespace mozilla } // namespace mozilla
@@ -24,7 +24,9 @@
#include "WebAudioUtils.h" #include "WebAudioUtils.h"
#include "mozilla/dom/Promise.h" #include "mozilla/dom/Promise.h"
#include "nsPrintfCString.h" #include "nsPrintfCString.h"
#ifdef MOZ_GMP
#include "GMPService.h" #include "GMPService.h"
#endif
namespace mozilla { namespace mozilla {
@@ -180,6 +182,7 @@ MediaDecodeTask::Run()
return NS_OK; return NS_OK;
} }
#ifdef MOZ_GMP
class BufferDecoderGMPCrashHelper : public GMPCrashHelper class BufferDecoderGMPCrashHelper : public GMPCrashHelper
{ {
public: public:
@@ -197,6 +200,7 @@ public:
private: private:
nsWeakPtr mParent; nsWeakPtr mParent;
}; };
#endif
bool bool
MediaDecodeTask::CreateReader() MediaDecodeTask::CreateReader()
@@ -215,8 +219,12 @@ MediaDecodeTask::CreateReader()
mLength, principal, mContentType); mLength, principal, mContentType);
MOZ_ASSERT(!mBufferDecoder); MOZ_ASSERT(!mBufferDecoder);
#ifdef MOZ_GMP
mBufferDecoder = new BufferDecoder(resource, mBufferDecoder = new BufferDecoder(resource,
new BufferDecoderGMPCrashHelper(mDecodeJob.mContext->GetParentObject())); new BufferDecoderGMPCrashHelper(mDecodeJob.mContext->GetParentObject()));
#else
mBufferDecoder = new BufferDecoder(resource);
#endif
// If you change this list to add support for new decoders, please consider // If you change this list to add support for new decoders, please consider
// updating HTMLMediaElement::CreateDecoder as well. // updating HTMLMediaElement::CreateDecoder as well.
+4
View File
@@ -8,6 +8,10 @@ include "ipc/nsGUIEventIPC.h";
include protocol PCompositorBridge; 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 CSSRect from "Units.h";
using LayoutDeviceCoord from "Units.h"; using LayoutDeviceCoord from "Units.h";
using LayoutDeviceIntPoint from "Units.h"; using LayoutDeviceIntPoint from "Units.h";
+8 -6
View File
@@ -18,12 +18,14 @@ LOCAL_INCLUDES += [
# We link GMPLoader into plugin-container on desktop so that its code is # We link GMPLoader into plugin-container on desktop so that its code is
# covered by the desktop DRM vendor's voucher. # covered by the desktop DRM vendor's voucher.
SOURCES += [ if CONFIG['MOZ_GMP']:
'../../dom/media/gmp/GMPLoader.cpp', SOURCES += [
] '../../dom/media/gmp/GMPLoader.cpp',
USE_LIBS += [ ]
'rlz',
] USE_LIBS += [
'rlz',
]
# DELAYLOAD_DLLS in this block ensures that the DLL blocklist is functional # DELAYLOAD_DLLS in this block ensures that the DLL blocklist is functional
if CONFIG['OS_ARCH'] == 'WINNT': if CONFIG['OS_ARCH'] == 'WINNT':
+9 -1
View File
@@ -19,6 +19,7 @@
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef MOZ_GMP
#include "GMPLoader.h" #include "GMPLoader.h"
mozilla::gmp::SandboxStarter* mozilla::gmp::SandboxStarter*
@@ -26,6 +27,7 @@ MakeSandboxStarter()
{ {
return nullptr; return nullptr;
} }
#endif
int int
content_process_main(int argc, char* argv[]) content_process_main(int argc, char* argv[])
@@ -36,7 +38,9 @@ content_process_main(int argc, char* argv[])
return 3; return 3;
} }
#ifdef MOZ_GMP
XREChildData childData; XREChildData childData;
#endif
XRE_SetProcessType(argv[--argc]); XRE_SetProcessType(argv[--argc]);
@@ -50,15 +54,19 @@ content_process_main(int argc, char* argv[])
} }
#endif #endif
#ifdef MOZ_PLUGIN_CONTAINER #ifdef MOZ_PLUGIN_CONTAINER
#ifdef MOZ_GMP
// On desktop, the GMPLoader lives in plugin-container, so that its // On desktop, the GMPLoader lives in plugin-container, so that its
// code can be covered by an EME/GMP vendor's voucher. // code can be covered by an EME/GMP vendor's voucher.
nsAutoPtr<mozilla::gmp::SandboxStarter> starter(MakeSandboxStarter()); nsAutoPtr<mozilla::gmp::SandboxStarter> starter(MakeSandboxStarter());
if (XRE_GetProcessType() == GeckoProcessType_GMPlugin) { if (XRE_GetProcessType() == GeckoProcessType_GMPlugin) {
childData.gmpLoader = mozilla::gmp::CreateGMPLoader(starter); childData.gmpLoader = mozilla::gmp::CreateGMPLoader(starter);
} }
#endif
nsresult rv = XRE_InitChildProcess(argc, argv, &childData); nsresult rv = XRE_InitChildProcess(argc, argv, &childData);
#else
nsresult rv = XRE_InitChildProcess(argc, argv);
#endif
NS_ENSURE_SUCCESS(rv, 1); NS_ENSURE_SUCCESS(rv, 1);
#endif
return 0; return 0;
} }
+12
View File
@@ -175,7 +175,9 @@ static void Shutdown();
#include "MediaManager.h" #include "MediaManager.h"
#ifdef MOZ_GMP
#include "GMPService.h" #include "GMPService.h"
#endif
#include "nsScriptError.h" #include "nsScriptError.h"
@@ -190,7 +192,9 @@ using mozilla::dom::workers::WorkerDebuggerManager;
using mozilla::dom::UDPSocketChild; using mozilla::dom::UDPSocketChild;
using mozilla::dom::time::TimeService; using mozilla::dom::time::TimeService;
using mozilla::net::StreamingProtocolControllerService; using mozilla::net::StreamingProtocolControllerService;
#ifdef MOZ_GMP
using mozilla::gmp::GeckoMediaPluginService; using mozilla::gmp::GeckoMediaPluginService;
#endif
#define NS_EDITORCOMMANDTABLE_CID \ #define NS_EDITORCOMMANDTABLE_CID \
{ 0x4f5e62b8, 0xd659, 0x4156, \ { 0x4f5e62b8, 0xd659, 0x4156, \
@@ -516,7 +520,9 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsStructuredCloneContainer)
NS_GENERIC_FACTORY_CONSTRUCTOR(OSFileConstantsService) NS_GENERIC_FACTORY_CONSTRUCTOR(OSFileConstantsService)
NS_GENERIC_FACTORY_CONSTRUCTOR(UDPSocketChild) NS_GENERIC_FACTORY_CONSTRUCTOR(UDPSocketChild)
#ifdef MOZ_GMP
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(GeckoMediaPluginService, GeckoMediaPluginService::GetGeckoMediaPluginService) NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(GeckoMediaPluginService, GeckoMediaPluginService::GetGeckoMediaPluginService)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptError) NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptError)
@@ -661,7 +667,9 @@ NS_DEFINE_NAMED_CID(NS_SYNTHVOICEREGISTRY_CID);
NS_DEFINE_NAMED_CID(NS_ACCESSIBILITY_SERVICE_CID); NS_DEFINE_NAMED_CID(NS_ACCESSIBILITY_SERVICE_CID);
#endif #endif
#ifdef MOZ_GMP
NS_DEFINE_NAMED_CID(GECKO_MEDIA_PLUGIN_SERVICE_CID); NS_DEFINE_NAMED_CID(GECKO_MEDIA_PLUGIN_SERVICE_CID);
#endif
NS_DEFINE_NAMED_CID(TEXT_INPUT_PROCESSOR_CID); NS_DEFINE_NAMED_CID(TEXT_INPUT_PROCESSOR_CID);
@@ -904,7 +912,9 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
{ &kNS_POWERMANAGERSERVICE_CID, false, nullptr, nsIPowerManagerServiceConstructor, Module::ALLOW_IN_GPU_PROCESS }, { &kNS_POWERMANAGERSERVICE_CID, false, nullptr, nsIPowerManagerServiceConstructor, Module::ALLOW_IN_GPU_PROCESS },
{ &kOSFILECONSTANTSSERVICE_CID, true, nullptr, OSFileConstantsServiceConstructor }, { &kOSFILECONSTANTSSERVICE_CID, true, nullptr, OSFileConstantsServiceConstructor },
{ &kUDPSOCKETCHILD_CID, false, nullptr, UDPSocketChildConstructor }, { &kUDPSOCKETCHILD_CID, false, nullptr, UDPSocketChildConstructor },
#ifdef MOZ_GMP
{ &kGECKO_MEDIA_PLUGIN_SERVICE_CID, true, nullptr, GeckoMediaPluginServiceConstructor }, { &kGECKO_MEDIA_PLUGIN_SERVICE_CID, true, nullptr, GeckoMediaPluginServiceConstructor },
#endif
{ &kNS_TIMESERVICE_CID, false, nullptr, nsITimeServiceConstructor }, { &kNS_TIMESERVICE_CID, false, nullptr, nsITimeServiceConstructor },
{ &kNS_MEDIASTREAMCONTROLLERSERVICE_CID, false, nullptr, nsIStreamingProtocolControllerServiceConstructor }, { &kNS_MEDIASTREAMCONTROLLERSERVICE_CID, false, nullptr, nsIStreamingProtocolControllerServiceConstructor },
{ &kNS_MEDIAMANAGERSERVICE_CID, false, nullptr, nsIMediaManagerServiceConstructor }, { &kNS_MEDIAMANAGERSERVICE_CID, false, nullptr, nsIMediaManagerServiceConstructor },
@@ -1028,7 +1038,9 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
{ "@mozilla.org/accessibilityService;1", &kNS_ACCESSIBILITY_SERVICE_CID }, { "@mozilla.org/accessibilityService;1", &kNS_ACCESSIBILITY_SERVICE_CID },
{ "@mozilla.org/accessibleRetrieval;1", &kNS_ACCESSIBILITY_SERVICE_CID }, { "@mozilla.org/accessibleRetrieval;1", &kNS_ACCESSIBILITY_SERVICE_CID },
#endif #endif
#ifdef MOZ_GMP
{ "@mozilla.org/gecko-media-plugin-service;1", &kGECKO_MEDIA_PLUGIN_SERVICE_CID }, { "@mozilla.org/gecko-media-plugin-service;1", &kGECKO_MEDIA_PLUGIN_SERVICE_CID },
#endif
{ "@mozilla.org/text-input-processor;1", &kTEXT_INPUT_PROCESSOR_CID }, { "@mozilla.org/text-input-processor;1", &kTEXT_INPUT_PROCESSOR_CID },
{ NS_SCRIPTERROR_CONTRACTID, &kNS_SCRIPTERROR_CID }, { NS_SCRIPTERROR_CONTRACTID, &kNS_SCRIPTERROR_CID },
{ nullptr } { nullptr }
+6 -1
View File
@@ -418,9 +418,11 @@ pref("media.libavcodec.allow-obsolete", false);
#if defined(MOZ_FFVPX) #if defined(MOZ_FFVPX)
pref("media.ffvpx.enabled", true); pref("media.ffvpx.enabled", true);
#endif #endif
#ifdef MOZ_GMP
pref("media.gmp.decoder.enabled", false); pref("media.gmp.decoder.enabled", false);
pref("media.gmp.decoder.aac", 0); pref("media.gmp.decoder.aac", 0);
pref("media.gmp.decoder.h264", 0); pref("media.gmp.decoder.h264", 0);
#endif
#ifdef MOZ_RAW #ifdef MOZ_RAW
pref("media.raw.enabled", true); pref("media.raw.enabled", true);
#endif #endif
@@ -437,13 +439,14 @@ pref("media.apple.mp3.enabled", true);
pref("media.apple.mp4.enabled", true); pref("media.apple.mp4.enabled", true);
#endif #endif
#ifdef MOZ_GMP
// GMP storage version number. At startup we check the version against // GMP storage version number. At startup we check the version against
// media.gmp.storage.version.observed, and if the versions don't match, // media.gmp.storage.version.observed, and if the versions don't match,
// we clear storage and set media.gmp.storage.version.observed=expected. // we clear storage and set media.gmp.storage.version.observed=expected.
// This provides a mechanism to clear GMP storage when non-compatible // This provides a mechanism to clear GMP storage when non-compatible
// changes are made. // changes are made.
pref("media.gmp.storage.version.expected", 1); pref("media.gmp.storage.version.expected", 1);
#endif
// Filter what triggers user notifications. // Filter what triggers user notifications.
// See DecoderDoctorDocumentWatcher::ReportAnalysis for details. // See DecoderDoctorDocumentWatcher::ReportAnalysis for details.
pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaCannotPlayNoDecoders,MediaUnsupportedLibavcodec"); pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaCannotPlayNoDecoders,MediaUnsupportedLibavcodec");
@@ -5066,6 +5069,7 @@ pref("browser.search.reset.whitelist", "");
pref("browser.search.official", true); pref("browser.search.official", true);
#endif #endif
#ifdef MOZ_GMP
// GMPInstallManager prefs // GMPInstallManager prefs
// User-settable override to media.gmp-manager.url for testing purposes. // User-settable override to media.gmp-manager.url for testing purposes.
@@ -5101,6 +5105,7 @@ pref("media.gmp-manager.certs.1.issuerName", "CN=DigiCert SHA2 Secure Server CA,
pref("media.gmp-manager.certs.1.commonName", "aus5.mozilla.org"); 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.issuerName", "CN=thawte SSL CA - G2,O=\"thawte, Inc.\",C=US");
pref("media.gmp-manager.certs.2.commonName", "aus5.mozilla.org"); pref("media.gmp-manager.certs.2.commonName", "aus5.mozilla.org");
#endif
// Whether or not to perform reader mode article parsing on page load. // 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. // If this pref is disabled, we will never show a reader mode icon in the toolbar.
+19
View File
@@ -2061,6 +2061,7 @@ MOZ_VORBIS=
MOZ_TREMOR= MOZ_TREMOR=
MOZ_SAMPLE_TYPE_FLOAT32= MOZ_SAMPLE_TYPE_FLOAT32=
MOZ_SAMPLE_TYPE_S16= MOZ_SAMPLE_TYPE_S16=
MOZ_GMP=
MOZ_WEBRTC= MOZ_WEBRTC=
MOZ_PEERCONNECTION= MOZ_PEERCONNECTION=
MOZ_SRTP= MOZ_SRTP=
@@ -2810,6 +2811,24 @@ else
AC_SUBST(MOZ_SAMPLE_TYPE_FLOAT32) AC_SUBST(MOZ_SAMPLE_TYPE_FLOAT32)
fi fi
dnl ========================================================
dnl = Enable Gecko Media Plugins
dnl ========================================================
if test -n "$MOZ_EME"; then
MOZ_GMP=1
fi
if test -n "$MOZ_WEBRTC"; then
MOZ_GMP=1
fi
if test -n "$MOZ_GMP"; then
AC_DEFINE(MOZ_GMP)
fi
AC_SUBST(MOZ_GMP)
dnl ======================================================== dnl ========================================================
dnl = Enable Raw Codecs dnl = Enable Raw Codecs
dnl ======================================================== dnl ========================================================
@@ -949,6 +949,7 @@ class GTestCommands(MachCommandBase):
# https://code.google.com/p/googletest/wiki/AdvancedGuide#Running_Test_Programs:_Advanced_Options # https://code.google.com/p/googletest/wiki/AdvancedGuide#Running_Test_Programs:_Advanced_Options
gtest_env = {b'GTEST_FILTER': gtest_filter} gtest_env = {b'GTEST_FILTER': gtest_filter}
#ifdef MOZ_GMP
# Note: we must normalize the path here so that gtest on Windows sees # Note: we must normalize the path here so that gtest on Windows sees
# a MOZ_GMP_PATH which has only Windows dir seperators, because # a MOZ_GMP_PATH which has only Windows dir seperators, because
# nsILocalFile cannot open the paths with non-Windows dir seperators. # nsILocalFile cannot open the paths with non-Windows dir seperators.
@@ -958,6 +959,7 @@ class GTestCommands(MachCommandBase):
os.path.join(xre_path, p, "1.0") os.path.join(xre_path, p, "1.0")
for p in ('gmp-fake', 'gmp-fakeopenh264') for p in ('gmp-fake', 'gmp-fakeopenh264')
) )
#endif
gtest_env[b"MOZ_RUN_GTEST"] = b"True" gtest_env[b"MOZ_RUN_GTEST"] = b"True"
+2
View File
@@ -1499,6 +1499,7 @@ toolbar#nav-bar {
if not self.disable_leak_checking: if not self.disable_leak_checking:
browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leak_report_file browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leak_report_file
#ifdef MOZ_GMP
try: try:
gmp_path = self.getGMPPluginPath(options) gmp_path = self.getGMPPluginPath(options)
if gmp_path is not None: if gmp_path is not None:
@@ -1506,6 +1507,7 @@ toolbar#nav-bar {
except EnvironmentError: except EnvironmentError:
self.log.error('Could not find path to gmp-fake plugin!') self.log.error('Could not find path to gmp-fake plugin!')
return None return None
#endif
if options.fatalAssertions: if options.fatalAssertions:
browserEnv["XPCOM_DEBUG_BREAK"] = "stack-and-abort" browserEnv["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
@@ -128,8 +128,10 @@ this.CrashManager.prototype = Object.freeze({
// A crash in a plugin process. // A crash in a plugin process.
PROCESS_TYPE_PLUGIN: "plugin", PROCESS_TYPE_PLUGIN: "plugin",
#ifdef MOZ_GMP
// A crash in a Gecko media plugin process. // A crash in a Gecko media plugin process.
PROCESS_TYPE_GMPLUGIN: "gmplugin", PROCESS_TYPE_GMPLUGIN: "gmplugin",
#endif
// A crash in the GPU process. // A crash in the GPU process.
PROCESS_TYPE_GPU: "gpu", PROCESS_TYPE_GPU: "gpu",
@@ -34,9 +34,11 @@ CrashService.prototype = Object.freeze({
case Ci.nsICrashService.PROCESS_TYPE_PLUGIN: case Ci.nsICrashService.PROCESS_TYPE_PLUGIN:
processType = Services.crashmanager.PROCESS_TYPE_PLUGIN; processType = Services.crashmanager.PROCESS_TYPE_PLUGIN;
break; break;
#ifdef MOZ_GMP
case Ci.nsICrashService.PROCESS_TYPE_GMPLUGIN: case Ci.nsICrashService.PROCESS_TYPE_GMPLUGIN:
processType = Services.crashmanager.PROCESS_TYPE_GMPLUGIN; processType = Services.crashmanager.PROCESS_TYPE_GMPLUGIN;
break; break;
#endif
case Ci.nsICrashService.PROCESS_TYPE_GPU: case Ci.nsICrashService.PROCESS_TYPE_GPU:
processType = Services.crashmanager.PROCESS_TYPE_GPU; processType = Services.crashmanager.PROCESS_TYPE_GPU;
break; break;
+3 -1
View File
@@ -52,7 +52,7 @@ toolkit.jar:
#ifdef MOZ_PHOENIX #ifdef MOZ_PHOENIX
content/global/logopage.xhtml content/global/logopage.xhtml
#endif #endif
content/global/process-content.js * content/global/process-content.js
content/global/resetProfile.css content/global/resetProfile.css
content/global/resetProfile.js content/global/resetProfile.js
content/global/resetProfile.xul content/global/resetProfile.xul
@@ -122,6 +122,8 @@ toolkit.jar:
content/global/macWindowMenu.js content/global/macWindowMenu.js
#endif #endif
content/global/svg/svgBindings.xml (/layout/svg/resources/content/svgBindings.xml) content/global/svg/svgBindings.xml (/layout/svg/resources/content/svgBindings.xml)
#ifdef MOZ_GMP
content/global/gmp-sources/eme-adobe.json (gmp-sources/eme-adobe.json) content/global/gmp-sources/eme-adobe.json (gmp-sources/eme-adobe.json)
content/global/gmp-sources/openh264.json (gmp-sources/openh264.json) content/global/gmp-sources/openh264.json (gmp-sources/openh264.json)
content/global/gmp-sources/widevinecdm.json (gmp-sources/widevinecdm.json) content/global/gmp-sources/widevinecdm.json (gmp-sources/widevinecdm.json)
#endif
+2
View File
@@ -14,12 +14,14 @@ Cu.import("resource://gre/modules/Services.jsm");
const gInContentProcess = Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT; const gInContentProcess = Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT;
#ifdef MOZ_GMP
Services.cpmm.addMessageListener("gmp-plugin-crash", msg => { Services.cpmm.addMessageListener("gmp-plugin-crash", msg => {
let gmpservice = Cc["@mozilla.org/gecko-media-plugin-service;1"] let gmpservice = Cc["@mozilla.org/gecko-media-plugin-service;1"]
.getService(Ci.mozIGeckoMediaPluginService); .getService(Ci.mozIGeckoMediaPluginService);
gmpservice.RunPluginCrashCallbacks(msg.data.pluginID, msg.data.pluginName); gmpservice.RunPluginCrashCallbacks(msg.data.pluginID, msg.data.pluginName);
}); });
#endif
if (gInContentProcess) { if (gInContentProcess) {
let ProcessObserver = { let ProcessObserver = {
@@ -84,6 +84,7 @@ this.ForgetAboutSite = {
throw new Error("Exception thrown while clearning cookies: " + ex); throw new Error("Exception thrown while clearning cookies: " + ex);
})); }));
#ifdef MOZ_EME
// EME // EME
promises.push(Task.spawn(function*() { promises.push(Task.spawn(function*() {
let mps = Cc["@mozilla.org/gecko-media-plugin-service;1"]. let mps = Cc["@mozilla.org/gecko-media-plugin-service;1"].
@@ -92,6 +93,7 @@ this.ForgetAboutSite = {
}).catch(ex => { }).catch(ex => {
throw new Error("Exception thrown while clearing Encrypted Media Extensions: " + ex); throw new Error("Exception thrown while clearing Encrypted Media Extensions: " + ex);
})); }));
#endif
// Plugin data // Plugin data
const phInterface = Ci.nsIPluginHost; const phInterface = Ci.nsIPluginHost;
+1 -1
View File
@@ -3,4 +3,4 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this # 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/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXTRA_JS_MODULES += ['ForgetAboutSite.jsm'] EXTRA_PP_JS_MODULES += ['ForgetAboutSite.jsm']
@@ -58,7 +58,9 @@ notification.installError=There was an error installing %1$S.
notification.installError.retry=Try again notification.installError.retry=Try again
notification.installError.retry.tooltip=Try downloading and installing this add-on again notification.installError.retry.tooltip=Try downloading and installing this add-on again
#LOCALIZATION NOTE (notification.gmpPending) %1$S is the add-on name. #LOCALIZATION NOTE (notification.gmpPending) %1$S is the add-on name.
#ifdef MOZ_GMP
notification.gmpPending=%1$S will be installed shortly. notification.gmpPending=%1$S will be installed shortly.
#endif
#LOCALIZATION NOTE (contributionAmount2) %S is the currency amount recommended for contributions #LOCALIZATION NOTE (contributionAmount2) %S is the currency amount recommended for contributions
contributionAmount2=Suggested Contribution: %S contributionAmount2=Suggested Contribution: %S
@@ -101,7 +103,9 @@ details.notification.uninstall=%1$S will be uninstalled after you restart %2$S.
#LOCALIZATION NOTE (details.notification.upgrade) %1$S is the add-on name, %2$S is brand name #LOCALIZATION NOTE (details.notification.upgrade) %1$S is the add-on name, %2$S is brand name
details.notification.upgrade=%1$S will be updated after you restart %2$S. details.notification.upgrade=%1$S will be updated after you restart %2$S.
#LOCALIZATION NOTE (details.notification.gmpPending) %1$S is the add-on name #LOCALIZATION NOTE (details.notification.gmpPending) %1$S is the add-on name
#ifdef MOZ_GMP
details.notification.gmpPending=%1$S will be installed shortly. details.notification.gmpPending=%1$S will be installed shortly.
#endif
installFromFile.dialogTitle=Select add-on to install installFromFile.dialogTitle=Select add-on to install
installFromFile.filterName=Add-ons installFromFile.filterName=Add-ons
+1 -1
View File
@@ -96,7 +96,7 @@
locale/@AB_CD@/mozapps/downloads/downloads.dtd (%chrome/mozapps/downloads/downloads.dtd) locale/@AB_CD@/mozapps/downloads/downloads.dtd (%chrome/mozapps/downloads/downloads.dtd)
locale/@AB_CD@/mozapps/downloads/downloads.properties (%chrome/mozapps/downloads/downloads.properties) locale/@AB_CD@/mozapps/downloads/downloads.properties (%chrome/mozapps/downloads/downloads.properties)
* locale/@AB_CD@/mozapps/extensions/extensions.dtd (%chrome/mozapps/extensions/extensions.dtd) * locale/@AB_CD@/mozapps/extensions/extensions.dtd (%chrome/mozapps/extensions/extensions.dtd)
locale/@AB_CD@/mozapps/extensions/extensions.properties (%chrome/mozapps/extensions/extensions.properties) * locale/@AB_CD@/mozapps/extensions/extensions.properties (%chrome/mozapps/extensions/extensions.properties)
locale/@AB_CD@/mozapps/extensions/blocklist.dtd (%chrome/mozapps/extensions/blocklist.dtd) locale/@AB_CD@/mozapps/extensions/blocklist.dtd (%chrome/mozapps/extensions/blocklist.dtd)
locale/@AB_CD@/mozapps/extensions/about.dtd (%chrome/mozapps/extensions/about.dtd) locale/@AB_CD@/mozapps/extensions/about.dtd (%chrome/mozapps/extensions/about.dtd)
locale/@AB_CD@/mozapps/extensions/selectAddons.dtd (%chrome/mozapps/extensions/selectAddons.dtd) locale/@AB_CD@/mozapps/extensions/selectAddons.dtd (%chrome/mozapps/extensions/selectAddons.dtd)
@@ -1014,7 +1014,11 @@ var gViewController = {
cmd_showItemPreferences: { cmd_showItemPreferences: {
isEnabled: function cmd_showItemPreferences_isEnabled(aAddon) { isEnabled: function cmd_showItemPreferences_isEnabled(aAddon) {
if (!aAddon || if (!aAddon ||
#ifdef MOZ_GMP
(!aAddon.isActive && !aAddon.isGMPlugin) || (!aAddon.isActive && !aAddon.isGMPlugin) ||
#else
!aAddon.isActive ||
#endif
!aAddon.optionsURL) { !aAddon.optionsURL) {
return false; return false;
} }
@@ -2760,11 +2764,15 @@ var gDetailView = {
// The following is part of an awful hack to include the licenses for GMP // The following is part of an awful hack to include the licenses for GMP
// plugins without having bug 624602 fixed yet, and intentionally ignores // plugins without having bug 624602 fixed yet, and intentionally ignores
// localisation. // localisation.
#ifdef MOZ_GMP
if (aAddon.isGMPlugin) { if (aAddon.isGMPlugin) {
fullDesc.innerHTML = aAddon.fullDescription; fullDesc.innerHTML = aAddon.fullDescription;
} else { } else {
fullDesc.textContent = aAddon.fullDescription; fullDesc.textContent = aAddon.fullDescription;
} }
#else
fullDesc.textContent = aAddon.fullDescription;
#endif
fullDesc.hidden = false; fullDesc.hidden = false;
} else { } else {
@@ -3040,6 +3048,7 @@ var gDetailView = {
errorLink.value = gStrings.ext.GetStringFromName("details.notification.vulnerableNoUpdate.link"); errorLink.value = gStrings.ext.GetStringFromName("details.notification.vulnerableNoUpdate.link");
errorLink.href = this._addon.blocklistURL; errorLink.href = this._addon.blocklistURL;
errorLink.hidden = false; errorLink.hidden = false;
#ifdef MOZ_GMP
} else if (this._addon.isGMPlugin && !this._addon.isInstalled && } else if (this._addon.isGMPlugin && !this._addon.isInstalled &&
this._addon.isActive) { this._addon.isActive) {
this.node.setAttribute("notification", "warning"); this.node.setAttribute("notification", "warning");
@@ -3047,6 +3056,7 @@ var gDetailView = {
warning.textContent = warning.textContent =
gStrings.ext.formatStringFromName("details.notification.gmpPending", gStrings.ext.formatStringFromName("details.notification.gmpPending",
[this._addon.name], 1); [this._addon.name], 1);
#endif
} else { } else {
this.node.removeAttribute("notification"); this.node.removeAttribute("notification");
} }
@@ -1334,12 +1334,14 @@
this._errorLink.value = gStrings.ext.GetStringFromName("notification.vulnerableNoUpdate.link"); this._errorLink.value = gStrings.ext.GetStringFromName("notification.vulnerableNoUpdate.link");
this._errorLink.href = this.mAddon.blocklistURL; this._errorLink.href = this.mAddon.blocklistURL;
this._errorLink.hidden = false; this._errorLink.hidden = false;
#ifdef MOZ_GMP
} else if (this.mAddon.isGMPlugin && !this.mAddon.isInstalled && } else if (this.mAddon.isGMPlugin && !this.mAddon.isInstalled &&
this.mAddon.isActive) { this.mAddon.isActive) {
this.setAttribute("notification", "warning"); this.setAttribute("notification", "warning");
this._warning.textContent = this._warning.textContent =
gStrings.ext.formatStringFromName("notification.gmpPending", gStrings.ext.formatStringFromName("notification.gmpPending",
[this.mAddon.name], 1); [this.mAddon.name], 1);
#endif
} else { } else {
this.removeAttribute("notification"); this.removeAttribute("notification");
#ifdef MOZ_PHOENIX_EXTENSIONS #ifdef MOZ_PHOENIX_EXTENSIONS
@@ -13,4 +13,6 @@ contract @mozilla.org/addons/installtrigger;1 {9df8ef2b-94da-45c9-ab9f-132eb55fd
category JavaScript-global-property InstallTrigger @mozilla.org/addons/installtrigger;1 category JavaScript-global-property InstallTrigger @mozilla.org/addons/installtrigger;1
category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm
#ifdef MOZ_GMP
category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm
#endif
@@ -49,7 +49,6 @@ const GMP_PLUGINS = [
homepageURL: "http://www.openh264.org/", homepageURL: "http://www.openh264.org/",
optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul" optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul"
}, },
/*
{ {
id: EME_ADOBE_ID, id: EME_ADOBE_ID,
name: "eme-adobe_name", name: "eme-adobe_name",
@@ -59,7 +58,6 @@ const GMP_PLUGINS = [
optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul", optionsURL: "chrome://mozapps/content/extensions/gmpPrefs.xul",
isEME: true isEME: true
}, },
*/
{ {
id: WIDEVINE_ID, id: WIDEVINE_ID,
name: "widevine_description", name: "widevine_description",
@@ -7,13 +7,17 @@ EXTRA_JS_MODULES.addons += [
'AddonLogging.jsm', 'AddonLogging.jsm',
'AddonRepository_SQLiteMigrator.jsm', 'AddonRepository_SQLiteMigrator.jsm',
'Content.js', 'Content.js',
'GMPProvider.jsm',
'LightweightThemeImageOptimizer.jsm', 'LightweightThemeImageOptimizer.jsm',
'PluginProvider.jsm', 'PluginProvider.jsm',
'ProductAddonChecker.jsm',
'SpellCheckDictionaryBootstrap.js', 'SpellCheckDictionaryBootstrap.js',
] ]
if CONFIG['MOZ_GMP']:
EXTRA_JS_MODULES.addons += [
'GMPProvider.jsm',
'ProductAddonChecker.jsm',
]
EXTRA_PP_JS_MODULES.addons += [ EXTRA_PP_JS_MODULES.addons += [
'AddonRepository.jsm', 'AddonRepository.jsm',
'AddonUpdateChecker.jsm', 'AddonUpdateChecker.jsm',
+2
View File
@@ -29,8 +29,10 @@ toolkit.jar:
* content/mozapps/extensions/newaddon.js (content/newaddon.js) * content/mozapps/extensions/newaddon.js (content/newaddon.js)
content/mozapps/extensions/setting.xml (content/setting.xml) content/mozapps/extensions/setting.xml (content/setting.xml)
content/mozapps/extensions/pluginPrefs.xul (content/pluginPrefs.xul) content/mozapps/extensions/pluginPrefs.xul (content/pluginPrefs.xul)
#ifdef MOZ_GMP
content/mozapps/extensions/gmpPrefs.xul (content/gmpPrefs.xul) content/mozapps/extensions/gmpPrefs.xul (content/gmpPrefs.xul)
content/mozapps/extensions/OpenH264-license.txt (content/OpenH264-license.txt) content/mozapps/extensions/OpenH264-license.txt (content/OpenH264-license.txt)
#endif
content/mozapps/xpinstall/xpinstallConfirm.xul (content/xpinstallConfirm.xul) content/mozapps/xpinstall/xpinstallConfirm.xul (content/xpinstallConfirm.xul)
content/mozapps/xpinstall/xpinstallConfirm.js (content/xpinstallConfirm.js) content/mozapps/xpinstall/xpinstallConfirm.js (content/xpinstallConfirm.js)
content/mozapps/xpinstall/xpinstallConfirm.css (content/xpinstallConfirm.css) content/mozapps/xpinstall/xpinstallConfirm.css (content/xpinstallConfirm.css)
+10 -5
View File
@@ -19,20 +19,25 @@ EXTRA_COMPONENTS += [
'amContentHandler.js', 'amContentHandler.js',
'amInstallTrigger.js', 'amInstallTrigger.js',
'amWebInstallListener.js', 'amWebInstallListener.js',
]
EXTRA_PP_COMPONENTS += [
'extensions.manifest', 'extensions.manifest',
] ]
EXTRA_JS_MODULES += [ EXTRA_JS_MODULES += [
'ChromeManifestParser.jsm', 'ChromeManifestParser.jsm',
'DeferredSave.jsm', 'DeferredSave.jsm',
'GMPUtils.jsm',
'LightweightThemeManager.jsm', 'LightweightThemeManager.jsm',
] ]
EXTRA_PP_JS_MODULES += [ EXTRA_PP_JS_MODULES += ['AddonManager.jsm',]
'AddonManager.jsm',
'GMPInstallManager.jsm', if CONFIG['MOZ_GMP']:
] EXTRA_PP_JS_MODULES += [
'GMPInstallManager.jsm',
'GMPUtils.jsm',
]
# Additional debugging info is exposed in debug builds # Additional debugging info is exposed in debug builds
if CONFIG['MOZ_EM_DEBUG']: if CONFIG['MOZ_EM_DEBUG']:
+14
View File
@@ -66,8 +66,10 @@
#include "mozilla/ipc/XPCShellEnvironment.h" #include "mozilla/ipc/XPCShellEnvironment.h"
#include "mozilla/WindowsDllBlocklist.h" #include "mozilla/WindowsDllBlocklist.h"
#ifdef MOZ_GMP
#include "GMPProcessChild.h" #include "GMPProcessChild.h"
#include "GMPLoader.h" #include "GMPLoader.h"
#endif
#include "mozilla/gfx/GPUProcessImpl.h" #include "mozilla/gfx/GPUProcessImpl.h"
#include "GeckoProfiler.h" #include "GeckoProfiler.h"
@@ -92,9 +94,11 @@ using mozilla::dom::ContentProcess;
using mozilla::dom::ContentParent; using mozilla::dom::ContentParent;
using mozilla::dom::ContentChild; using mozilla::dom::ContentChild;
#ifdef MOZ_GMP
using mozilla::gmp::GMPLoader; using mozilla::gmp::GMPLoader;
using mozilla::gmp::CreateGMPLoader; using mozilla::gmp::CreateGMPLoader;
using mozilla::gmp::GMPProcessChild; using mozilla::gmp::GMPProcessChild;
#endif
using mozilla::ipc::TestShellParent; using mozilla::ipc::TestShellParent;
using mozilla::ipc::TestShellCommandParent; using mozilla::ipc::TestShellCommandParent;
@@ -256,17 +260,23 @@ SetTaskbarGroupId(const nsString& aId)
nsresult nsresult
XRE_InitChildProcess(int aArgc, XRE_InitChildProcess(int aArgc,
#ifdef MOZ_GMP
char* aArgv[], char* aArgv[],
const XREChildData* aChildData) const XREChildData* aChildData)
#else
char* aArgv[])
#endif
{ {
NS_ENSURE_ARG_MIN(aArgc, 2); NS_ENSURE_ARG_MIN(aArgc, 2);
NS_ENSURE_ARG_POINTER(aArgv); NS_ENSURE_ARG_POINTER(aArgv);
NS_ENSURE_ARG_POINTER(aArgv[0]); NS_ENSURE_ARG_POINTER(aArgv[0]);
#ifdef MOZ_GMP
MOZ_ASSERT(aChildData); MOZ_ASSERT(aChildData);
// On non-Fennec Gecko, the GMPLoader code resides in plugin-container, // On non-Fennec Gecko, the GMPLoader code resides in plugin-container,
// and we must forward it through to the GMP code here. // and we must forward it through to the GMP code here.
GMPProcessChild::SetGMPLoader(aChildData->gmpLoader.get()); GMPProcessChild::SetGMPLoader(aChildData->gmpLoader.get());
#endif
#if defined(XP_WIN) #if defined(XP_WIN)
// From the --attach-console support in nsNativeAppSupportWin.cpp, but // From the --attach-console support in nsNativeAppSupportWin.cpp, but
@@ -461,9 +471,11 @@ XRE_InitChildProcess(int aArgc,
// Content processes need the XPCOM/chromium frankenventloop // Content processes need the XPCOM/chromium frankenventloop
uiLoopType = MessageLoop::TYPE_MOZILLA_CHILD; uiLoopType = MessageLoop::TYPE_MOZILLA_CHILD;
break; break;
#ifdef MOZ_GMP
case GeckoProcessType_GMPlugin: case GeckoProcessType_GMPlugin:
uiLoopType = MessageLoop::TYPE_DEFAULT; uiLoopType = MessageLoop::TYPE_DEFAULT;
break; break;
#endif
default: default:
uiLoopType = MessageLoop::TYPE_UI; uiLoopType = MessageLoop::TYPE_UI;
break; break;
@@ -525,9 +537,11 @@ XRE_InitChildProcess(int aArgc,
#endif #endif
break; break;
#ifdef MOZ_GMP
case GeckoProcessType_GMPlugin: case GeckoProcessType_GMPlugin:
process = new gmp::GMPProcessChild(parentPID); process = new gmp::GMPProcessChild(parentPID);
break; break;
#endif
case GeckoProcessType_GPU: case GeckoProcessType_GPU:
process = new gfx::GPUProcessImpl(parentPID); process = new gfx::GPUProcessImpl(parentPID);
+3 -1
View File
@@ -9,10 +9,12 @@ EXPORTS += [
'nsXPCOMCIDInternal.h', 'nsXPCOMCIDInternal.h',
'nsXREAppData.h', 'nsXREAppData.h',
'nsXULAppAPI.h', 'nsXULAppAPI.h',
'XREChildData.h',
'xrecore.h', 'xrecore.h',
] ]
if CONFIG['MOZ_GMP']:
EXPORTS += ['XREChildData.h',]
EXPORTS.mozilla += [ EXPORTS.mozilla += [
'FileLocation.h', 'FileLocation.h',
'IOInterposer.h', 'IOInterposer.h',
+11
View File
@@ -18,7 +18,10 @@
#include "mozilla/Assertions.h" #include "mozilla/Assertions.h"
#include "mozilla/Vector.h" #include "mozilla/Vector.h"
#include "mozilla/TimeStamp.h" #include "mozilla/TimeStamp.h"
#ifdef MOZ_GMP
#include "XREChildData.h" #include "XREChildData.h"
#endif
/** /**
* A directory service key which provides the platform-correct "application * A directory service key which provides the platform-correct "application
@@ -424,16 +427,24 @@ XRE_API(const char*,
XRE_API(void, XRE_API(void,
XRE_SetProcessType, (const char* aProcessTypeString)) XRE_SetProcessType, (const char* aProcessTypeString))
#ifdef MOZ_GMP
namespace mozilla { namespace mozilla {
namespace gmp { namespace gmp {
class GMPLoader; class GMPLoader;
} // namespace gmp } // namespace gmp
} // namespace mozilla } // namespace mozilla
#endif
#ifdef MOZ_GMP
XRE_API(nsresult, XRE_API(nsresult,
XRE_InitChildProcess, (int aArgc, XRE_InitChildProcess, (int aArgc,
char* aArgv[], char* aArgv[],
const XREChildData* aChildData)) const XREChildData* aChildData))
#else
XRE_API(nsresult,
XRE_InitChildProcess, (int aArgc,
char* aArgv[]))
#endif
XRE_API(GeckoProcessType, XRE_API(GeckoProcessType,
XRE_GetProcessType, ()) XRE_GetProcessType, ())