Commit Graph

94 Commits

Author SHA1 Message Date
John W. Bruce
6262f3721f Prefix ENABLE_MEDIADRM_64 with TARGET_
This build-time flag should be prefixed.

Bug: 37039525
Test: Built OS
Change-Id: Ie1db1f05bdaf43e4066d26a41391af0d7c729128
2017-04-27 18:50:05 -07:00
John W. Bruce
68d26ef98b Remove API Version TODO Comments
(This is a merge of http://go/wvgerrit/26221)

We have agreed on API 26 for O, so these comments can be removed without
making any further changes.

Bug: 34548395
Test: This is a comment-only change. But I verified it builds.
Change-Id: I490befba4f47902a84b60e562a7a5eb162a9f3be
2017-04-19 16:48:14 -07:00
John W. Bruce
19947dfe6f Move SPOID Enable/Disable Logic Out of WVDrmPlugin
(This is a merge of http://go/wvgerrit/25580)

While writing fixes for b/36660726, b/34716264, and b/36065223, it
became clear that having the logic that checks whether the device
supports SPOIDs embedded inside WVDrmPlugin was complicating its code
and inhibiting testing of the class. By moving this check into the code
that instantiates WVDrmPlugin, the result of the calculation can be
independently tested while the tests for WVDrmPlugin can put it in
whatever state they need for the sake of unit testing.

As a consequence of this, the check on retrieving the "deviceUniqueId"
byte array property, which was removed when SPOIDs were implemented, can
be reinstated.

Bug: 36660726
Bug: 34716264
Bug: 36065223
Test: libwvdrmdrmplugin_hidl_test & libwvdrmengine_hidl_test
Change-Id: I961d2ee42bbdc42f0c324e36d9a74ac92205a437
2017-04-18 09:56:58 -07:00
Edwin Wong
d9e7070de7 Remove dependencies from frameworks C++ containers.
Replace AString, KeyedVector, List, String8 and Vector
with stl containers. Remove corresponding frameworks
libraries.

Test: Play Movies & TV (streaming and pinning)
Test: Netflix
Test: unit tests

bug: 34677927
Change-Id: I125f45054987d69bbca59c1ffdcbe8add38c3c13
2017-04-05 22:46:04 +00:00
John W. Bruce
b99a4c736f Turn on 64-bit Executables on Supported Platforms
This commit changes the unit tests and HAL Service to run as 64-bit on
devices that have enabled 64-bit DRM Plugins.

Bug: 36076017
Test: Turned on the flag for a device and used the file command to
      verify that all binaries were built as 64-bit.
Test: Turned the flag back off and verified that all binaries were built
      as 32-bit. This should affect no current devices.
Change-Id: Ieb7218f15b9359f2038a6f60b8c994b16d2b5b53
2017-04-01 19:05:30 -07:00
John W. Bruce
bfe6046199 Build Android Unit Tests 32-bit Only
(This is a merge of http://go/wvgerrit/24738)

The change to enable 64-bit as a possible target for Widevine Android
made all the unit tests build as 64-bit on compatible platforms. Since
none of these devices support 64-bit properly yet, this is a mistake.
This patch restores unit test builds to being 32-bit only for now.

In the future, when the switch for 64-bit-supporting devices is added,
it will also switch the unit tests to 64-bit mode.

Bug: 36071236
Test: Verified unit test format with "file" command.
Change-Id: Ib4d3678181f3221b85fe6409f1d842dd15af3daa
2017-03-23 17:09:15 -07:00
Fred Gylys-Colwell
85365a1497 Fix or ignore compiler warnings
Merge from Widevine repo of http://go/wvgerrit/24688

b/35466719

Change-Id: If89f0cad0c61f37536a84f8dadaf08072356343a
2017-03-22 14:07:08 -07:00
Edwin Wong
2dc53442e7 Implement Widevine drm HIDL HAL service.
Modify Android mediadrm and mediacrypto glue layer to use
HIDL interface.

Test: Play Movies (streaming and offline playback)

Test: ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed
run gts -m GtsMediaTestCases

Test:
adb shell /system/bin/libwvdrmengine_hidl_test

Test:
adb shell /system/bin/libwvdrmmediacrypto_hidl_test

Test:
adb shell /system/bin/libwvdrmdrmplugin_hidl_test

bug: 34628973
Change-Id: Icd5f2dd556acb9874697963b4d7d62cb7c943e74
2017-03-02 13:46:11 -08:00
John W. Bruce
df0dad5311 Enable 64-bit Android Builds
(This is a merge of go/wvgerrit/23686)

This patch removes the makefile lines that previously prevented the
Widevine DRM Plugin from being built as 64-bit on Android. 64-bit
builds are now fully supported.

Only one piece of CDM code has had to change. Due to a bug in
libprotobuf before v3.0, int64 values from protobufs are technically a
different type from int64_t values in code on some 64-bit
architectures. Both have the same in-memory representation at runtime
but are seen as distinct types by the compiler. The compiler will
automatically convert in most places, but template instantiation is
not one of them, so a few places that passed a Protobuf int64 directly
into a template had to be modified.

Please note that tweaks to the mediadrmserver (not covered by this
patch) are needed in order for it to run as 64-bit and load 64-bit DRM
Plugins. Please also note that, as we have no 64-bit L1 OEMCrypto on
any devices, using the 64-bit mediadrmserver and Widevine library will
make your device fall back to L3 for the time being.

Bug: 18949752
Test: OEMCrypto unit tests
Test: Widevine unit tests
Test: Google Play (on Marlin)
Test: Widevine GTS Tests (on Marlin)
Change-Id: Ib6cdf2dd1ff75a1c473cacdc5e22397caa0a656c
2017-03-02 02:58:56 +00:00
Aaron Vaage
edb9f00df7 Widevine Metrics System
This change is the complete Widevine metrics system. It will
measure and record runtime information about what is happening
in the CDM - such as errors and throughput.

Bug: 33745339
Bug: 26027857
Change-Id: Ic9a82074f1e2b72c72d751b235f8ae361232787d
2017-01-27 16:59:17 -08:00
Dan Albert
eadd3689a2 Stop hard coding gtest paths.
These are automatically exported by libgtest.

Change-Id: Ia55222989523ecda7a4a686ef794040515f56224
Test: mma
Bug: None
2016-08-22 13:53:20 -07:00
Kyle Alexander
27c8c3f150 Add display and logging for validating HDCP levels.
This adds display and logging values to help with debugging b/28024277.

Matching Widevine cl: go/wvgerrit/17446

Bug: 28024277
Change-Id: Ib25ebf37f885b60ae4ab41851df4af4e75b5aace
2016-04-11 09:48:27 -07:00
Jeff Tinker
5dd0d2a5ce Merge "Fix StringIndexOutOfBoundsException in MediaDrmAPITest" into nyc-dev 2016-04-08 18:05:12 +00:00
Jeff Tinker
06c45414b5 Fix StringIndexOutOfBoundsException in MediaDrmAPITest
The AES test was useful to verify the framework API changes, but
the decrypt test was not correct.  Removing it for now.

Merge of go/wvgerrit/17472

bug: 27973491
Change-Id: I942fda22072636ea7ce56b992e7d3a60077c0d27
2016-04-08 16:51:22 +00:00
John "Juce" Bruce
0555a7c9de Move Widevine Unit Tests to Standard gMock
(In addition to being a merge of http://go/wvgerrit/17394, this commit
updates tests/Android.mk to no longer try to build the private gMock.)

Previously, we maintained our own version of gMock (named libwvgmock
to avoid naming conflicts) and depended on it for our unit tests. Now
that Android has gMock in the externals/ directory and vaage@ has
eliminated the need for us to customize gMock's arity, we can stop
depending on or maintaining our own copy.

Bug: 26907374
Change-Id: Ia01d6c02e2f28a642480d7ef178b9bc3dde6d306
2016-04-01 14:49:43 -07:00
Jeff Tinker
4aedea8512 Support AES-CBC sample encryption in MediaDrm
bug:23719082
Change-Id: I1842bab291d6c86a87e46abbb98827c87f7f1d53
2016-01-11 17:16:08 -08:00
Kyle Alexander
6886b1fa12 Add HDCP, HEVC and VP9 content samples to ExoPlayer
Change-Id: I8a181ce9f617df52b5dafb974c7891b24610fece
2015-11-30 10:14:37 -08:00
Rahul Frias
0fe3f79cc3 Additional merges from cdm master
* Update unit test make files to use BoringSSL

  [ Merge of http://go/wvgerrit/14173 ]

  This CL updates the android makefiles to use the libcrypto_static.

* Do Not Run Provisioning Tests On Devices Without Keyboxes

  [ Merge of http://go/wvgerrit/15633 ]

  The provisioning tests outside OEMCrypto were failing on devices that
  use baked-in certificates because only OEMCrypto knows that the cert
  is baked in and the device cannot be reprovisioned. This change
  skips those two tests if the device says it does not implement
  rewrapping the cert. (i.e. it does not implement provisioning)

  Bug: 23554998

* Add new third-party libs (protobuf & gyp)

  [ Merge of http://go/wvgerrit/14717 ]

  The CE CDM used to expect these to be installed system-wide, which
  creates challenges for integrators who must cross-compile the CDM.

  These are now used in source form from third_party.

Change-Id: I29cca2f9415fe2fafdf948273e5a0f5d7de50285
2015-10-05 14:24:40 -07:00
Kyle Alexander
bc14139fc0 am 86adf4a2: Add secure VP9 content to GTS content list.
* commit '86adf4a25ce0f1ead40c9877ff981d30f5c9cbc2':
  Add secure VP9 content to GTS content list.
2015-07-02 01:09:41 +00:00
Kyle Alexander
86adf4a25c Add secure VP9 content to GTS content list.
ExoPlayerDemo build is based on the demo-debug.apk built from:
google3/third_party/java_src/android_libs/exoplayer

Supporting cl in google3: cl/97176187

Bug: 19571315
Change-Id: I611e9e5f363ecfeb66e4813c1f6939abbf855d09
2015-07-01 10:02:49 -07:00
Tim Kilbourn
c74222f523 Rename the internal copy of gmock.
The external/gmock project does not include the patches needed for
widevine, so renaming the internal copy allows both to coexist in the
build system.

(cherry-pick of 5b830f19b6 with conflict.)

Change-Id: I77c956db30921afffe31d11e1cd2d99541925f35
2015-06-23 16:00:47 -07:00
John "Juce" Bruce
8443abc555 Re-Add MIPS to Android CDM Build
(This is a merge of http://go/wvgerrit/14795)

This change restores the ability to build the Widevine CDM for Android
for MIPS devices. It restores the precompiled binaries for MIPS and
re-adds MIPS to all makefiles.

This change includes a new build of the obfuscated binaries for
MIPS32r1 that were built using a MIPS device on the emulator.

level3/mips/libwvlevel3.a  Level3 Library Jun 19 2015 12:32:49

Bug: 19482469
Change-Id: Ifa1c299a5751f3772c42289d8333a2b8cec51f69
2015-06-19 16:34:08 -07:00
Jeff Tinker
e1ba3ee601 Fix session count properties
bug: 21787354

merge of http://go/wvgerrit/14663 from the widevine repo

Change-Id: Ia8618c9daba2526234c5c5c84590e74d6feebf95
2015-06-11 14:57:18 -07:00
Jeff Tinker
92bf971ea8 Fix possible infinite loop in test code
Also handle ResourceBusyException

merge of http://go/wvgerrit/14470 from widevine repo

bug: 21172957
Change-Id: I6815786eb7a678725cf2632f1009c7f566ba7499
2015-05-27 16:52:28 -07:00
Fred Gylys-Colwell
f75fddcdf1 Update unit test make files to use BoringSSL
Merge from widevine of go://wvgerrit/14173

This CL updates the android makefiles to use the libcrypto_static.

Change-Id: I74567ff880ebdce366766a9ab44c92cc9540b8db
2015-04-22 07:47:51 -07:00
John "Juce" Bruce
85b46b454b Widevine CDM Now Goes to Eleven
(This is a merge of http://go/wvgerrit/13980)

Adding origins to Android is going to push the number of arguments to
GenerateKeyRequest over the maximum allowed by gMock. This change
increases the maximum to 11 in order to continue supporting us.

Bug: 19771858
Change-Id: Id04609d70da194f1491573b1b4aa9c23a67b78ab
2015-04-09 12:28:39 -07:00
Dan Albert
723d67c88f Remove Widevine CDM Dependency on STLPort
* Replace an stlport static assert with a C++11 static_assert.
 * Move some libraries that were being built with the NDK but
   statically included into platform code off the NDK.
 * Rebuild the obfuscated binaries to use the new STL.
 * Remove MIPS support temporarily due to an inability to generate
   obfuscated binaries for it. (To be fixed in b/19482469.)

Bug: 15193147
Change-Id: Icc166583b0c6af68550baf17ab8c33076a1179d3
2015-02-25 15:53:36 -08:00
Narayan Kamath
fc2b694b4f Declare explicit dependency org.apache.http.legacy.
This is required because these makefiles contain a module that's
building agains the "current" SDK and will need to add an explicit
compile time dependency on the apache API.

Note that no runtime dependency is needed because the app targets
SDK version 12 (?!!).

bug: 18027885
Change-Id: I37587b91f9c52f88a8becce0449ac9b24a77fdad
2015-02-05 12:50:05 +00:00
Dan Albert
de4bc34719 Fix build.
This project is still using stlport (without telling the build system
about it), which was causing (broken) stlport headers to override
libc++ headers, leading to a broken copy of std::enable_if, which in
turn caused <atomic> to fail to compile. Since this project has
prebuilts that will need to be updated before this project can
actually move away from stlport, tell the build system that it is
still using stlport for now.

Bug: 18433002
Change-Id: I38b356428977ed2184eb28a07bd5e7424a4ace8d
2014-11-25 13:41:47 -08:00
Lajos Molnar
63aa037b03 Dequeue new input buffer once old on is queued
Bug: 17630446
Change-Id: I9ce19849f85eba4c419e0dab8ea03a0675526366
2014-09-24 14:07:11 -07:00
Edwin Wong
138160ddea Update license request url to new signed Widevine UAT proxy.
Bug: 16631113
Change-Id: I442f9c9decd03213912c8c2befcbeccc2a332c53
2014-09-13 01:32:29 +00:00
Jeff Tinker
fbe0994902 Fix widevine unit test builds on 64-bit devices
bug: 17080975
Change-Id: Ic54d484e18fe0416855264ca073474f3d597e1a3
2014-08-16 12:11:05 -07:00
Fred Gylys-Colwell
302b38e6a2 Correct ExoPlayer version
The previous merge copied the wrong version of Exoplayer.

Change-Id: If26ecc5dc6c3374b6482bd619eafa7432f92f185
2014-07-02 14:14:01 -07:00
Fred Gylys-Colwell
2c0b1d6142 Merge "Merge Changes from CDM repository" 2014-07-01 19:22:38 +00:00
Fred Gylys-Colwell
b5e8b87fed Merge Changes from CDM repository
This CL merges the following changes from the Widevine repository:

Avoid CdmSession reinitialization
https://widevine-internal-review.googlesource.com/#/c/10530/

Fix timer-related unit tests.
https://widevine-internal-review.googlesource.com/#/c/10510/

Correct return statement
bug: 15590802
https://widevine-internal-review.googlesource.com/#/c/10553/

Usage reporting fixes
bug/15388863
https://widevine-internal-review.googlesource.com/#/c/10460/

Make public methods virtual
https://widevine-internal-review.googlesource.com/#/c/10500/

Fix the SetTimer contract in the CDM.
https://widevine-internal-review.googlesource.com/#/c/10493/

Move inline CDM methods, add OVERRIDE.
https://widevine-internal-review.googlesource.com/#/c/10475/

Simplify storage APIs related cleanup.
https://widevine-internal-review.googlesource.com/#/c/10473/

Duration values are not correctly reported when queried
b/15592374
https://widevine-internal-review.googlesource.com/#/c/10437/

Propagate IsKeyValid() through ContentDecryptionModule.
https://widevine-internal-review.googlesource.com/#/c/10483/

Minor clean up in config_test_env.
https://widevine-internal-review.googlesource.com/#/c/10440/

General clean up.
https://widevine-internal-review.googlesource.com/#/c/10441/

Refactor HttpSocket and simplify UrlRequest interface.
https://widevine-internal-review.googlesource.com/#/c/10410/

Install good keybox at end of unit tests
b/15385981
https://widevine-internal-review.googlesource.com/#/c/10374/

Privacy crypto fixes
b/15475012
https://widevine-internal-review.googlesource.com/#/c/10383/

Incorporate header files to resolve build issued based on customers feedback.
https://widevine-internal-review.googlesource.com/#/c/10420/

Support unprovisioning
b/12247651
https://widevine-internal-review.googlesource.com/#/c/10356/

Correct usage of Host::Allocate and Cdm::Decrypt.
https://widevine-internal-review.googlesource.com/#/c/10378/

Fix logging bug, arguments in wrong order.
https://widevine-internal-review.googlesource.com/#/c/10380/

Rename types that look like constants.
https://widevine-internal-review.googlesource.com/#/c/10379/

Fix offline test failures
b/13909635
https://widevine-internal-review.googlesource.com/#/c/10348/

Add -DUNIT_TEST to the unit test makefile for Android
https://widevine-internal-review.googlesource.com/#/c/10375/

Refactor privacy-crypto and add dummy version.
https://widevine-internal-review.googlesource.com/#/c/10353/

Remove References to Apiary
https://widevine-internal-review.googlesource.com/#/c/9924/

Delete oldest entry in usage table when full
bug: 15184824
https://widevine-internal-review.googlesource.com/#/c/10295/

Port DeviceFiles to iOS.
https://widevine-internal-review.googlesource.com/#/c/10355/

Make testing functions in DeviceFiles private.
https://widevine-internal-review.googlesource.com/#/c/10354/

Add RSA encryption to haystack
https://widevine-internal-review.googlesource.com/#/c/10280/

Add string and vector includes to CDM header.
https://widevine-internal-review.googlesource.com/#/c/10352/

First version of oemcrypto logging
https://widevine-internal-review.googlesource.com/#/c/10252/

Update Names of Secure Stop Methods
bug: 11987015
https://widevine-internal-review.googlesource.com/#/c/10152/

Adjust timing on the Usage Table unit test
https://widevine-internal-review.googlesource.com/#/c/10307/

Fix all compiler warnings in CDM source release.
https://widevine-internal-review.googlesource.com/#/c/10293/

Fix memset bug: args in wrong order
https://widevine-internal-review.googlesource.com/#/c/10292/

Partial revert of 'Remove refs to test prov server, Level3 support...'
https://widevine-internal-review.googlesource.com/#/c/10281/

Pack structure OEMCrypto_PST_Report
https://widevine-internal-review.googlesource.com/#/c/10243/

Remove refs to test prov server, Level3 support; remove dead code
https://widevine-internal-review.googlesource.com/#/c/10220/

Partial revert of 'Document data strings; clean up license server parameters.'
https://widevine-internal-review.googlesource.com/#/c/10188/

Document data strings; clean up license server parameters.
https://widevine-internal-review.googlesource.com/#/c/10120/

Fix broken build after partner branch merge.
https://widevine-internal-review.googlesource.com/#/c/10181/

TODO Cleanup - core/src, core/include
https://widevine-internal-review.googlesource.com/#/c/9965/

TODO Cleanup - cdm, chromium, core/test.
https://widevine-internal-review.googlesource.com/#/c/9419/

Remove unneeded properties.
https://widevine-internal-review.googlesource.com/#/c/10162/

Change-Id: If2bb9d743a562a3875bebb91933c0aaadea286b2
2014-06-27 18:59:56 +00:00
Jeff Tinker
b3a031ded1 Handle ResourceBusyException from MediaDrm.openSession
Change-Id: I21dc9b194ba1195fd28071cdd213cae489b67387
related-to-bug: 13792521
2014-06-26 08:59:02 -07:00
Jeff Tinker
2bab114f59 Fix cast v2 authentication unit test
Merge of https://widevine-internal-review.googlesource.com/#/c/10309 from the widevine cdm repo.

bug: 15341137

Change-Id: I188d7d7a3861dcbec1950dfbe8dd9504a60899bf
2014-05-30 15:45:40 +00:00
Jeff Tinker
99c76b901e Build cast v2 mediadrm signer library as non-static
Change-Id: I5e4401d06480c2122a2f353e789a78933b6882c3
related-to: 13988104
2014-05-21 18:18:32 +00:00
John "Juce" Bruce
5a1bf27fd3 Upgrade Integration Test to Use Latest EME Spec
(This is a merge of
https://widevine-internal-review.googlesource.com/#/c/10140/
from the Widevine CDM repo.)

Updates the integration test from using "video/avc" to "cenc".

Bug: 13731637
Change-Id: Idfa0eabb6eb359a3d08008952bff495bea164cc7
2014-05-14 20:12:08 -07:00
Jeff Tinker
45dc595f92 am d875310a: am d3e06ad1: am eafc65e7: resolved conflicts for merge of 65a35c7d to klp-dev
* commit 'd875310a7650a8606acbfc64e4315c05376b6881':
  Update DASH demo player for OEMs
2014-04-05 00:45:59 +00:00
Jeff Tinker
d875310a76 am d3e06ad1: am eafc65e7: resolved conflicts for merge of 65a35c7d to klp-dev
* commit 'd3e06ad1e5b58b4d81c5e465d753fc6e08fc8273':
  Update DASH demo player for OEMs
2014-04-05 00:36:55 +00:00
Jeff Tinker
eafc65e794 resolved conflicts for merge of 65a35c7d to klp-dev
Change-Id: If8f3ff6b3f638038da57fde85edee982f7ef8144
2014-04-04 15:48:47 -07:00
Jeff Tinker
65a35c7df6 Update DASH demo player for OEMs
OEMs testing Widevine/DASH playback have requested
additional test content.  This updated demo apk
provides it.

bug: 12789209
Change-Id: Idba85a1569bc59e43cfcb15b762d0d5da74c91aa
2014-04-04 12:09:53 -07:00
Jeff Tinker
05a83a8faa am f9b1a2e1: Merge "Add signature|system permission to MediaDrm signer APIs" into klp-modular-dev
* commit 'f9b1a2e1f1b989acc66d4969d11690f8d3407e25':
  Add signature|system permission to MediaDrm signer APIs
2014-04-03 02:11:53 +00:00
John "Juce" Bruce
31aa8eea04 resolved conflicts for merge of 7eea20df to master
Change-Id: Ibd8b16745d36b24041856f315fbb09a6c25cf4fb
2014-04-02 18:59:05 -07:00
Jeff Tinker
f9b1a2e1f1 Merge "Add signature|system permission to MediaDrm signer APIs" into klp-modular-dev 2014-04-03 01:30:44 +00:00
Jeff Tinker
aaf4427950 Add signature|system permission to MediaDrm signer APIs
Update test to require the system permission

Merge of https://widevine-internal-review.googlesource.com/#/c/9652
from the Widevine cdm repo.

Change-Id: I071e55f09f85c420e6778ebf170f5110cf39809e
related-to-bug: 12702350
2014-04-02 23:41:12 +00:00
John "Juce" Bruce
7eea20df86 Add Support for Audio MIME Types
The EME spec technically requires CDMs to treat audio/mp4 and
video/mp4 equivalently, as well as audio/webm and video/webm. We had
only been accepting video/mp4 and video/webm up until now.

This change also centralizes handling of init data types in the shared
CDM code instead of having it spread across multiple places in the
codebase.

(This is a merge of https://widevine-internal-review.googlesource.com/9532/
from the Widevine CDM repo.)

Bug: 13564917
Change-Id: Ib8bdfb2b003ffb00e8f0559561335abb3c5778b0
2014-04-02 15:39:12 -07:00
Jeff Tinker
965cedd5ee resolved conflicts for merge of 3db90f54 to master
Change-Id: Ie9e46292e003fefce9ca44a31cb338a0ecf51930
2014-04-01 16:57:14 -07:00
Rahul Frias
ef875d25ed am 7e5c5c75: am cbcc609d: Update YT CP server URI to point to the UAT server
* commit '7e5c5c75d6f3064ce76b64fa1f389ab24dbeddaf':
  Update YT CP server URI to point to the UAT server
2014-04-01 22:15:09 +00:00