Bug 1828018 - move clearkey implementation out from the gmp-clear folder for the reusing purpose. r=aosmond

We're going to implement a Media Foundation based ClearKey CDM which
also needs to have same ability of our currnet GMP ClearyKey. In order
to avoid code duplication, this patch move the Clearkey implementation
out from the gmp-clearkey folder, and make them a library for the reuse
purpose.

Differential Revision: https://phabricator.services.mozilla.com/D175434
This commit is contained in:
alwu 2024-01-04 04:13:01 +00:00
Родитель 209acda515
Коммит 35fe5d5edc
22 изменённых файлов: 41 добавлений и 17 удалений

Просмотреть файл

Просмотреть файл

@ -0,0 +1,37 @@
# 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/.
EXPORTS += [
"ArrayUtils.h",
"BigEndian.h",
"ClearKeyBase64.h",
"ClearKeyDecryptionManager.h",
"ClearKeyPersistence.h",
"ClearKeySession.h",
"ClearKeySessionManager.h",
"ClearKeyStorage.h",
"ClearKeyUtils.h",
"RefCounted.h",
]
UNIFIED_SOURCES += [
"ClearKeyBase64.cpp",
"ClearKeyDecryptionManager.cpp",
"ClearKeyPersistence.cpp",
"ClearKeySession.cpp",
"ClearKeySessionManager.cpp",
"ClearKeyStorage.cpp",
"ClearKeyUtils.cpp",
]
TEST_DIRS += [
"gtest",
]
USE_LIBS += [
"nss",
"psshparser",
]
Library("gecko-clearkey")

Просмотреть файл

@ -49,6 +49,8 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
if CONFIG["MOZ_WMF_CDM"]:
DIRS += ["mediafoundation"]
DIRS += ["clearkey"]
include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"

Просмотреть файл

@ -13,15 +13,10 @@ FINAL_TARGET = "dist/bin/gmp-clearkey/0.1"
FINAL_TARGET_PP_FILES += ["manifest.json.in"]
USE_LIBS += ["gecko-clearkey"]
UNIFIED_SOURCES += [
"ClearKeyBase64.cpp",
"ClearKeyCDM.cpp",
"ClearKeyDecryptionManager.cpp",
"ClearKeyPersistence.cpp",
"ClearKeySession.cpp",
"ClearKeySessionManager.cpp",
"ClearKeyStorage.cpp",
"ClearKeyUtils.cpp",
"gmp-clearkey.cpp",
]
@ -42,21 +37,11 @@ if CONFIG["OS_ARCH"] == "WINNT":
DEFINES["ENABLE_WMF"] = True
DEFINES["CDM_IMPLEMENTATION"] = True
TEST_DIRS += [
"gtest",
]
DisableStlWrapping()
DEFINES["MOZ_NO_MOZALLOC"] = True
USE_LIBS += [
"nss",
"psshparser",
]
# Suppress warnings in third-party code.
CFLAGS += [
"-Wno-pointer-to-int-cast",