Bug 1271169 - Move all device binding code into librlz and remove static runtime requirement. r=glandium

I want the EME device binding/nodeId code to be callable from gtests, as well
as in plugin-container. I need this because I want to add a gtest that ensures
that we don't regress the EME/GMP device binding code. I want to call the GMP
device binding code in the gtest and in the GMP process, and compare the
result.

So we need to make it possible to link the device binding code into the gtests
as well as plugin-container. So move all code that device binding calls into
librlz, to make it easier to link against all the code required.

Note: the device binding code needs to be statically linked into
plugin-container so that it's covered by the Adobe CDM's voucher tool.


MozReview-Commit-ID: AvBAe1dh49Z

--HG--
rename : ipc/app/sha256.c => dom/media/gmp/rlz/sha256.c
rename : ipc/app/sha256.h => dom/media/gmp/rlz/sha256.h
extra : rebase_source : f60f1e68649fa90cbe1f2fe09f5f69948444b1df
This commit is contained in:
Chris Pearce 2016-05-20 16:11:29 +12:00
parent 9c711e8fb4
commit a7ee9fee8a
6 changed files with 25 additions and 20 deletions

View File

@ -79,6 +79,9 @@ if CONFIG['OS_TARGET'] == 'Android':
SOURCES += [
'GMPLoader.cpp',
]
USE_LIBS += [
'rlz',
]
UNIFIED_SOURCES += [
'GMPAudioDecoderChild.cpp',
@ -115,10 +118,9 @@ UNIFIED_SOURCES += [
'GMPVideoPlaneImpl.cpp',
]
if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin'):
DIRS += [
'rlz',
]
DIRS += [
'rlz',
]
if 'widevine' in CONFIG['MOZ_EME_MODULES']:
DIRS += [

View File

@ -8,12 +8,18 @@
# Chromium IPC's headers used in the moz.build of the parent file.
Library('rlz')
FORCE_STATIC_LIB = True
UNIFIED_SOURCES += [
'lib/string_utils.cc',
'GMPDeviceBinding.cpp',
]
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] in ['WINNT', 'Darwin']:
DEFINES['HASH_NODE_ID_WITH_DEVICE_ID'] = 1;
UNIFIED_SOURCES += [
'lib/string_utils.cc',
'sha256.c',
]
if CONFIG['OS_TARGET'] == 'WINNT':
UNIFIED_SOURCES += [
'win/lib/machine_id_win.cc',
@ -30,3 +36,7 @@ if CONFIG['OS_TARGET'] == 'Darwin':
LOCAL_INCLUDES += [
'..',
]
EXPORTS += [
'GMPDeviceBinding.h',
]

View File

@ -75,3 +75,7 @@ FINAL_LIBRARY = 'xul-gtest'
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']
USE_LIBS += [
'rlz',
]

View File

@ -33,6 +33,9 @@ if CONFIG['OS_TARGET'] != 'Android':
SOURCES += [
'../../dom/media/gmp/GMPLoader.cpp',
]
USE_LIBS += [
'rlz',
]
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
# For sandbox includes and the include dependencies those have
@ -40,19 +43,11 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
'/security/sandbox/chromium',
'/security/sandbox/chromium-shim',
]
USE_LIBS += [
'rlz',
]
USE_LIBS += [
'sandbox_s',
]
DEFINES['HASH_NODE_ID_WITH_DEVICE_ID'] = 1;
SOURCES += [
'sha256.c',
]
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] in ('Linux', 'Android'):
USE_LIBS += [
'mozsandbox',
@ -72,12 +67,6 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] == 'Darwin':
]
USE_LIBS += [
'mozsandbox',
'rlz',
]
DEFINES['HASH_NODE_ID_WITH_DEVICE_ID'] = 1;
SOURCES += [
'sha256.c',
]
if CONFIG['_MSC_VER']: