summaryrefslogtreecommitdiffstats
path: root/dom/media/gmp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /dom/media/gmp
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/media/gmp')
-rw-r--r--dom/media/gmp/ChromiumCDMChild.cpp2
-rw-r--r--dom/media/gmp/ChromiumCDMProxy.cpp9
-rw-r--r--dom/media/gmp/GMPChild.cpp11
-rw-r--r--dom/media/gmp/moz.build2
-rw-r--r--dom/media/gmp/mozIGeckoMediaPluginChromeService.idl4
-rw-r--r--dom/media/gmp/widevine-adapter/content_decryption_module.h1
6 files changed, 17 insertions, 12 deletions
diff --git a/dom/media/gmp/ChromiumCDMChild.cpp b/dom/media/gmp/ChromiumCDMChild.cpp
index 4592f2e291..343622d37f 100644
--- a/dom/media/gmp/ChromiumCDMChild.cpp
+++ b/dom/media/gmp/ChromiumCDMChild.cpp
@@ -450,7 +450,7 @@ mozilla::ipc::IPCResult ChromiumCDMChild::RecvCreateSessionAndGenerateRequest(
"pid=%" PRIu32 ", sessionType=%" PRIu32 ", initDataType=%" PRIu32
") initDataLen=%zu",
aPromiseId, aSessionType, aInitDataType, aInitData.Length());
- MOZ_ASSERT(aSessionType <= cdm::SessionType::kPersistentUsageRecord);
+ MOZ_ASSERT(aSessionType <= cdm::SessionType::kPersistentLicense);
MOZ_ASSERT(aInitDataType <= cdm::InitDataType::kWebM);
if (mCDM) {
mCDM->CreateSessionAndGenerateRequest(
diff --git a/dom/media/gmp/ChromiumCDMProxy.cpp b/dom/media/gmp/ChromiumCDMProxy.cpp
index 566b386b0b..43ce3e50af 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 "mozilla/dom/MediaKeysBinding.h"
#include "GMPUtils.h"
@@ -382,13 +383,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 d543d46387..ca8b6a4ed4 100644
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -41,6 +41,7 @@
#include "nsXULAppAPI.h"
#include "nsIXULRuntime.h"
#include "nsXPCOM.h"
+#include "nsXPCOMPrivate.h" // for XUL_DLL
#include "prio.h"
#ifdef XP_WIN
# include <stdlib.h> // for _exit()
@@ -348,15 +349,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 3c34021506..744209fa1c 100644
--- a/dom/media/gmp/moz.build
+++ b/dom/media/gmp/moz.build
@@ -129,6 +129,8 @@ PREPROCESSED_IPDL_SOURCES += [
if CONFIG["TARGET_OS"] in ["WINNT", "OSX"]:
DEFINES["SUPPORT_STORAGE_ID"] = 1
+DEFINES["MOZ_APP_NAME"] = '"%s"' % CONFIG["MOZ_APP_NAME"]
+
include("/ipc/chromium/chromium-config.mozbuild")
if CONFIG["MOZ_SANDBOX"]:
diff --git a/dom/media/gmp/mozIGeckoMediaPluginChromeService.idl b/dom/media/gmp/mozIGeckoMediaPluginChromeService.idl
index 51dc545092..bc782978c9 100644
--- a/dom/media/gmp/mozIGeckoMediaPluginChromeService.idl
+++ b/dom/media/gmp/mozIGeckoMediaPluginChromeService.idl
@@ -27,7 +27,7 @@ interface mozIGeckoMediaPluginChromeService : nsISupports
* @note Main-thread API.
*/
void removeAndDeletePluginDirectory(in AString directory,
- [optional] in bool defer);
+ [optional] in boolean defer);
/**
* Clears storage data associated with the site and the originAttributes
@@ -48,7 +48,7 @@ interface mozIGeckoMediaPluginChromeService : nsISupports
* persistently on disk. Private Browsing and local content are not
* allowed to store persistent data.
*/
- bool isPersistentStorageAllowed(in ACString nodeId);
+ boolean isPersistentStorageAllowed(in ACString nodeId);
/**
* Returns the directory to use as the base for storing data about GMPs.
diff --git a/dom/media/gmp/widevine-adapter/content_decryption_module.h b/dom/media/gmp/widevine-adapter/content_decryption_module.h
index 68fee35195..f9101fbaf0 100644
--- a/dom/media/gmp/widevine-adapter/content_decryption_module.h
+++ b/dom/media/gmp/widevine-adapter/content_decryption_module.h
@@ -411,7 +411,6 @@ CHECK_TYPE(InitDataType, 4, 4);
enum SessionType : uint32_t {
kTemporary = 0,
kPersistentLicense = 1,
- kPersistentUsageRecord = 2
};
CHECK_TYPE(SessionType, 4, 4);