Option disable GMP
parent
74bd1d375d
commit
6bd59d4de4
|
@ -172,7 +172,9 @@
|
||||||
@RESPATH@/components/composer.xpt
|
@RESPATH@/components/composer.xpt
|
||||||
@RESPATH@/components/content_events.xpt
|
@RESPATH@/components/content_events.xpt
|
||||||
@RESPATH@/components/content_html.xpt
|
@RESPATH@/components/content_html.xpt
|
||||||
|
#ifdef THE_GMP
|
||||||
@RESPATH@/components/content_geckomediaplugins.xpt
|
@RESPATH@/components/content_geckomediaplugins.xpt
|
||||||
|
#endif
|
||||||
#ifdef MOZ_WEBRTC
|
#ifdef MOZ_WEBRTC
|
||||||
@RESPATH@/components/content_webrtc.xpt
|
@RESPATH@/components/content_webrtc.xpt
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -798,13 +798,17 @@ this.PluginCrashReporter = {
|
||||||
this.crashReports = new Map();
|
this.crashReports = new Map();
|
||||||
|
|
||||||
Services.obs.addObserver(this, "plugin-crashed", false);
|
Services.obs.addObserver(this, "plugin-crashed", false);
|
||||||
|
#ifdef THE_GMP
|
||||||
Services.obs.addObserver(this, "gmp-plugin-crash", false);
|
Services.obs.addObserver(this, "gmp-plugin-crash", false);
|
||||||
|
#endif
|
||||||
Services.obs.addObserver(this, "profile-after-change", false);
|
Services.obs.addObserver(this, "profile-after-change", false);
|
||||||
},
|
},
|
||||||
|
|
||||||
uninit() {
|
uninit() {
|
||||||
Services.obs.removeObserver(this, "plugin-crashed", false);
|
Services.obs.removeObserver(this, "plugin-crashed", false);
|
||||||
|
#ifdef THE_GMP
|
||||||
Services.obs.removeObserver(this, "gmp-plugin-crash", false);
|
Services.obs.removeObserver(this, "gmp-plugin-crash", false);
|
||||||
|
#endif
|
||||||
Services.obs.removeObserver(this, "profile-after-change", false);
|
Services.obs.removeObserver(this, "profile-after-change", false);
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
},
|
},
|
||||||
|
@ -829,6 +833,7 @@ this.PluginCrashReporter = {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef THE_GMP
|
||||||
case "gmp-plugin-crash": {
|
case "gmp-plugin-crash": {
|
||||||
let propertyBag = subject;
|
let propertyBag = subject;
|
||||||
if (!(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
|
if (!(propertyBag instanceof Ci.nsIWritablePropertyBag2) ||
|
||||||
|
@ -857,6 +862,7 @@ this.PluginCrashReporter = {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
case "profile-after-change":
|
case "profile-after-change":
|
||||||
this.uninit();
|
this.uninit();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -953,11 +953,12 @@ PluginContent.prototype = {
|
||||||
if (!(aEvent instanceof this.content.PluginCrashedEvent))
|
if (!(aEvent instanceof this.content.PluginCrashedEvent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
if (aEvent.gmpPlugin) {
|
if (aEvent.gmpPlugin) {
|
||||||
this.GMPCrashed(aEvent);
|
this.GMPCrashed(aEvent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (!(target instanceof Ci.nsIObjectLoadingContent))
|
if (!(target instanceof Ci.nsIObjectLoadingContent))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1105,6 +1106,7 @@ PluginContent.prototype = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
GMPCrashed: function(aEvent) {
|
GMPCrashed: function(aEvent) {
|
||||||
let target = aEvent.target;
|
let target = aEvent.target;
|
||||||
let pluginName = aEvent.pluginName;
|
let pluginName = aEvent.pluginName;
|
||||||
|
@ -1116,6 +1118,7 @@ PluginContent.prototype = {
|
||||||
// TODO: Throw exception? How did we get here?
|
// TODO: Throw exception? How did we get here?
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
let messageString =
|
let messageString =
|
||||||
gNavigatorBundle.formatStringFromName("crashedpluginsMessage.title",
|
gNavigatorBundle.formatStringFromName("crashedpluginsMessage.title",
|
||||||
|
|
|
@ -11,7 +11,6 @@ EXTRA_JS_MODULES += [
|
||||||
'BrowserUsageTelemetry.jsm',
|
'BrowserUsageTelemetry.jsm',
|
||||||
'CastingApps.jsm',
|
'CastingApps.jsm',
|
||||||
'ContentClick.jsm',
|
'ContentClick.jsm',
|
||||||
'ContentCrashHandlers.jsm',
|
|
||||||
'ContentLinkHandler.jsm',
|
'ContentLinkHandler.jsm',
|
||||||
'ContentObservers.jsm',
|
'ContentObservers.jsm',
|
||||||
'ContentSearch.jsm',
|
'ContentSearch.jsm',
|
||||||
|
@ -25,7 +24,6 @@ EXTRA_JS_MODULES += [
|
||||||
'NetworkPrioritizer.jsm',
|
'NetworkPrioritizer.jsm',
|
||||||
'offlineAppCache.jsm',
|
'offlineAppCache.jsm',
|
||||||
'PermissionUI.jsm',
|
'PermissionUI.jsm',
|
||||||
'PluginContent.jsm',
|
|
||||||
'ProcessHangMonitor.jsm',
|
'ProcessHangMonitor.jsm',
|
||||||
'ReaderParent.jsm',
|
'ReaderParent.jsm',
|
||||||
'RecentWindow.jsm',
|
'RecentWindow.jsm',
|
||||||
|
@ -37,6 +35,12 @@ EXTRA_JS_MODULES += [
|
||||||
'webrtcUI.jsm',
|
'webrtcUI.jsm',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
EXTRA_PP_JS_MODULES += [
|
||||||
|
'ContentCrashHandlers.jsm',
|
||||||
|
'PluginContent.jsm',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
||||||
EXTRA_JS_MODULES += [
|
EXTRA_JS_MODULES += [
|
||||||
'Windows8WindowFrameColor.jsm',
|
'Windows8WindowFrameColor.jsm',
|
||||||
|
|
|
@ -60,7 +60,9 @@
|
||||||
#include "mozilla/BasePrincipal.h"
|
#include "mozilla/BasePrincipal.h"
|
||||||
#include "mozilla/WebBrowserPersistDocumentChild.h"
|
#include "mozilla/WebBrowserPersistDocumentChild.h"
|
||||||
#include "imgLoader.h"
|
#include "imgLoader.h"
|
||||||
|
#ifdef THE_GMP
|
||||||
#include "GMPServiceChild.h"
|
#include "GMPServiceChild.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mozilla/Unused.h"
|
#include "mozilla/Unused.h"
|
||||||
|
|
||||||
|
@ -167,7 +169,6 @@
|
||||||
#include "mozilla/net/NeckoMessageUtils.h"
|
#include "mozilla/net/NeckoMessageUtils.h"
|
||||||
#include "mozilla/widget/PuppetBidiKeyboard.h"
|
#include "mozilla/widget/PuppetBidiKeyboard.h"
|
||||||
#include "mozilla/RemoteSpellCheckEngineChild.h"
|
#include "mozilla/RemoteSpellCheckEngineChild.h"
|
||||||
#include "GMPServiceChild.h"
|
|
||||||
#include "gfxPlatform.h"
|
#include "gfxPlatform.h"
|
||||||
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
|
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
|
||||||
|
|
||||||
|
@ -177,7 +178,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 THE_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;
|
||||||
|
@ -1126,7 +1129,7 @@ ContentChild::AllocPContentBridgeParent(mozilla::ipc::Transport* aTransport,
|
||||||
ContentBridgeParent::Create(aTransport, aOtherProcess));
|
ContentBridgeParent::Create(aTransport, aOtherProcess));
|
||||||
return mLastBridge;
|
return mLastBridge;
|
||||||
}
|
}
|
||||||
|
#ifdef THE_GMP
|
||||||
PGMPServiceChild*
|
PGMPServiceChild*
|
||||||
ContentChild::AllocPGMPServiceChild(mozilla::ipc::Transport* aTransport,
|
ContentChild::AllocPGMPServiceChild(mozilla::ipc::Transport* aTransport,
|
||||||
base::ProcessId aOtherProcess)
|
base::ProcessId aOtherProcess)
|
||||||
|
@ -1140,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,
|
||||||
|
|
|
@ -140,13 +140,14 @@ public:
|
||||||
PContentBridgeChild*
|
PContentBridgeChild*
|
||||||
AllocPContentBridgeChild(mozilla::ipc::Transport* transport,
|
AllocPContentBridgeChild(mozilla::ipc::Transport* transport,
|
||||||
base::ProcessId otherProcess) override;
|
base::ProcessId otherProcess) override;
|
||||||
|
#ifdef THE_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(
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
#include "AppProcessChecker.h"
|
#include "AppProcessChecker.h"
|
||||||
#include "AudioChannelService.h"
|
#include "AudioChannelService.h"
|
||||||
#include "BlobParent.h"
|
#include "BlobParent.h"
|
||||||
|
#ifdef THE_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"
|
||||||
|
@ -240,7 +242,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 THE_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;
|
||||||
|
@ -875,11 +879,13 @@ static nsIDocShell* GetOpenerDocShellHelper(Element* aFrameElement)
|
||||||
return docShell;
|
return docShell;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef THE_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)
|
||||||
|
@ -1282,9 +1288,10 @@ ContentParent::Init()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef THE_GMP
|
||||||
RefPtr<GeckoMediaPluginServiceParent> gmps(GeckoMediaPluginServiceParent::GetSingleton());
|
RefPtr<GeckoMediaPluginServiceParent> gmps(GeckoMediaPluginServiceParent::GetSingleton());
|
||||||
gmps->UpdateContentProcessGMPCapabilities();
|
gmps->UpdateContentProcessGMPCapabilities();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2580,13 +2587,14 @@ ContentParent::Observe(nsISupports* aSubject,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef THE_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,
|
||||||
ProcessId aOtherProcess)
|
ProcessId aOtherProcess)
|
||||||
|
|
|
@ -238,7 +238,9 @@ public:
|
||||||
|
|
||||||
virtual bool RecvBridgeToChildProcess(const ContentParentId& aCpId) override;
|
virtual bool RecvBridgeToChildProcess(const ContentParentId& aCpId) override;
|
||||||
|
|
||||||
|
#ifdef THE_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,11 +672,11 @@ private:
|
||||||
static bool AllocateLayerTreeId(ContentParent* aContent,
|
static bool AllocateLayerTreeId(ContentParent* aContent,
|
||||||
TabParent* aTopLevel, const TabId& aTabId,
|
TabParent* aTopLevel, const TabId& aTabId,
|
||||||
uint64_t* aId);
|
uint64_t* aId);
|
||||||
|
#ifdef THE_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)
|
||||||
override;
|
override;
|
||||||
|
|
|
@ -82,7 +82,6 @@ IPDL_SOURCES += [
|
||||||
'PBrowser.ipdl',
|
'PBrowser.ipdl',
|
||||||
'PBrowserOrId.ipdlh',
|
'PBrowserOrId.ipdlh',
|
||||||
'PColorPicker.ipdl',
|
'PColorPicker.ipdl',
|
||||||
'PContent.ipdl',
|
|
||||||
'PContentBridge.ipdl',
|
'PContentBridge.ipdl',
|
||||||
'PContentPermission.ipdlh',
|
'PContentPermission.ipdlh',
|
||||||
'PContentPermissionRequest.ipdl',
|
'PContentPermissionRequest.ipdl',
|
||||||
|
@ -96,6 +95,11 @@ IPDL_SOURCES += [
|
||||||
'ServiceWorkerConfiguration.ipdlh',
|
'ServiceWorkerConfiguration.ipdlh',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if CONFIG['THE_GMP']:
|
||||||
|
IPDL_SOURCES += ['gmp/PContent.ipdl',]
|
||||||
|
else:
|
||||||
|
IPDL_SOURCES += ['nogmp/PContent.ipdl',]
|
||||||
|
|
||||||
include('/ipc/chromium/chromium-config.mozbuild')
|
include('/ipc/chromium/chromium-config.mozbuild')
|
||||||
|
|
||||||
FINAL_LIBRARY = 'xul'
|
FINAL_LIBRARY = 'xul'
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,7 +17,9 @@
|
||||||
#include "nsDataHashtable.h"
|
#include "nsDataHashtable.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
class GMPCrashHelper;
|
class GMPCrashHelper;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace mozilla
|
namespace mozilla
|
||||||
{
|
{
|
||||||
|
@ -31,7 +33,9 @@ class MediaResource;
|
||||||
class ReentrantMonitor;
|
class ReentrantMonitor;
|
||||||
class VideoFrameContainer;
|
class VideoFrameContainer;
|
||||||
class MediaDecoderOwner;
|
class MediaDecoderOwner;
|
||||||
|
#ifdef MOZ_EME
|
||||||
class CDMProxy;
|
class CDMProxy;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef nsDataHashtable<nsCStringHashKey, nsCString> MetadataTags;
|
typedef nsDataHashtable<nsCStringHashKey, nsCString> MetadataTags;
|
||||||
|
|
||||||
|
@ -111,7 +115,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 THE_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
|
||||||
|
|
|
@ -846,6 +846,7 @@ DecoderDoctorDiagnostics::GetDescription() const
|
||||||
if (mFFmpegFailedToLoad) {
|
if (mFFmpegFailedToLoad) {
|
||||||
s += ", Linux platform decoder failed to load";
|
s += ", Linux platform decoder failed to load";
|
||||||
}
|
}
|
||||||
|
#ifdef THE_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()) {
|
||||||
|
@ -853,6 +854,7 @@ DecoderDoctorDiagnostics::GetDescription() const
|
||||||
s += mGMP;
|
s += mGMP;
|
||||||
s += "'";
|
s += "'";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case eMediaKeySystemAccessRequest:
|
case eMediaKeySystemAccessRequest:
|
||||||
s = "key system='";
|
s = "key system='";
|
||||||
|
|
|
@ -79,14 +79,18 @@ public:
|
||||||
void SetFFmpegFailedToLoad() { mFFmpegFailedToLoad = true; }
|
void SetFFmpegFailedToLoad() { mFFmpegFailedToLoad = true; }
|
||||||
bool DidFFmpegFailToLoad() const { return mFFmpegFailedToLoad; }
|
bool DidFFmpegFailToLoad() const { return mFFmpegFailedToLoad; }
|
||||||
|
|
||||||
|
#ifdef THE_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 THE_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; }
|
||||||
|
@ -120,7 +124,9 @@ private:
|
||||||
|
|
||||||
bool mWMFFailedToLoad = false;
|
bool mWMFFailedToLoad = false;
|
||||||
bool mFFmpegFailedToLoad = false;
|
bool mFFmpegFailedToLoad = false;
|
||||||
|
#ifdef THE_GMP
|
||||||
bool mGMPPDMFailedToStartup = false;
|
bool mGMPPDMFailedToStartup = false;
|
||||||
|
#endif
|
||||||
bool mVideoNotSupported = false;
|
bool mVideoNotSupported = false;
|
||||||
bool mAudioNotSupported = false;
|
bool mAudioNotSupported = false;
|
||||||
nsCString mGMP;
|
nsCString mGMP;
|
||||||
|
|
|
@ -30,7 +30,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 THE_GMP
|
||||||
#include "GMPService.h"
|
#include "GMPService.h"
|
||||||
|
#endif
|
||||||
#include "Layers.h"
|
#include "Layers.h"
|
||||||
#include "mozilla/layers/ShadowLayers.h"
|
#include "mozilla/layers/ShadowLayers.h"
|
||||||
|
|
||||||
|
@ -387,7 +389,9 @@ MediaDecoder::MediaDecoder(MediaDecoderOwner* aOwner)
|
||||||
, mLogicalPosition(0.0)
|
, mLogicalPosition(0.0)
|
||||||
, mDuration(std::numeric_limits<double>::quiet_NaN())
|
, mDuration(std::numeric_limits<double>::quiet_NaN())
|
||||||
, mResourceCallback(new ResourceCallback())
|
, mResourceCallback(new ResourceCallback())
|
||||||
|
#ifdef MOZ_EME
|
||||||
, mCDMProxyPromise(mCDMProxyPromiseHolder.Ensure(__func__))
|
, mCDMProxyPromise(mCDMProxyPromiseHolder.Ensure(__func__))
|
||||||
|
#endif
|
||||||
, mIgnoreProgressData(false)
|
, mIgnoreProgressData(false)
|
||||||
, mInfiniteStream(false)
|
, mInfiniteStream(false)
|
||||||
, mOwner(aOwner)
|
, mOwner(aOwner)
|
||||||
|
@ -472,7 +476,9 @@ MediaDecoder::Shutdown()
|
||||||
|
|
||||||
mResourceCallback->Disconnect();
|
mResourceCallback->Disconnect();
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
mCDMProxyPromiseHolder.RejectIfExists(true, __func__);
|
mCDMProxyPromiseHolder.RejectIfExists(true, __func__);
|
||||||
|
#endif
|
||||||
|
|
||||||
DiscardOngoingSeekIfExists();
|
DiscardOngoingSeekIfExists();
|
||||||
|
|
||||||
|
@ -923,6 +929,7 @@ MediaDecoder::OwnerHasError() const
|
||||||
return mOwner->HasError();
|
return mOwner->HasError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
class MediaElementGMPCrashHelper : public GMPCrashHelper
|
class MediaElementGMPCrashHelper : public GMPCrashHelper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -950,6 +957,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
|
||||||
|
@ -1537,6 +1545,7 @@ MediaDecoder::CanPlayThrough()
|
||||||
return GetStatistics().CanPlayThrough();
|
return GetStatistics().CanPlayThrough();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
RefPtr<MediaDecoder::CDMProxyPromise>
|
RefPtr<MediaDecoder::CDMProxyPromise>
|
||||||
MediaDecoder::RequestCDMProxy() const
|
MediaDecoder::RequestCDMProxy() const
|
||||||
{
|
{
|
||||||
|
@ -1551,6 +1560,7 @@ MediaDecoder::SetCDMProxy(CDMProxy* aProxy)
|
||||||
|
|
||||||
mCDMProxyPromiseHolder.ResolveIfExists(aProxy, __func__);
|
mCDMProxyPromiseHolder.ResolveIfExists(aProxy, __func__);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool
|
bool
|
||||||
MediaDecoder::IsOpusEnabled()
|
MediaDecoder::IsOpusEnabled()
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
#define MediaDecoder_h_
|
#define MediaDecoder_h_
|
||||||
|
|
||||||
#include "mozilla/Atomics.h"
|
#include "mozilla/Atomics.h"
|
||||||
|
#ifdef MOZ_EME
|
||||||
#include "mozilla/CDMProxy.h"
|
#include "mozilla/CDMProxy.h"
|
||||||
|
#endif
|
||||||
#include "mozilla/MozPromise.h"
|
#include "mozilla/MozPromise.h"
|
||||||
#include "mozilla/ReentrantMonitor.h"
|
#include "mozilla/ReentrantMonitor.h"
|
||||||
#include "mozilla/StateMirroring.h"
|
#include "mozilla/StateMirroring.h"
|
||||||
|
@ -243,7 +245,9 @@ public:
|
||||||
// Must be called before Shutdown().
|
// Must be called before Shutdown().
|
||||||
bool OwnerHasError() const;
|
bool OwnerHasError() const;
|
||||||
|
|
||||||
|
#ifdef THE_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
|
||||||
|
@ -432,6 +436,7 @@ private:
|
||||||
|
|
||||||
MediaDecoderOwner* GetOwner() const override;
|
MediaDecoderOwner* GetOwner() const override;
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
typedef MozPromise<RefPtr<CDMProxy>, bool /* aIgnored */, /* IsExclusive = */ true> CDMProxyPromise;
|
typedef MozPromise<RefPtr<CDMProxy>, bool /* aIgnored */, /* IsExclusive = */ true> CDMProxyPromise;
|
||||||
|
|
||||||
// Resolved when a CDMProxy is available and the capabilities are known or
|
// Resolved when a CDMProxy is available and the capabilities are known or
|
||||||
|
@ -439,6 +444,7 @@ private:
|
||||||
RefPtr<CDMProxyPromise> RequestCDMProxy() const;
|
RefPtr<CDMProxyPromise> RequestCDMProxy() const;
|
||||||
|
|
||||||
void SetCDMProxy(CDMProxy* aProxy);
|
void SetCDMProxy(CDMProxy* aProxy);
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool IsOggEnabled();
|
static bool IsOggEnabled();
|
||||||
static bool IsOpusEnabled();
|
static bool IsOpusEnabled();
|
||||||
|
@ -589,8 +595,10 @@ private:
|
||||||
|
|
||||||
RefPtr<ResourceCallback> mResourceCallback;
|
RefPtr<ResourceCallback> mResourceCallback;
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
MozPromiseHolder<CDMProxyPromise> mCDMProxyPromiseHolder;
|
MozPromiseHolder<CDMProxyPromise> mCDMProxyPromiseHolder;
|
||||||
RefPtr<CDMProxyPromise> mCDMProxyPromise;
|
RefPtr<CDMProxyPromise> mCDMProxyPromise;
|
||||||
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// The promise resolving/rejection is queued as a "micro-task" which will be
|
// The promise resolving/rejection is queued as a "micro-task" which will be
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
class CDMProxy;
|
class CDMProxy;
|
||||||
|
#endif
|
||||||
class MediaDecoderReader;
|
class MediaDecoderReader;
|
||||||
|
|
||||||
struct WaitForDataRejectValue
|
struct WaitForDataRejectValue
|
||||||
|
@ -186,7 +188,9 @@ public:
|
||||||
// when to call SetIdle().
|
// when to call SetIdle().
|
||||||
virtual void SetIdle() {}
|
virtual void SetIdle() {}
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
virtual void SetCDMProxy(CDMProxy* aProxy) {}
|
virtual void SetCDMProxy(CDMProxy* aProxy) {}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Tell the reader that the data decoded are not for direct playback, so it
|
// Tell the reader that the data decoded are not for direct playback, so it
|
||||||
// can accept more files, in particular those which have more channels than
|
// can accept more files, in particular those which have more channels than
|
||||||
|
|
|
@ -113,7 +113,9 @@ public:
|
||||||
return mReader->CanonicalBuffered();
|
return mReader->CanonicalBuffered();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
void SetCDMProxy(CDMProxy* aProxy) { mReader->SetCDMProxy(aProxy); }
|
void SetCDMProxy(CDMProxy* aProxy) { mReader->SetCDMProxy(aProxy); }
|
||||||
|
#endif
|
||||||
|
|
||||||
void SetVideoBlankDecode(bool aIsBlankDecode);
|
void SetVideoBlankDecode(bool aIsBlankDecode);
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,9 @@ public:
|
||||||
virtual State GetState() const = 0;
|
virtual State GetState() const = 0;
|
||||||
|
|
||||||
// Event handlers for various events.
|
// Event handlers for various events.
|
||||||
|
#ifdef MOZ_EME
|
||||||
virtual void HandleCDMProxyReady() {}
|
virtual void HandleCDMProxyReady() {}
|
||||||
|
#endif
|
||||||
virtual void HandleAudioDecoded(MediaData* aAudio) {}
|
virtual void HandleAudioDecoded(MediaData* aAudio) {}
|
||||||
virtual void HandleVideoDecoded(MediaData* aVideo, TimeStamp aDecodeStart) {}
|
virtual void HandleVideoDecoded(MediaData* aVideo, TimeStamp aDecodeStart) {}
|
||||||
virtual void HandleEndOfStream() {}
|
virtual void HandleEndOfStream() {}
|
||||||
|
@ -371,7 +373,9 @@ public:
|
||||||
return DECODER_STATE_WAIT_FOR_CDM;
|
return DECODER_STATE_WAIT_FOR_CDM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
void HandleCDMProxyReady() override;
|
void HandleCDMProxyReady() override;
|
||||||
|
#endif
|
||||||
|
|
||||||
RefPtr<MediaDecoder::SeekPromise> HandleSeek(SeekTarget aTarget) override
|
RefPtr<MediaDecoder::SeekPromise> HandleSeek(SeekTarget aTarget) override
|
||||||
{
|
{
|
||||||
|
@ -1238,7 +1242,11 @@ DecodeMetadataState::OnMetadataRead(MetadataHolder* aMetadata)
|
||||||
// feeding in the CDM, which we need to decode the first frame (and
|
// feeding in the CDM, which we need to decode the first frame (and
|
||||||
// thus get the metadata). We could fix this if we could compute the start
|
// thus get the metadata). We could fix this if we could compute the start
|
||||||
// time by demuxing without necessaring decoding.
|
// time by demuxing without necessaring decoding.
|
||||||
bool waitingForCDM = Info().IsEncrypted() && !mMaster->mCDMProxy;
|
bool waitingForCDM = Info().IsEncrypted()
|
||||||
|
#ifdef MOZ_EME
|
||||||
|
&& !mMaster->mCDMProxy
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
mMaster->mNotifyMetadataBeforeFirstFrame =
|
mMaster->mNotifyMetadataBeforeFirstFrame =
|
||||||
mMaster->mDuration.Ref().isSome() || waitingForCDM;
|
mMaster->mDuration.Ref().isSome() || waitingForCDM;
|
||||||
|
@ -1262,19 +1270,24 @@ DormantState::HandlePlayStateChanged(MediaDecoder::PlayState aPlayState)
|
||||||
{
|
{
|
||||||
if (aPlayState == MediaDecoder::PLAY_STATE_PLAYING) {
|
if (aPlayState == MediaDecoder::PLAY_STATE_PLAYING) {
|
||||||
// Exit dormant when the user wants to play.
|
// Exit dormant when the user wants to play.
|
||||||
MOZ_ASSERT(!Info().IsEncrypted() || mMaster->mCDMProxy);
|
MOZ_ASSERT(!Info().IsEncrypted()
|
||||||
|
#ifdef MOZ_EME
|
||||||
|
|| mMaster->mCDMProxy
|
||||||
|
#endif
|
||||||
|
);
|
||||||
MOZ_ASSERT(mMaster->mSentFirstFrameLoadedEvent);
|
MOZ_ASSERT(mMaster->mSentFirstFrameLoadedEvent);
|
||||||
SetState<SeekingState>(Move(mPendingSeek), EventVisibility::Suppressed);
|
SetState<SeekingState>(Move(mPendingSeek), EventVisibility::Suppressed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
void
|
void
|
||||||
MediaDecoderStateMachine::
|
MediaDecoderStateMachine::
|
||||||
WaitForCDMState::HandleCDMProxyReady()
|
WaitForCDMState::HandleCDMProxyReady()
|
||||||
{
|
{
|
||||||
SetState<DecodingFirstFrameState>(Move(mPendingSeek));
|
SetState<DecodingFirstFrameState>(Move(mPendingSeek));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
MediaDecoderStateMachine::
|
MediaDecoderStateMachine::
|
||||||
DecodingFirstFrameState::Enter(SeekJob aPendingSeek)
|
DecodingFirstFrameState::Enter(SeekJob aPendingSeek)
|
||||||
|
@ -1575,7 +1588,9 @@ ShutdownState::Enter()
|
||||||
// dispose of the timer.
|
// dispose of the timer.
|
||||||
master->mVideoDecodeSuspendTimer.Reset();
|
master->mVideoDecodeSuspendTimer.Reset();
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
master->mCDMProxyPromise.DisconnectIfExists();
|
master->mCDMProxyPromise.DisconnectIfExists();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (master->IsPlaying()) {
|
if (master->IsPlaying()) {
|
||||||
master->StopPlayback();
|
master->StopPlayback();
|
||||||
|
@ -2129,10 +2144,12 @@ nsresult MediaDecoderStateMachine::Init(MediaDecoder* aDecoder)
|
||||||
|
|
||||||
mMediaSink = CreateMediaSink(mAudioCaptured);
|
mMediaSink = CreateMediaSink(mAudioCaptured);
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
mCDMProxyPromise.Begin(aDecoder->RequestCDMProxy()->Then(
|
mCDMProxyPromise.Begin(aDecoder->RequestCDMProxy()->Then(
|
||||||
OwnerThread(), __func__, this,
|
OwnerThread(), __func__, this,
|
||||||
&MediaDecoderStateMachine::OnCDMProxyReady,
|
&MediaDecoderStateMachine::OnCDMProxyReady,
|
||||||
&MediaDecoderStateMachine::OnCDMProxyNotReady));
|
&MediaDecoderStateMachine::OnCDMProxyNotReady));
|
||||||
|
#endif
|
||||||
|
|
||||||
nsresult rv = mReader->Init();
|
nsresult rv = mReader->Init();
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
@ -3108,6 +3125,7 @@ void MediaDecoderStateMachine::OnMediaSinkAudioError(nsresult aResult)
|
||||||
DecodeError(MediaResult(NS_ERROR_DOM_MEDIA_MEDIASINK_ERR, __func__));
|
DecodeError(MediaResult(NS_ERROR_DOM_MEDIA_MEDIASINK_ERR, __func__));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
void
|
void
|
||||||
MediaDecoderStateMachine::OnCDMProxyReady(RefPtr<CDMProxy> aProxy)
|
MediaDecoderStateMachine::OnCDMProxyReady(RefPtr<CDMProxy> aProxy)
|
||||||
{
|
{
|
||||||
|
@ -3124,7 +3142,7 @@ MediaDecoderStateMachine::OnCDMProxyNotReady()
|
||||||
MOZ_ASSERT(OnTaskQueue());
|
MOZ_ASSERT(OnTaskQueue());
|
||||||
mCDMProxyPromise.Complete();
|
mCDMProxyPromise.Complete();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
MediaDecoderStateMachine::SetAudioCaptured(bool aCaptured)
|
MediaDecoderStateMachine::SetAudioCaptured(bool aCaptured)
|
||||||
{
|
{
|
||||||
|
|
|
@ -768,10 +768,12 @@ private:
|
||||||
// Playback will not start when audio is offloading.
|
// Playback will not start when audio is offloading.
|
||||||
bool mAudioOffloading;
|
bool mAudioOffloading;
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
void OnCDMProxyReady(RefPtr<CDMProxy> aProxy);
|
void OnCDMProxyReady(RefPtr<CDMProxy> aProxy);
|
||||||
void OnCDMProxyNotReady();
|
void OnCDMProxyNotReady();
|
||||||
RefPtr<CDMProxy> mCDMProxy;
|
RefPtr<CDMProxy> mCDMProxy;
|
||||||
MozPromiseRequestHolder<MediaDecoder::CDMProxyPromise> mCDMProxyPromise;
|
MozPromiseRequestHolder<MediaDecoder::CDMProxyPromise> mCDMProxyPromise;
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// The buffered range. Mirrored from the decoder thread.
|
// The buffered range. Mirrored from the decoder thread.
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
* 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/. */
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
#include "mozilla/CDMProxy.h"
|
#include "mozilla/CDMProxy.h"
|
||||||
|
#endif
|
||||||
#include "mozilla/ClearOnShutdown.h"
|
#include "mozilla/ClearOnShutdown.h"
|
||||||
#include "mozilla/dom/HTMLMediaElement.h"
|
#include "mozilla/dom/HTMLMediaElement.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
|
@ -367,7 +369,9 @@ MediaFormatReader::DecoderFactory::DoCreateDecoder(TrackType aTrack)
|
||||||
: *ownerData.mOriginalInfo->GetAsAudioInfo(),
|
: *ownerData.mOriginalInfo->GetAsAudioInfo(),
|
||||||
ownerData.mTaskQueue,
|
ownerData.mTaskQueue,
|
||||||
ownerData.mCallback.get(),
|
ownerData.mCallback.get(),
|
||||||
|
#ifdef THE_GMP
|
||||||
mOwner->mCrashHelper,
|
mOwner->mCrashHelper,
|
||||||
|
#endif
|
||||||
ownerData.mIsBlankDecode,
|
ownerData.mIsBlankDecode,
|
||||||
&result
|
&result
|
||||||
});
|
});
|
||||||
|
@ -385,7 +389,9 @@ MediaFormatReader::DecoderFactory::DoCreateDecoder(TrackType aTrack)
|
||||||
ownerData.mCallback.get(),
|
ownerData.mCallback.get(),
|
||||||
mOwner->mKnowsCompositor,
|
mOwner->mKnowsCompositor,
|
||||||
mOwner->GetImageContainer(),
|
mOwner->GetImageContainer(),
|
||||||
|
#ifdef THE_GMP
|
||||||
mOwner->mCrashHelper,
|
mOwner->mCrashHelper,
|
||||||
|
#endif
|
||||||
ownerData.mIsBlankDecode,
|
ownerData.mIsBlankDecode,
|
||||||
&result
|
&result
|
||||||
});
|
});
|
||||||
|
@ -580,7 +586,9 @@ MediaFormatReader::InitInternal()
|
||||||
|
|
||||||
// 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.
|
||||||
|
#ifdef THE_GMP
|
||||||
mCrashHelper = mDecoder->GetCrashHelper();
|
mCrashHelper = mDecoder->GetCrashHelper();
|
||||||
|
#endif
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -613,6 +621,7 @@ private:
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
void
|
void
|
||||||
MediaFormatReader::SetCDMProxy(CDMProxy* aProxy)
|
MediaFormatReader::SetCDMProxy(CDMProxy* aProxy)
|
||||||
{
|
{
|
||||||
|
@ -624,7 +633,7 @@ MediaFormatReader::SetCDMProxy(CDMProxy* aProxy)
|
||||||
});
|
});
|
||||||
OwnerThread()->Dispatch(r.forget());
|
OwnerThread()->Dispatch(r.forget());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
bool
|
bool
|
||||||
MediaFormatReader::IsWaitingOnCDMResource() {
|
MediaFormatReader::IsWaitingOnCDMResource() {
|
||||||
MOZ_ASSERT(OnTaskQueue());
|
MOZ_ASSERT(OnTaskQueue());
|
||||||
|
|
|
@ -20,7 +20,9 @@
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
class CDMProxy;
|
class CDMProxy;
|
||||||
|
#endif
|
||||||
|
|
||||||
class MediaFormatReader final : public MediaDecoderReader
|
class MediaFormatReader final : public MediaDecoderReader
|
||||||
{
|
{
|
||||||
|
@ -91,7 +93,9 @@ public:
|
||||||
return mTrackDemuxersMayBlock;
|
return mTrackDemuxersMayBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
void SetCDMProxy(CDMProxy* aProxy) override;
|
void SetCDMProxy(CDMProxy* aProxy) override;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Returns a string describing the state of the decoder data.
|
// Returns a string describing the state of the decoder data.
|
||||||
// Used for debugging purposes.
|
// Used for debugging purposes.
|
||||||
|
@ -584,9 +588,12 @@ private:
|
||||||
RefPtr<VideoFrameContainer> mVideoFrameContainer;
|
RefPtr<VideoFrameContainer> mVideoFrameContainer;
|
||||||
layers::ImageContainer* GetImageContainer();
|
layers::ImageContainer* GetImageContainer();
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
RefPtr<CDMProxy> mCDMProxy;
|
RefPtr<CDMProxy> mCDMProxy;
|
||||||
|
#endif
|
||||||
|
#ifdef THE_GMP
|
||||||
RefPtr<GMPCrashHelper> mCrashHelper;
|
RefPtr<GMPCrashHelper> mCrashHelper;
|
||||||
|
#endif
|
||||||
|
|
||||||
void SetBlankDecode(TrackType aTrack, bool aIsBlankDecode);
|
void SetBlankDecode(TrackType aTrack, bool aIsBlankDecode);
|
||||||
|
|
||||||
|
|
|
@ -95,14 +95,20 @@ private:
|
||||||
// VideoSink
|
// VideoSink
|
||||||
DECL_MEDIA_PREF("media.ruin-av-sync.enabled", RuinAvSync, bool, false);
|
DECL_MEDIA_PREF("media.ruin-av-sync.enabled", RuinAvSync, bool, false);
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
// Encrypted Media Extensions
|
// Encrypted Media Extensions
|
||||||
DECL_MEDIA_PREF("media.clearkey.persistent-license.enabled", ClearKeyPersistentLicenseEnabled, bool, false);
|
DECL_MEDIA_PREF("media.clearkey.persistent-license.enabled", ClearKeyPersistentLicenseEnabled, bool, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
// PlatformDecoderModule
|
// PlatformDecoderModule
|
||||||
DECL_MEDIA_PREF("media.apple.forcevda", AppleForceVDA, bool, false);
|
DECL_MEDIA_PREF("media.apple.forcevda", AppleForceVDA, bool, false);
|
||||||
|
#ifdef THE_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_WIDGET_ANDROID
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
|
@ -130,9 +136,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 THE_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);
|
||||||
|
|
|
@ -142,10 +142,10 @@ MediaKeySystemAccess::GetKeySystemStatus(const nsAString& aKeySystem,
|
||||||
}
|
}
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
// Win Vista and later only.
|
// Win Vista and later only.
|
||||||
if (!IsVistaOrLater()) {
|
// if (!IsVistaOrLater()) {
|
||||||
aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version (Vista) not met for Adobe EME");
|
// aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version (Vista) not met for Adobe EME");
|
||||||
return MediaKeySystemStatus::Cdm_not_supported;
|
// return MediaKeySystemStatus::Cdm_not_supported;
|
||||||
}
|
// }
|
||||||
#endif
|
#endif
|
||||||
return EnsureCDMInstalled(aKeySystem, aOutMessage);
|
return EnsureCDMInstalled(aKeySystem, aOutMessage);
|
||||||
}
|
}
|
||||||
|
@ -155,10 +155,10 @@ MediaKeySystemAccess::GetKeySystemStatus(const nsAString& aKeySystem,
|
||||||
if (Preferences::GetBool("media.gmp-widevinecdm.visible", false)) {
|
if (Preferences::GetBool("media.gmp-widevinecdm.visible", false)) {
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
// Win Vista and later only.
|
// Win Vista and later only.
|
||||||
if (!IsVistaOrLater()) {
|
// if (!IsVistaOrLater()) {
|
||||||
aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version (Vista) not met for Widevine EME");
|
// aOutMessage = NS_LITERAL_CSTRING("Minimum Windows version (Vista) not met for Widevine EME");
|
||||||
return MediaKeySystemStatus::Cdm_not_supported;
|
// return MediaKeySystemStatus::Cdm_not_supported;
|
||||||
}
|
// }
|
||||||
#endif
|
#endif
|
||||||
if (!Preferences::GetBool("media.gmp-widevinecdm.enabled", false)) {
|
if (!Preferences::GetBool("media.gmp-widevinecdm.enabled", false)) {
|
||||||
aOutMessage = NS_LITERAL_CSTRING("Widevine EME disabled");
|
aOutMessage = NS_LITERAL_CSTRING("Widevine EME disabled");
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
#include "MP4Demuxer.h"
|
#include "MP4Demuxer.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
#include "nsCharSeparatedTokenizer.h"
|
#include "nsCharSeparatedTokenizer.h"
|
||||||
|
#ifdef MOZ_EME
|
||||||
#include "mozilla/CDMProxy.h"
|
#include "mozilla/CDMProxy.h"
|
||||||
|
#endif
|
||||||
#include "mozilla/Logging.h"
|
#include "mozilla/Logging.h"
|
||||||
#include "mozilla/SharedThreadPool.h"
|
#include "mozilla/SharedThreadPool.h"
|
||||||
#include "nsMimeTypes.h"
|
#include "nsMimeTypes.h"
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "prio.h"
|
#include "prio.h"
|
||||||
#include "base/task.h"
|
#include "base/task.h"
|
||||||
#include "widevine-adapter/WidevineAdapter.h"
|
#include "widevine-adapter/WidevineAdapter.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
using namespace mozilla::ipc;
|
using namespace mozilla::ipc;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "GMPContentParent.h"
|
#include "GMPContentParent.h"
|
||||||
#include "MediaPrefs.h"
|
#include "MediaPrefs.h"
|
||||||
#include "VideoUtils.h"
|
#include "VideoUtils.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
using mozilla::ipc::GeckoChildProcessHost;
|
using mozilla::ipc::GeckoChildProcessHost;
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "nsCRTGlue.h"
|
#include "nsCRTGlue.h"
|
||||||
#include "mozilla/Base64.h"
|
#include "mozilla/Base64.h"
|
||||||
#include "nsISimpleEnumerator.h"
|
#include "nsISimpleEnumerator.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
@ -39,19 +40,6 @@ EMEVoucherFileExists()
|
||||||
exists;
|
exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCString
|
nsCString
|
||||||
ToBase64(const nsTArray<uint8_t>& aBytes)
|
ToBase64(const nsTArray<uint8_t>& aBytes)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,11 +32,6 @@ bool GetEMEVoucherPath(nsIFile** aPath);
|
||||||
|
|
||||||
bool EMEVoucherFileExists();
|
bool EMEVoucherFileExists();
|
||||||
|
|
||||||
void
|
|
||||||
SplitAt(const char* aDelims,
|
|
||||||
const nsACString& aInput,
|
|
||||||
nsTArray<nsCString>& aOutTokens);
|
|
||||||
|
|
||||||
nsCString
|
nsCString
|
||||||
ToBase64(const nsTArray<uint8_t>& aBytes);
|
ToBase64(const nsTArray<uint8_t>& aBytes);
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,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',
|
||||||
|
@ -46,6 +42,13 @@ DIRS += [
|
||||||
if CONFIG['MOZ_FMP4']:
|
if CONFIG['MOZ_FMP4']:
|
||||||
DIRS += ['fmp4']
|
DIRS += ['fmp4']
|
||||||
|
|
||||||
|
if CONFIG['THE_GMP']:
|
||||||
|
DIRS += ['gmp',
|
||||||
|
'gmp-plugin',
|
||||||
|
'gmp-plugin-openh264',]
|
||||||
|
if CONFIG['MOZ_EME']:
|
||||||
|
DIRS += ['eme']
|
||||||
|
|
||||||
if CONFIG['MOZ_WEBRTC']:
|
if CONFIG['MOZ_WEBRTC']:
|
||||||
DIRS += ['bridge']
|
DIRS += ['bridge']
|
||||||
|
|
||||||
|
@ -136,6 +139,7 @@ EXPORTS += [
|
||||||
'ThreadPoolCOMListener.h',
|
'ThreadPoolCOMListener.h',
|
||||||
'TimeUnits.h',
|
'TimeUnits.h',
|
||||||
'TrackUnionStream.h',
|
'TrackUnionStream.h',
|
||||||
|
'utils.h',
|
||||||
'VideoFrameContainer.h',
|
'VideoFrameContainer.h',
|
||||||
'VideoLimits.h',
|
'VideoLimits.h',
|
||||||
'VideoSegment.h',
|
'VideoSegment.h',
|
||||||
|
@ -251,6 +255,8 @@ UNIFIED_SOURCES += [
|
||||||
'XiphExtradata.cpp',
|
'XiphExtradata.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
SOURCES += [ 'utils.cpp' ]
|
||||||
|
|
||||||
if CONFIG['OS_TARGET'] == 'WINNT':
|
if CONFIG['OS_TARGET'] == 'WINNT':
|
||||||
SOURCES += [ 'ThreadPoolCOMListener.cpp' ]
|
SOURCES += [ 'ThreadPoolCOMListener.cpp' ]
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,12 @@
|
||||||
#ifdef MOZ_WIDGET_ANDROID
|
#ifdef MOZ_WIDGET_ANDROID
|
||||||
#include "AndroidDecoderModule.h"
|
#include "AndroidDecoderModule.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef THE_GMP
|
||||||
#include "GMPDecoderModule.h"
|
#include "GMPDecoderModule.h"
|
||||||
|
#endif
|
||||||
|
#ifdef MOZ_EME
|
||||||
#include "mozilla/CDMProxy.h"
|
#include "mozilla/CDMProxy.h"
|
||||||
|
#endif
|
||||||
#include "mozilla/ClearOnShutdown.h"
|
#include "mozilla/ClearOnShutdown.h"
|
||||||
#include "mozilla/SharedThreadPool.h"
|
#include "mozilla/SharedThreadPool.h"
|
||||||
#include "mozilla/StaticPtr.h"
|
#include "mozilla/StaticPtr.h"
|
||||||
|
@ -37,7 +40,9 @@
|
||||||
#include "H264Converter.h"
|
#include "H264Converter.h"
|
||||||
|
|
||||||
#include "AgnosticDecoderModule.h"
|
#include "AgnosticDecoderModule.h"
|
||||||
|
#ifdef MOZ_EME
|
||||||
#include "EMEDecoderModule.h"
|
#include "EMEDecoderModule.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "DecoderDoctorDiagnostics.h"
|
#include "DecoderDoctorDiagnostics.h"
|
||||||
|
|
||||||
|
@ -225,9 +230,11 @@ PDMFactory::CreateDecoder(const CreateDecoderParams& aParams)
|
||||||
if (mFFmpegFailedToLoad) {
|
if (mFFmpegFailedToLoad) {
|
||||||
diagnostics->SetFFmpegFailedToLoad();
|
diagnostics->SetFFmpegFailedToLoad();
|
||||||
}
|
}
|
||||||
|
#ifdef THE_GMP
|
||||||
if (mGMPPDMFailedToStartup) {
|
if (mGMPPDMFailedToStartup) {
|
||||||
diagnostics->SetGMPPDMFailedToStartup();
|
diagnostics->SetGMPPDMFailedToStartup();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& current : mCurrentPDMs) {
|
for (auto& current : mCurrentPDMs) {
|
||||||
|
@ -409,13 +416,14 @@ PDMFactory::CreatePDMs()
|
||||||
|
|
||||||
m = new AgnosticDecoderModule();
|
m = new AgnosticDecoderModule();
|
||||||
StartupPDM(m);
|
StartupPDM(m);
|
||||||
|
#ifdef THE_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
|
||||||
|
@ -448,9 +456,11 @@ PDMFactory::GetDecoder(const TrackInfo& aTrackInfo,
|
||||||
if (mFFmpegFailedToLoad) {
|
if (mFFmpegFailedToLoad) {
|
||||||
aDiagnostics->SetFFmpegFailedToLoad();
|
aDiagnostics->SetFFmpegFailedToLoad();
|
||||||
}
|
}
|
||||||
|
#ifdef THE_GMP
|
||||||
if (mGMPPDMFailedToStartup) {
|
if (mGMPPDMFailedToStartup) {
|
||||||
aDiagnostics->SetGMPPDMFailedToStartup();
|
aDiagnostics->SetGMPPDMFailedToStartup();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<PlatformDecoderModule> pdm;
|
RefPtr<PlatformDecoderModule> pdm;
|
||||||
|
@ -463,11 +473,12 @@ PDMFactory::GetDecoder(const TrackInfo& aTrackInfo,
|
||||||
return pdm.forget();
|
return pdm.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
void
|
void
|
||||||
PDMFactory::SetCDMProxy(CDMProxy* aProxy)
|
PDMFactory::SetCDMProxy(CDMProxy* aProxy)
|
||||||
{
|
{
|
||||||
RefPtr<PDMFactory> m = new PDMFactory();
|
RefPtr<PDMFactory> m = new PDMFactory();
|
||||||
mEMEPDM = new EMEDecoderModule(aProxy, m);
|
mEMEPDM = new EMEDecoderModule(aProxy, m);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
#include "mozilla/Function.h"
|
#include "mozilla/Function.h"
|
||||||
#include "mozilla/StaticMutex.h"
|
#include "mozilla/StaticMutex.h"
|
||||||
|
|
||||||
|
#ifdef MOZ_EME
|
||||||
class CDMProxy;
|
class CDMProxy;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
@ -43,7 +45,9 @@ public:
|
||||||
// does not decode, we create a PDM and use that to create MediaDataDecoders
|
// does not decode, we create a PDM and use that to create MediaDataDecoders
|
||||||
// that we use on on aTaskQueue to decode the decrypted stream.
|
// that we use on on aTaskQueue to decode the decrypted stream.
|
||||||
// This is called on the decode task queue.
|
// This is called on the decode task queue.
|
||||||
|
#ifdef MOZ_EME
|
||||||
void SetCDMProxy(CDMProxy* aProxy);
|
void SetCDMProxy(CDMProxy* aProxy);
|
||||||
|
#endif
|
||||||
|
|
||||||
static constexpr int kYUV400 = 0;
|
static constexpr int kYUV400 = 0;
|
||||||
static constexpr int kYUV420 = 1;
|
static constexpr int kYUV420 = 1;
|
||||||
|
@ -71,7 +75,9 @@ private:
|
||||||
|
|
||||||
bool mWMFFailedToLoad = false;
|
bool mWMFFailedToLoad = false;
|
||||||
bool mFFmpegFailedToLoad = false;
|
bool mFFmpegFailedToLoad = false;
|
||||||
|
#ifdef THE_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;
|
||||||
|
|
|
@ -14,7 +14,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 THE_GMP
|
||||||
#include "GMPService.h"
|
#include "GMPService.h"
|
||||||
|
#endif
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include "MediaResult.h"
|
#include "MediaResult.h"
|
||||||
|
|
||||||
|
@ -36,7 +38,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");
|
||||||
|
|
||||||
|
@ -79,7 +83,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 THE_GMP
|
||||||
RefPtr<GMPCrashHelper> mCrashHelper;
|
RefPtr<GMPCrashHelper> mCrashHelper;
|
||||||
|
#endif
|
||||||
bool mUseBlankDecoder = false;
|
bool mUseBlankDecoder = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -88,7 +94,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 THE_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>
|
||||||
|
|
|
@ -29,11 +29,13 @@ UNIFIED_SOURCES += [
|
||||||
'wrappers/H264Converter.cpp'
|
'wrappers/H264Converter.cpp'
|
||||||
]
|
]
|
||||||
|
|
||||||
DIRS += [
|
if CONFIG['MOZ_EME']:
|
||||||
'agnostic/eme',
|
DIRS += ['agnostic/eme']
|
||||||
'agnostic/gmp',
|
|
||||||
'omx'
|
if CONFIG['THE_GMP']:
|
||||||
]
|
DIRS += ['agnostic/gmp']
|
||||||
|
|
||||||
|
DIRS += ['omx']
|
||||||
|
|
||||||
if CONFIG['MOZ_WMF']:
|
if CONFIG['MOZ_WMF']:
|
||||||
DIRS += [ 'wmf' ];
|
DIRS += [ 'wmf' ];
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "mozilla/WindowsVersion.h"
|
#include "mozilla/WindowsVersion.h"
|
||||||
#include "mozilla/Telemetry.h"
|
#include "mozilla/Telemetry.h"
|
||||||
#include "nsPrintfCString.h"
|
#include "nsPrintfCString.h"
|
||||||
#include "GMPUtils.h" // For SplitAt. TODO: Move SplitAt to a central place.
|
#include "utils.h"
|
||||||
#include "MP4Decoder.h"
|
#include "MP4Decoder.h"
|
||||||
#include "VPXDecoder.h"
|
#include "VPXDecoder.h"
|
||||||
#include "mozilla/SyncRunnable.h"
|
#include "mozilla/SyncRunnable.h"
|
||||||
|
|
|
@ -24,7 +24,9 @@ H264Converter::H264Converter(PlatformDecoderModule* aPDM,
|
||||||
, mTaskQueue(aParams.mTaskQueue)
|
, mTaskQueue(aParams.mTaskQueue)
|
||||||
, mCallback(aParams.mCallback)
|
, mCallback(aParams.mCallback)
|
||||||
, mDecoder(nullptr)
|
, mDecoder(nullptr)
|
||||||
|
#ifdef THE_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)
|
||||||
|
@ -200,8 +202,10 @@ H264Converter::CreateDecoder(DecoderDoctorDiagnostics* aDiagnostics)
|
||||||
mCallback,
|
mCallback,
|
||||||
aDiagnostics,
|
aDiagnostics,
|
||||||
mImageContainer,
|
mImageContainer,
|
||||||
mKnowsCompositor,
|
mKnowsCompositor
|
||||||
mGMPCrashHelper
|
#ifdef THE_GMP
|
||||||
|
,mGMPCrashHelper
|
||||||
|
#endif
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!mDecoder) {
|
if (!mDecoder) {
|
||||||
|
|
|
@ -63,7 +63,9 @@ private:
|
||||||
MediaDataDecoderCallback* mCallback;
|
MediaDataDecoderCallback* mCallback;
|
||||||
RefPtr<MediaDataDecoder> mDecoder;
|
RefPtr<MediaDataDecoder> mDecoder;
|
||||||
MozPromiseRequestHolder<InitPromise> mInitPromiseRequest;
|
MozPromiseRequestHolder<InitPromise> mInitPromiseRequest;
|
||||||
|
#ifdef THE_GMP
|
||||||
RefPtr<GMPCrashHelper> mGMPCrashHelper;
|
RefPtr<GMPCrashHelper> mGMPCrashHelper;
|
||||||
|
#endif
|
||||||
bool mNeedAVCC;
|
bool mNeedAVCC;
|
||||||
nsresult mLastError;
|
nsresult mLastError;
|
||||||
bool mNeedKeyframe = true;
|
bool mNeedKeyframe = true;
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
|
/* vim: set ts=8 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/. */
|
||||||
|
|
||||||
|
#include "utils.h"
|
||||||
|
#include "nsLiteralString.h"
|
||||||
|
#include "nsCRTGlue.h"
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace mozilla
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
|
/* 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/. */
|
||||||
|
|
||||||
|
#ifndef MUtils_h_
|
||||||
|
#define MUtils_h_
|
||||||
|
|
||||||
|
#include "nsTArray.h"
|
||||||
|
|
||||||
|
class nsCString;
|
||||||
|
|
||||||
|
namespace mozilla {
|
||||||
|
|
||||||
|
void
|
||||||
|
SplitAt(const char* aDelims,
|
||||||
|
const nsACString& aInput,
|
||||||
|
nsTArray<nsCString>& aOutTokens);
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace mozilla
|
||||||
|
|
||||||
|
#endif
|
|
@ -8,15 +8,23 @@
|
||||||
|
|
||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
#include "MediaResource.h"
|
#include "MediaResource.h"
|
||||||
|
#ifdef THE_GMP
|
||||||
#include "GMPService.h"
|
#include "GMPService.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS0(BufferDecoder)
|
NS_IMPL_ISUPPORTS0(BufferDecoder)
|
||||||
|
|
||||||
BufferDecoder::BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper)
|
BufferDecoder::BufferDecoder(MediaResource* aResource
|
||||||
|
#ifdef THE_GMP
|
||||||
|
, GMPCrashHelper* aCrashHelper
|
||||||
|
#endif
|
||||||
|
)
|
||||||
: mResource(aResource)
|
: mResource(aResource)
|
||||||
|
#ifdef THE_GMP
|
||||||
, mCrashHelper(aCrashHelper)
|
, mCrashHelper(aCrashHelper)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
MOZ_COUNT_CTOR(BufferDecoder);
|
MOZ_COUNT_CTOR(BufferDecoder);
|
||||||
|
@ -67,11 +75,12 @@ BufferDecoder::GetOwner() const
|
||||||
// unknown
|
// unknown
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
#ifdef THE_GMP
|
||||||
already_AddRefed<GMPCrashHelper>
|
already_AddRefed<GMPCrashHelper>
|
||||||
BufferDecoder::GetCrashHelper()
|
BufferDecoder::GetCrashHelper()
|
||||||
{
|
{
|
||||||
return do_AddRef(mCrashHelper);
|
return do_AddRef(mCrashHelper);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -24,7 +24,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.
|
||||||
explicit BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper);
|
explicit BufferDecoder(MediaResource* aResource
|
||||||
|
#ifdef THE_GMP
|
||||||
|
,GMPCrashHelper* aCrashHelper
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
|
|
||||||
|
@ -40,13 +44,17 @@ public:
|
||||||
|
|
||||||
MediaDecoderOwner* GetOwner() const final override;
|
MediaDecoderOwner* GetOwner() const final override;
|
||||||
|
|
||||||
|
#ifdef THE_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 THE_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 THE_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 THE_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,11 @@ MediaDecodeTask::CreateReader()
|
||||||
mLength, principal, mContentType);
|
mLength, principal, mContentType);
|
||||||
|
|
||||||
MOZ_ASSERT(!mBufferDecoder);
|
MOZ_ASSERT(!mBufferDecoder);
|
||||||
mBufferDecoder = new BufferDecoder(resource,
|
mBufferDecoder = new BufferDecoder(resource
|
||||||
new BufferDecoderGMPCrashHelper(mDecodeJob.mContext->GetParentObject()));
|
#ifdef THE_GMP
|
||||||
|
,new BufferDecoderGMPCrashHelper(mDecodeJob.mContext->GetParentObject())
|
||||||
|
#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.
|
||||||
|
|
|
@ -286,15 +286,7 @@ WEBIDL_FILES = [
|
||||||
'MediaDeviceInfo.webidl',
|
'MediaDeviceInfo.webidl',
|
||||||
'MediaDevices.webidl',
|
'MediaDevices.webidl',
|
||||||
'MediaElementAudioSourceNode.webidl',
|
'MediaElementAudioSourceNode.webidl',
|
||||||
'MediaEncryptedEvent.webidl',
|
|
||||||
'MediaError.webidl',
|
'MediaError.webidl',
|
||||||
'MediaKeyError.webidl',
|
|
||||||
'MediaKeyMessageEvent.webidl',
|
|
||||||
'MediaKeys.webidl',
|
|
||||||
'MediaKeySession.webidl',
|
|
||||||
'MediaKeysRequestStatus.webidl',
|
|
||||||
'MediaKeyStatusMap.webidl',
|
|
||||||
'MediaKeySystemAccess.webidl',
|
|
||||||
'MediaList.webidl',
|
'MediaList.webidl',
|
||||||
'MediaQueryList.webidl',
|
'MediaQueryList.webidl',
|
||||||
'MediaRecorder.webidl',
|
'MediaRecorder.webidl',
|
||||||
|
@ -591,6 +583,17 @@ WEBIDL_FILES = [
|
||||||
'XULElement.webidl',
|
'XULElement.webidl',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if CONFIG['MOZ_EME']:
|
||||||
|
WEBIDL_FILES += ['MediaEncryptedEvent.webidl',
|
||||||
|
'MediaKeyError.webidl',
|
||||||
|
'MediaKeyMessageEvent.webidl',
|
||||||
|
'MediaKeys.webidl',
|
||||||
|
'MediaKeySession.webidl',
|
||||||
|
'MediaKeysRequestStatus.webidl',
|
||||||
|
'MediaKeyStatusMap.webidl',
|
||||||
|
'MediaKeySystemAccess.webidl',
|
||||||
|
]
|
||||||
|
|
||||||
if CONFIG['MOZ_WEBEXTENSIONS']:
|
if CONFIG['MOZ_WEBEXTENSIONS']:
|
||||||
WEBIDL_FILES += ['AddonManager.webidl']
|
WEBIDL_FILES += ['AddonManager.webidl']
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ using mozilla::layers::GeckoContentController::TapType from "mozilla/layers/Geck
|
||||||
using nsEventStatus from "mozilla/EventForwards.h";
|
using nsEventStatus from "mozilla/EventForwards.h";
|
||||||
using EventMessage from "mozilla/EventForwards.h";
|
using EventMessage from "mozilla/EventForwards.h";
|
||||||
using mozilla::Modifiers from "mozilla/EventForwards.h";
|
using mozilla::Modifiers from "mozilla/EventForwards.h";
|
||||||
|
using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
|
||||||
using class mozilla::WidgetInputEvent from "mozilla/BasicEvents.h";
|
using class mozilla::WidgetInputEvent from "mozilla/BasicEvents.h";
|
||||||
using class mozilla::WidgetMouseEventBase from "mozilla/MouseEvents.h";
|
using class mozilla::WidgetMouseEventBase from "mozilla/MouseEvents.h";
|
||||||
using mozilla::WidgetMouseEvent::Reason from "mozilla/MouseEvents.h";
|
using mozilla::WidgetMouseEvent::Reason from "mozilla/MouseEvents.h";
|
||||||
|
|
|
@ -29,7 +29,7 @@ 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.
|
||||||
if CONFIG['OS_TARGET'] != 'Android':
|
if CONFIG['OS_TARGET'] != 'Android' and CONFIG['THE_GMP']:
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'../../dom/media/gmp/GMPLoader.cpp',
|
'../../dom/media/gmp/GMPLoader.cpp',
|
||||||
]
|
]
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
#include "GMPLoader.h"
|
#include "GMPLoader.h"
|
||||||
|
|
||||||
mozilla::gmp::SandboxStarter*
|
mozilla::gmp::SandboxStarter*
|
||||||
|
@ -27,6 +28,7 @@ MakeSandboxStarter()
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
content_process_main(int argc, char* argv[])
|
content_process_main(int argc, char* argv[])
|
||||||
|
@ -50,7 +52,7 @@ content_process_main(int argc, char* argv[])
|
||||||
SetDllDirectoryW(L"");
|
SetDllDirectoryW(L"");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if !defined(MOZ_WIDGET_ANDROID) && defined(MOZ_PLUGIN_CONTAINER)
|
#if !defined(MOZ_WIDGET_ANDROID) && defined(MOZ_PLUGIN_CONTAINER) && defined(THE_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());
|
||||||
|
|
|
@ -187,7 +187,9 @@ static void Shutdown();
|
||||||
|
|
||||||
#include "MediaManager.h"
|
#include "MediaManager.h"
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
#include "GMPService.h"
|
#include "GMPService.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mozilla/dom/PresentationDeviceManager.h"
|
#include "mozilla/dom/PresentationDeviceManager.h"
|
||||||
#include "mozilla/dom/PresentationTCPSessionTransport.h"
|
#include "mozilla/dom/PresentationTCPSessionTransport.h"
|
||||||
|
@ -203,7 +205,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 THE_GMP
|
||||||
using mozilla::gmp::GeckoMediaPluginService;
|
using mozilla::gmp::GeckoMediaPluginService;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NS_EDITORCOMMANDTABLE_CID \
|
#define NS_EDITORCOMMANDTABLE_CID \
|
||||||
{ 0x4f5e62b8, 0xd659, 0x4156, \
|
{ 0x4f5e62b8, 0xd659, 0x4156, \
|
||||||
|
@ -557,8 +561,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 THE_GMP
|
||||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(GeckoMediaPluginService, GeckoMediaPluginService::GetGeckoMediaPluginService)
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(GeckoMediaPluginService, GeckoMediaPluginService::GetGeckoMediaPluginService)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
#include "xpcAccessibilityService.h"
|
#include "xpcAccessibilityService.h"
|
||||||
|
@ -967,7 +972,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 THE_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 },
|
||||||
|
@ -1104,7 +1111,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 THE_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
|
||||||
{ PRESENTATION_SERVICE_CONTRACTID, &kPRESENTATION_SERVICE_CID },
|
{ PRESENTATION_SERVICE_CONTRACTID, &kPRESENTATION_SERVICE_CID },
|
||||||
{ PRESENTATION_DEVICE_MANAGER_CONTRACTID, &kPRESENTATION_DEVICE_MANAGER_CID },
|
{ PRESENTATION_DEVICE_MANAGER_CONTRACTID, &kPRESENTATION_DEVICE_MANAGER_CID },
|
||||||
{ PRESENTATION_TCP_SESSION_TRANSPORT_CONTRACTID, &kPRESENTATION_TCP_SESSION_TRANSPORT_CID },
|
{ PRESENTATION_TCP_SESSION_TRANSPORT_CONTRACTID, &kPRESENTATION_TCP_SESSION_TRANSPORT_CID },
|
||||||
|
|
|
@ -418,5 +418,3 @@ include invalidation/reftest.list
|
||||||
# encodings
|
# encodings
|
||||||
include ../../dom/encoding/test/reftest/reftest.list
|
include ../../dom/encoding/test/reftest/reftest.list
|
||||||
|
|
||||||
# APZ/async positioning tests
|
|
||||||
include ../../gfx/layers/apz/test/reftest/reftest.list
|
|
||||||
|
|
|
@ -830,8 +830,10 @@ pref("device.storage.enabled", true);
|
||||||
// Enable meta-viewport support for font inflation code
|
// Enable meta-viewport support for font inflation code
|
||||||
pref("dom.meta-viewport.enabled", true);
|
pref("dom.meta-viewport.enabled", true);
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
// Enable GMP support in the addon manager.
|
// Enable GMP support in the addon manager.
|
||||||
pref("media.gmp-provider.enabled", true);
|
pref("media.gmp-provider.enabled", true);
|
||||||
|
#endif
|
||||||
|
|
||||||
// The default color scheme in reader mode (light, dark, auto)
|
// The default color scheme in reader mode (light, dark, auto)
|
||||||
// auto = color automatically adjusts according to ambient light level
|
// auto = color automatically adjusts according to ambient light level
|
||||||
|
|
|
@ -558,9 +558,6 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [
|
||||||
'media/Codec.java',
|
'media/Codec.java',
|
||||||
'media/CodecProxy.java',
|
'media/CodecProxy.java',
|
||||||
'media/FormatParam.java',
|
'media/FormatParam.java',
|
||||||
'media/GeckoMediaDrm.java',
|
|
||||||
'media/GeckoMediaDrmBridgeV21.java',
|
|
||||||
'media/GeckoMediaDrmBridgeV23.java',
|
|
||||||
'media/JellyBeanAsyncCodec.java',
|
'media/JellyBeanAsyncCodec.java',
|
||||||
'media/LocalMediaDrmBridge.java',
|
'media/LocalMediaDrmBridge.java',
|
||||||
'media/MediaControlService.java',
|
'media/MediaControlService.java',
|
||||||
|
@ -783,6 +780,14 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [
|
||||||
'widget/TwoWayView.java',
|
'widget/TwoWayView.java',
|
||||||
'ZoomedView.java',
|
'ZoomedView.java',
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
if CONFIG['THE_GMP']:
|
||||||
|
gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [
|
||||||
|
'media/GeckoMediaDrm.java',
|
||||||
|
'media/GeckoMediaDrmBridgeV21.java',
|
||||||
|
'media/GeckoMediaDrmBridgeV23.java',
|
||||||
|
]]
|
||||||
|
|
||||||
# The following sources are checked in to version control but
|
# The following sources are checked in to version control but
|
||||||
# generated by a script (java/org/mozilla/gecko/widget/themed/generate_themed_views.py).
|
# generated by a script (java/org/mozilla/gecko/widget/themed/generate_themed_views.py).
|
||||||
# If you're editing this list, make sure to edit that script.
|
# If you're editing this list, make sure to edit that script.
|
||||||
|
|
|
@ -15,8 +15,10 @@ XPCOMUtils.defineLazyModuleGetter(this, "AddonManagerPrivate",
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "AddonRepository",
|
XPCOMUtils.defineLazyModuleGetter(this, "AddonRepository",
|
||||||
"resource://gre/modules/addons/AddonRepository.jsm");
|
"resource://gre/modules/addons/AddonRepository.jsm");
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "GMPInstallManager",
|
XPCOMUtils.defineLazyModuleGetter(this, "GMPInstallManager",
|
||||||
"resource://gre/modules/GMPInstallManager.jsm");
|
"resource://gre/modules/GMPInstallManager.jsm");
|
||||||
|
#endif
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetter(this, "Messaging",
|
XPCOMUtils.defineLazyModuleGetter(this, "Messaging",
|
||||||
"resource://gre/modules/Messaging.jsm");
|
"resource://gre/modules/Messaging.jsm");
|
||||||
|
@ -58,8 +60,10 @@ AddonUpdateService.prototype = {
|
||||||
|
|
||||||
AddonManagerPrivate.backgroundUpdateCheck();
|
AddonManagerPrivate.backgroundUpdateCheck();
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
let gmp = new GMPInstallManager();
|
let gmp = new GMPInstallManager();
|
||||||
gmp.simpleCheckAndInstall().then(null, () => {});
|
gmp.simpleCheckAndInstall().then(null, () => {});
|
||||||
|
#endif
|
||||||
|
|
||||||
let interval = 1000 * getPref("getIntPref", PREF_ADDON_UPDATE_INTERVAL, 86400);
|
let interval = 1000 * getPref("getIntPref", PREF_ADDON_UPDATE_INTERVAL, 86400);
|
||||||
Messaging.sendRequest({
|
Messaging.sendRequest({
|
||||||
|
|
|
@ -394,9 +394,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 THE_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
|
||||||
|
@ -418,7 +420,9 @@ pref("media.apple.mp4.enabled", true);
|
||||||
// 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.
|
||||||
|
#ifdef THE_GMP
|
||||||
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.
|
||||||
|
@ -5233,6 +5237,7 @@ pref("browser.search.official", true);
|
||||||
//pref("media.gmp-manager.url.override", "");
|
//pref("media.gmp-manager.url.override", "");
|
||||||
|
|
||||||
// Update service URL for GMP install/updates:
|
// Update service URL for GMP install/updates:
|
||||||
|
#ifdef THE_GMP
|
||||||
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");
|
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
|
// When |media.gmp-manager.cert.requireBuiltIn| is true or not specified the
|
||||||
|
@ -5262,6 +5267,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.
|
||||||
|
|
|
@ -61,7 +61,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
|
||||||
|
@ -131,6 +131,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 THE_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
|
||||||
|
|
|
@ -14,6 +14,8 @@ 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 THE_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);
|
||||||
|
@ -21,6 +23,8 @@ Services.cpmm.addMessageListener("gmp-plugin-crash", msg => {
|
||||||
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 = {
|
||||||
TOPICS: [
|
TOPICS: [
|
||||||
|
|
|
@ -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 THE_GMP
|
||||||
// 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;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
|
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
|
||||||
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
|
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
|
||||||
|
|
||||||
EXTRA_JS_MODULES += [
|
EXTRA_PP_JS_MODULES += [
|
||||||
'ForgetAboutSite.jsm',
|
'ForgetAboutSite.jsm',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -322,7 +322,20 @@ def wmf(value, target):
|
||||||
|
|
||||||
set_config('MOZ_WMF', wmf)
|
set_config('MOZ_WMF', wmf)
|
||||||
set_define('MOZ_WMF', wmf)
|
set_define('MOZ_WMF', wmf)
|
||||||
|
# GMP
|
||||||
|
# ==============================================================
|
||||||
|
option('--disable-gmp',
|
||||||
|
help='Disable support for gmp')
|
||||||
|
|
||||||
|
@depends('--disable-gmp', target)
|
||||||
|
def gmp(value, target):
|
||||||
|
enabled = bool(value)
|
||||||
|
if value.origin == 'default':
|
||||||
|
enabled = true
|
||||||
|
if enabled:
|
||||||
|
return True
|
||||||
|
set_config('THE_GMP', gmp)
|
||||||
|
set_define('THE_GMP', gmp)
|
||||||
# FFmpeg H264/AAC Decoding Support
|
# FFmpeg H264/AAC Decoding Support
|
||||||
# ==============================================================
|
# ==============================================================
|
||||||
option('--disable-ffmpeg',
|
option('--disable-ffmpeg',
|
||||||
|
|
|
@ -11,4 +11,6 @@ category JavaScript-global-property InstallTrigger @mozilla.org/addons/installtr
|
||||||
#ifndef MOZ_WIDGET_ANDROID
|
#ifndef MOZ_WIDGET_ANDROID
|
||||||
category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm
|
category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef THE_GMP
|
||||||
category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm
|
category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm
|
||||||
|
#endif
|
||||||
|
|
|
@ -8,12 +8,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',
|
||||||
'ProductAddonChecker.jsm',
|
|
||||||
'SpellCheckDictionaryBootstrap.js',
|
'SpellCheckDictionaryBootstrap.js',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if CONFIG['THE_GMP']:
|
||||||
|
EXTRA_JS_MODULES.addons += [
|
||||||
|
'GMPProvider.jsm',
|
||||||
|
'ProductAddonChecker.jsm',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
# Don't ship unused providers on Android
|
# Don't ship unused providers on Android
|
||||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
|
||||||
EXTRA_JS_MODULES.addons += [
|
EXTRA_JS_MODULES.addons += [
|
||||||
|
|
|
@ -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 THE_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)
|
||||||
|
|
|
@ -29,15 +29,18 @@ EXTRA_PP_COMPONENTS += [
|
||||||
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['THE_GMP']:
|
||||||
|
EXTRA_JS_MODULES += ['GMPUtils.jsm',]
|
||||||
|
EXTRA_PP_JS_MODULES += ['GMPInstallManager.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']:
|
||||||
DEFINES['MOZ_EM_DEBUG'] = 1
|
DEFINES['MOZ_EM_DEBUG'] = 1
|
||||||
|
|
|
@ -13,6 +13,8 @@ category JavaScript-global-property InstallTrigger @mozilla.org/addons/installtr
|
||||||
#ifndef MOZ_WIDGET_ANDROID
|
#ifndef MOZ_WIDGET_ANDROID
|
||||||
category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm
|
category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef THE_GMP
|
||||||
category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm
|
category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm
|
||||||
|
#endif
|
||||||
component {8866d8e3-4ea5-48b7-a891-13ba0ac15235} amWebAPI.js
|
component {8866d8e3-4ea5-48b7-a891-13ba0ac15235} amWebAPI.js
|
||||||
contract @mozilla.org/addon-web-api/manager;1 {8866d8e3-4ea5-48b7-a891-13ba0ac15235}
|
contract @mozilla.org/addon-web-api/manager;1 {8866d8e3-4ea5-48b7-a891-13ba0ac15235}
|
||||||
|
|
|
@ -25,8 +25,10 @@ toolkit.jar:
|
||||||
content/mozapps/extensions/newaddon.xul (content/newaddon.xul)
|
content/mozapps/extensions/newaddon.xul (content/newaddon.xul)
|
||||||
* content/mozapps/extensions/newaddon.js (../extensions/content/newaddon.js)
|
* content/mozapps/extensions/newaddon.js (../extensions/content/newaddon.js)
|
||||||
content/mozapps/extensions/pluginPrefs.xul (../extensions/content/pluginPrefs.xul)
|
content/mozapps/extensions/pluginPrefs.xul (../extensions/content/pluginPrefs.xul)
|
||||||
|
#ifdef THE_GMP
|
||||||
content/mozapps/extensions/gmpPrefs.xul (../extensions/content/gmpPrefs.xul)
|
content/mozapps/extensions/gmpPrefs.xul (../extensions/content/gmpPrefs.xul)
|
||||||
content/mozapps/extensions/OpenH264-license.txt (../extensions/content/OpenH264-license.txt)
|
content/mozapps/extensions/OpenH264-license.txt (../extensions/content/OpenH264-license.txt)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
content/mozapps/extensions/setting.xml (content/setting.xml)
|
content/mozapps/extensions/setting.xml (content/setting.xml)
|
||||||
content/mozapps/xpinstall/xpinstallConfirm.xul (../extensions/content/xpinstallConfirm.xul)
|
content/mozapps/xpinstall/xpinstallConfirm.xul (../extensions/content/xpinstallConfirm.xul)
|
||||||
|
|
|
@ -30,12 +30,15 @@ EXTRA_PP_COMPONENTS += [
|
||||||
EXTRA_JS_MODULES += [
|
EXTRA_JS_MODULES += [
|
||||||
'../extensions/ChromeManifestParser.jsm',
|
'../extensions/ChromeManifestParser.jsm',
|
||||||
'../extensions/DeferredSave.jsm',
|
'../extensions/DeferredSave.jsm',
|
||||||
'../extensions/GMPUtils.jsm',
|
|
||||||
'AddonManager.jsm',
|
'AddonManager.jsm',
|
||||||
'LightweightThemeManager.jsm',
|
'LightweightThemeManager.jsm',
|
||||||
'GMPInstallManager.jsm',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if CONFIG['THE_GMP']:
|
||||||
|
EXTRA_JS_MODULES += ['../extensions/GMPUtils.jsm',
|
||||||
|
'GMPInstallManager.jsm',
|
||||||
|
]
|
||||||
|
|
||||||
JAR_MANIFESTS += ['jar.mn']
|
JAR_MANIFESTS += ['jar.mn']
|
||||||
|
|
||||||
EXPORTS.mozilla += [
|
EXPORTS.mozilla += [
|
||||||
|
|
|
@ -67,8 +67,10 @@
|
||||||
#include "mozilla/ipc/XPCShellEnvironment.h"
|
#include "mozilla/ipc/XPCShellEnvironment.h"
|
||||||
#include "mozilla/WindowsDllBlocklist.h"
|
#include "mozilla/WindowsDllBlocklist.h"
|
||||||
|
|
||||||
|
#ifdef THE_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"
|
||||||
|
@ -95,9 +97,11 @@ using mozilla::dom::ContentProcess;
|
||||||
using mozilla::dom::ContentParent;
|
using mozilla::dom::ContentParent;
|
||||||
using mozilla::dom::ContentChild;
|
using mozilla::dom::ContentChild;
|
||||||
|
|
||||||
|
#ifdef THE_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;
|
||||||
|
@ -267,6 +271,7 @@ XRE_InitChildProcess(int aArgc,
|
||||||
NS_ENSURE_ARG_POINTER(aArgv[0]);
|
NS_ENSURE_ARG_POINTER(aArgv[0]);
|
||||||
MOZ_ASSERT(aChildData);
|
MOZ_ASSERT(aChildData);
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
#if !defined(MOZ_WIDGET_ANDROID)
|
#if !defined(MOZ_WIDGET_ANDROID)
|
||||||
// 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.
|
||||||
|
@ -278,6 +283,7 @@ XRE_InitChildProcess(int aArgc,
|
||||||
UniquePtr<GMPLoader> loader = CreateGMPLoader(nullptr);
|
UniquePtr<GMPLoader> loader = CreateGMPLoader(nullptr);
|
||||||
GMPProcessChild::SetGMPLoader(loader.get());
|
GMPProcessChild::SetGMPLoader(loader.get());
|
||||||
#endif
|
#endif
|
||||||
|
#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
|
||||||
|
@ -480,9 +486,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 THE_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;
|
||||||
|
@ -544,9 +552,11 @@ XRE_InitChildProcess(int aArgc,
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef THE_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);
|
||||||
|
|
|
@ -9,18 +9,19 @@
|
||||||
|
|
||||||
#include "mozilla/UniquePtr.h"
|
#include "mozilla/UniquePtr.h"
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace gmp {
|
namespace gmp {
|
||||||
class GMPLoader;
|
class GMPLoader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* Data needed to start a child process.
|
* Data needed to start a child process.
|
||||||
*/
|
*/
|
||||||
struct XREChildData
|
struct XREChildData
|
||||||
{
|
{
|
||||||
#if !defined(MOZ_WIDGET_ANDROID)
|
#if !defined(MOZ_WIDGET_ANDROID) && defined(THE_GMP)
|
||||||
/**
|
/**
|
||||||
* Used to load the GMP binary.
|
* Used to load the GMP binary.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -425,11 +425,13 @@ XRE_API(const char*,
|
||||||
XRE_API(void,
|
XRE_API(void,
|
||||||
XRE_SetProcessType, (const char* aProcessTypeString))
|
XRE_SetProcessType, (const char* aProcessTypeString))
|
||||||
|
|
||||||
|
#ifdef THE_GMP
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace gmp {
|
namespace gmp {
|
||||||
class GMPLoader;
|
class GMPLoader;
|
||||||
} // namespace gmp
|
} // namespace gmp
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
#endif
|
||||||
|
|
||||||
XRE_API(nsresult,
|
XRE_API(nsresult,
|
||||||
XRE_InitChildProcess, (int aArgc,
|
XRE_InitChildProcess, (int aArgc,
|
||||||
|
|
Loading…
Reference in New Issue