diff options
Diffstat (limited to 'dom/media')
-rw-r--r-- | dom/media/gmp/ChromiumCDMProxy.cpp | 9 | ||||
-rw-r--r-- | dom/media/gmp/GMPChild.cpp | 11 | ||||
-rw-r--r-- | dom/media/gmp/moz.build | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/dom/media/gmp/ChromiumCDMProxy.cpp b/dom/media/gmp/ChromiumCDMProxy.cpp index 26d0475ad8..debcb71b6f 100644 --- a/dom/media/gmp/ChromiumCDMProxy.cpp +++ b/dom/media/gmp/ChromiumCDMProxy.cpp @@ -7,6 +7,7 @@ #include "ChromiumCDMProxy.h" #include "ChromiumCDMCallbackProxy.h" #include "MediaResult.h" +#include "mozilla/StaticPrefs_media.h" #include "mozilla/dom/MediaKeySession.h" #include "GMPUtils.h" #include "nsPrintfCString.h" @@ -381,13 +382,19 @@ void ChromiumCDMProxy::NotifyOutputProtectionStatus( } uint32_t linkMask{}; - uint32_t protectionMask{}; // Unused/always zeroed. + uint32_t protectionMask{}; if (aCheckStatus == OutputProtectionCheckStatus::CheckSuccessful && aCaptureStatus == OutputProtectionCaptureStatus::CapturePossilbe) { // The result indicates the capture is possible, so set the mask // to indicate this. linkMask |= cdm::OutputLinkTypes::kLinkTypeNetwork; } + // `kProtectionNone` can cause playback to stop if HDCP_V1 is required. Report + // HDCP protection if there's no potential capturing. + if (linkMask == cdm::OutputLinkTypes::kLinkTypeNone && + StaticPrefs::media_widevine_hdcp_protection_mask()) { + protectionMask = cdm::OutputProtectionMethods::kProtectionHDCP; + } mGMPThread->Dispatch(NewRunnableMethod<bool, uint32_t, uint32_t>( "gmp::ChromiumCDMParent::NotifyOutputProtectionStatus", cdm, &gmp::ChromiumCDMParent::NotifyOutputProtectionStatus, diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp index 0d485345bc..8cc6503f9c 100644 --- a/dom/media/gmp/GMPChild.cpp +++ b/dom/media/gmp/GMPChild.cpp @@ -38,6 +38,7 @@ #include "nsThreadManager.h" #include "nsXULAppAPI.h" #include "nsIXULRuntime.h" +#include "nsXPCOMPrivate.h" // for XUL_DLL #include "prio.h" #ifdef XP_WIN # include <stdlib.h> // for _exit() @@ -283,15 +284,11 @@ static bool IsFileLeafEqualToASCII(const nsCOMPtr<nsIFile>& aFile, #endif #if defined(XP_WIN) -# define FIREFOX_FILE u"firefox.exe"_ns -# define XUL_LIB_FILE u"xul.dll"_ns -#elif defined(XP_MACOSX) -# define FIREFOX_FILE u"firefox"_ns -# define XUL_LIB_FILE u"XUL"_ns +# define FIREFOX_FILE MOZ_APP_NAME u".exe"_ns #else -# define FIREFOX_FILE u"firefox"_ns -# define XUL_LIB_FILE u"libxul.so"_ns +# define FIREFOX_FILE MOZ_APP_NAME u""_ns #endif +#define XUL_LIB_FILE XUL_DLL u""_ns static nsCOMPtr<nsIFile> GetFirefoxAppPath( nsCOMPtr<nsIFile> aPluginContainerPath) { diff --git a/dom/media/gmp/moz.build b/dom/media/gmp/moz.build index 4557793b4a..cea2951f02 100644 --- a/dom/media/gmp/moz.build +++ b/dom/media/gmp/moz.build @@ -129,6 +129,8 @@ PREPROCESSED_IPDL_SOURCES += [ if CONFIG["OS_TARGET"] in ["WINNT", "Darwin"]: DEFINES["SUPPORT_STORAGE_ID"] = 1 +DEFINES["MOZ_APP_NAME"] = '"%s"' % CONFIG["MOZ_APP_NAME"] + include("/ipc/chromium/chromium-config.mozbuild") if CONFIG["MOZ_SANDBOX"]: |