Commit Graph

717 Commits

Author SHA1 Message Date
Edwin Wong
1d535c5a11 am fe06ceec: Separate unit and end-to-end tests from the top level makefie.
* commit 'fe06ceec142511fbffed04ed4a760ddf2a68d12c':
  Separate unit and end-to-end tests from the top level makefie.
2013-03-28 16:36:00 -07:00
Edwin Wong
fe06ceec14 Separate unit and end-to-end tests from the top level makefie.
The top level makefile will build license_protocol_protos.a, which is
needed by libcdm.a. Unit and end-to-end tests are now build separately
under cdm/test.

Also, the tests use Google C++ Testing Framework, so please build the
gtest library from external/gtest and run "mm" once before building
the tests.
Or just run "mmma vendor/widevine/libwvdrmengine" (or mma in
vendor/widevine/libwvdrmengine") once.

Change-Id: Iec5a7a974e2f23651191b7325230d9ae3d6b83f2
2013-03-27 11:54:46 -07:00
Jeff Tinker
954ee5eb07 am 1a8aa0dd: Initial import of Widevine Common Encryption DRM engine
* commit '1a8aa0dd05ee6edcdb0694602c64c59d77291a25':
  Initial import of Widevine Common Encryption DRM engine
2013-03-26 10:42:23 -07:00
Jeff Tinker
1a8aa0dd05 Initial import of Widevine Common Encryption DRM engine
Builds libwvmdrmengine.so, which is loaded by the new
MediaDrm APIs to support playback of Widevine/CENC
protected content.

Change-Id: I6f57dd37083dfd96c402cb9dd137c7d74edc8f1c
2013-03-22 11:14:17 -07:00
Jeff Tinker
e2aa0025ed am 38334efb: Fix build break
* commit '38334efbe79dbca18497b757e378fb408be94ac1':
  Fix build break
2013-03-20 19:46:43 +00:00
Jeff Tinker
38334efbe7 Fix build break
Remove the clear key drm engine as it is no longer needed and
would need to be reworked to be compatible with the new MediaDrm APIs.

Change-Id: Ie33c00345876fcd75f7c9cb0c65bd12bb4152f20
2013-03-20 12:38:58 -07:00
Jean-Baptiste Queru
de914cef6b am ba14f26d: (-s ours) am 627d5384: am 52ab6791: am f2183676: am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'ba14f26d7beef38137031595024935449d4ff3b3':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 20:21:26 +00:00
Jean-Baptiste Queru
ba14f26d7b am 627d5384: am 52ab6791: am f2183676: am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '627d5384fa992809a7c218044fabec97116e68ac':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 13:13:15 -07:00
Jean-Baptiste Queru
627d5384fa am 52ab6791: am f2183676: am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '52ab6791986565a5e8102d54e491fac64d0f951c':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 13:00:47 -07:00
Jean-Baptiste Queru
52ab679198 am f2183676: am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'f2183676ce5691a310ad4d6d1476731336cf37af':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 12:56:11 -07:00
Jean-Baptiste Queru
f2183676ce am ac144954: (-s ours) am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'ac14495401e29b7d94dd6888b542167416304eb1':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 12:47:36 -07:00
Jean-Baptiste Queru
ac14495401 am bdf5e473: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'bdf5e4739128603632f5ca4804eee7ba4ecf4da9':
  [WVDRM] Fix effectively-unlimited memory usage
  Revert "Update Widevine Libraries to Version 4.5.0.10079"
  [DRM] Widevine library update 4.5.0-7809 DO NOT MERGE
2013-03-11 12:37:34 -07:00
Jean-Baptiste Queru
bdf5e47391 Reconcile with jb-mr1-release - do not merge 2013-03-11 12:28:39 -07:00
Jeff Tinker
526ff3f260 Merge "Add More Logging to Sample Player" 2013-02-09 00:00:52 +00:00
Fred Gylys-Colwell
0d5a8ccc7a Move OEMCrypto Mock files to Clear Key Library
In order to match the other implementations of CDM, we are going
to replace the android OEMCrypto mockup with the one in the cdm
repository.

This would be disruptive to the clear key library because it
relies on the current implementation of the mockup.  In order to
prevent that, I am moving the current mockup into the same directory
as the clear key library.  Then, we can put the new mockup under
the directory libwvdrmengine.

This mockup will then be deleted when the clear key library is deleted.

Change-Id: I89ee23f249dacd18241ae5ca499329e620bf5a2c
2013-01-31 09:22:22 -08:00
Fred Gylys-Colwell
b8ff509887 Add More Logging to Sample Player
Because the Widevine Sample Play is frequently used to report bugs, it is
helpful to have users' actions logged.  This change prints to the android log
whenever the user changes settings, clicks play, full screen, acquire rights,
etc.

This code does not change the build and is not delivered to customers.  It is
delivered to vendors.

Change-Id: I62c34c2f1683af881a3c326a48f039b463ca3e8e
2012-12-21 16:35:03 -08:00
Fred Gylys-Colwell
8ab3b10971 Fix UniquePtr Calls
This change corrects some problems with the unit tests and make files
for the libcleardrmengine.

Change-Id: Iafd8aae2ecae3885ad4bbfdf9257bce6f62f98dc
2012-12-21 12:42:39 -08:00
Fred Gylys-Colwell
fede3bffdd Add DecryptCTR to OEMCrypto Mock
This is a software only implementation of the OEMCrypto library for
testing the rest of the DRM code.  It currently implements the
OEMCrypto_DecrtyptCTR function using a clear key.

I've included the license request code so the rest of the group can
play with it, but I have only tested part of it.

This patch also has some makefiles and an integration testing.  You
should be able to generate the shared library libclearkeydrmengine.so with
cd vendor/widevine/libclearkeydrmengine; mm
You can create some unit test and integration test programs from the
directories:
vendor/widevine/libwvdrmengine/oemcrypto/test
vendor/widevine/libclearkeydrmengine/test
vendor/widevine/libclearkeydrmengine/inttest
vendor/widevine/libclearkeydrmengine/crypto/test

This change also addresses some comments about comments in OEMCryptoDASH.h
which were made in https://googleplex-android-review.googlesource.com/257323

Change-Id: Id6899b9f8d2f09e09be2ea493baa83a6b929073b
2012-12-21 12:41:42 -08:00
John "Juce" Bruce
04bfbb0198 Initial Clear Key DRM Engine
Adds the initial pieces of a sample DRM Engine that accepts keys in the clear
through the decrypt call instead of using the DrmClientPlugin and its key
ladder.  This is to help unblock teams writing code that consumes DRM Engines
while Widevine continues working their real DRM engine.  This is based on the
in-progress Widevine DRM Engine.

This change contains the DRM Engine glue pieces (.so entry point,
DrmPluginFactory, etc.) and a CryptoPlugin implementation.  However, said
CryptoPlugin will not work until an implementation of OEMCrypto is provided
in a future checkin and the CryptoPlugin is hooked up to it.

For ease of loading, this library also implements the old CryptoFactory
interface and entry point.

If asked to create a CryptoPlugin with no data, it will defer to the old
Widevine Crypto Plugin.

Change-Id: I0bfbec7e32439a50a2956488dd970284f0075e61
2012-12-21 12:40:06 -08:00
Fred Gylys-Colwell
d5aa1e41d3 Threading Contract and Error Messages
I added a few error codes for out-of-resource type conditions.

I added comments explain which functions may be called simultaneously.

Basically, info only functions, like getDeviceId, may be called anytime after
initialization.  Functions that have a session parameter may be called at the
same time as other functions for a different session, but not for the same session.
Functions that create or delete sessions may not be called as the same time as any
each other, or at the same time as any session functions.  The CDM is required to
honor these conventions.

If the OEM can only decrypt for one session at a time, it is the OEM's
responsibility to hold a lock.

Change-Id: If4b11afd70b5b2e67d78802ea0057fb25271ae90
2012-12-05 15:58:55 -08:00
Fred Gylys-Colwell
03d43a5d2d Merge "Separate OEMCrypto DASH from Legacy OEMCrypto" 2012-12-04 14:32:35 -08:00
Fred Gylys-Colwell
4529037bd8 Separate OEMCrypto DASH from Legacy OEMCrypto
The file OEMCrypto.h was renamed to OEMCryptoDASH.h and all
functions that are only needed for legacy support were removed.

Change-Id: I3a7a6f8cbb3ee415b4a313416a25ed78785ecdd7
2012-12-04 13:48:52 -08:00
Edwin Wong
eebba73ce1 Merge "Add ContentDecryptionModule API" 2012-12-04 12:31:39 -08:00
Fred Gylys-Colwell
d74290cc9f Update OEMCrypto.h
This change incorporates updates to the Eureka version of
OEMCrypto.h as documented here:
     https://widevine-internal-review.googlesource.com/2334

Change-Id: I52abde82cbea9b30b74e9c2292e401d5318df99d
2012-12-03 14:17:53 -08:00
Rahul Frias
9a7e424596 Add ContentDecryptionModule API
This header file documents the interface of the ContentDecryptionModule
and the CDM client.

b7615806

Change-Id: I9a036ec5539f7e5b66adb8a6a4326120624d1b30
2012-12-02 22:49:02 -08:00
Fred Gylys-Colwell
8199f94e35 Merge "Add Mock OEMCrypto Stub" 2012-11-30 14:18:02 -08:00
Fred Gylys-Colwell
684eb227d4 Add Mock OEMCrypto Stub
I added a Mock OEMCrypto implementation with stubs only.

I corrected the "extern C" location in OEMCrypto.h. (Thanks, Jerry!)

I added some Android.mk files that allows us to compile and
run a few simple unit tests.

Unit Test 1: The library compiles. (passes)
Unit Test 2: The test program links and runs. (passes)

Change-Id: Ib4c9554553de49645b5841b0bae889728cbfc8b1
2012-11-30 12:41:10 -08:00
Fred Gylys-Colwell
35585d4f8f am 4810c96e: am ec683063: am 7bd6a810: Merge "Update Widevine Libraries Version 4.5.0.10088" into jb-mr1.1-dev
* commit '4810c96e6f6ec7ce9fac4659a421ae958797c1c3':
  Update Widevine Libraries Version 4.5.0.10088
2012-11-27 18:44:10 -08:00
Fred Gylys-Colwell
4810c96e6f am ec683063: am 7bd6a810: Merge "Update Widevine Libraries Version 4.5.0.10088" into jb-mr1.1-dev
* commit 'ec68306390fa7434644130e9f9565b7cd5ca038c':
  Update Widevine Libraries Version 4.5.0.10088
2012-11-27 17:15:02 -08:00
Fred Gylys-Colwell
ec68306390 am 7bd6a810: Merge "Update Widevine Libraries Version 4.5.0.10088" into jb-mr1.1-dev
* commit '7bd6a81067afe45ff26c630c440a138da0fb73f5':
  Update Widevine Libraries Version 4.5.0.10088
2012-11-27 17:13:18 -08:00
Fred Gylys-Colwell
7bd6a81067 Merge "Update Widevine Libraries Version 4.5.0.10088" into jb-mr1.1-dev 2012-11-27 17:10:55 -08:00
Fred Gylys-Colwell
27bb877763 Add OEMCrypto.h Header
I put the OEMCrypto.h file in its final resting place.

Change-Id: Ie8ccf5501c518dda0a7ee4ea494e588ea9497afd
2012-11-27 16:40:42 -08:00
Fred Gylys-Colwell
225c70eeed Create Skeleton Directory Tree for DASH
This is the skeleton directory tree for work in the DASH
implementation.

Change-Id: I38b52d133d48df6b78f3d142b1969686c60fc76b
2012-11-27 13:04:27 -08:00
Edwin Wong
213df62b66 am fa43e4fb: (-s ours) am 7142b3d6: am d0c2e46e: am 63f5ec89: (-s ours) am 583b50d5: Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
* commit 'fa43e4fbbb8ed81ee9863f19e97c346219925407':
  Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
2012-11-16 11:37:25 -08:00
Edwin Wong
fa43e4fbbb am 7142b3d6: am d0c2e46e: am 63f5ec89: (-s ours) am 583b50d5: Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
* commit '7142b3d60c20b671ba4fef2df3184d09c886ed19':
  Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
2012-11-16 10:06:36 -08:00
Edwin Wong
7142b3d60c am d0c2e46e: am 63f5ec89: (-s ours) am 583b50d5: Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
* commit 'd0c2e46e423b2586049f39dd295b9b725277a0fb':
  Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
2012-11-16 10:04:05 -08:00
Edwin Wong
d0c2e46e42 am 63f5ec89: (-s ours) am 583b50d5: Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
* commit '63f5ec89537598b885a88b9e74d8ef2029159005':
  Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
2012-11-16 10:00:20 -08:00
Edwin Wong
63f5ec8953 am 583b50d5: Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
* commit '583b50d5d3a87c48d42b3d604ea7cadc1b0102be':
  Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
2012-11-16 09:57:46 -08:00
Edwin Wong
583b50d5d3 Widevine library Version 4.5.0.1 AES 601_AndroidOS_J_MR0; DO NOT MERGE
Initial library release for Intel Medfield x86 SOC

Change-Id: I4a8e5f98fb46e19a664602dd3d406df774103956
related-to-bug: 6842444
2012-11-15 14:51:13 -08:00
Fred Gylys-Colwell
9477a252d3 Update Widevine Libraries Version 4.5.0.10088
This change updates the Widevine binary libraries.
It includes the change:
Turn on IPv6 Compatibility.
https://widevine-internal-review.googlesource.com/2242
bug: 7471810

Change-Id: I09beacb7853435f21c263e226a3dcaff74afbd2b
2012-11-09 12:50:44 -08:00
The Android Automerger
536517cfa7 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-10-23 23:36:27 -07:00
Jeff Tinker
5971f35ca3 am da9633d4: am 7fc32e3d: am aac68688: Update Widevine Libraries Version 4.5.0.10087
* commit 'da9633d448fae2577f8eade14ed83b8895fc9a42':
  Update Widevine Libraries Version 4.5.0.10087
2012-10-23 21:46:40 -07:00
Jeff Tinker
da9633d448 am 7fc32e3d: am aac68688: Update Widevine Libraries Version 4.5.0.10087
* commit '7fc32e3dabccc96f19e007805262a5bf6e5d85aa':
  Update Widevine Libraries Version 4.5.0.10087
2012-10-23 21:44:17 -07:00
Jeff Tinker
7fc32e3dab am aac68688: Update Widevine Libraries Version 4.5.0.10087
* commit 'aac68688307d476cc7c607766a8afa644bd95905':
  Update Widevine Libraries Version 4.5.0.10087
2012-10-23 21:41:03 -07:00
Jeff Tinker
aac6868830 Update Widevine Libraries Version 4.5.0.10087
This change updates the Widevine binary libraries.

It includes the change:
Correct error returned by ProcessDrmInfo
https://widevine-internal-review.googlesource.com/#/c/1870/

bug:7320744
Change-Id: Ic73a5dfa70140093224e9ce651947b224bdeccb9
2012-10-23 12:33:51 -07:00
John "Juce" Bruce
e8cad9485c Cannot Rewind WVM in MediaCodec Mode
The solution previously checked in as 2e0e3 is re-introduced here. However,
the MediaCodec-compatible heuristic is not used unless WVM is in Crypto Plugin
(i.e. Media Codec) mode.

To repeat from last time: The problem here is that WVM cannot independently
seek the audio and video read heads, but the API assumes it can. WVM does the
right thing for AwesomePlayer-based playback (essentially ignoring audio
seeks) but the wrong thing for MediaCodec-based playback. For MediaCodec
mode, we should respect the first seek we get for a given destination and
ignore the second.

In this part, the new heuristic is reintroduced, but the old heuristic is
maintained for use in non-Crypto Plugin mode.

Bug: 6793514
Change-Id: I7ced2bf20af117a57eec27490b0920d906a8a684
2012-10-15 14:22:37 -07:00
Fred Gylys-Colwell
2316ae8825 am 991ad721: (-s ours) am 8584706e: am 607d9110: am f4ca146c: (-s ours) am 87fa1829: Revert "Widevine Libraries to Version 4.5.0.10059 AES 601_AndroidOS_J_MR0 (DO NOT MERGE)"
* commit '991ad721205b70ed4eef6cd081152f151189700a':
  Revert "Widevine Libraries to Version 4.5.0.10059 AES 601_AndroidOS_J_MR0 (DO NOT MERGE)"
2012-10-05 14:00:36 -07:00
Fred Gylys-Colwell
991ad72120 am 8584706e: am 607d9110: am f4ca146c: (-s ours) am 87fa1829: Revert "Widevine Libraries to Version 4.5.0.10059 AES 601_AndroidOS_J_MR0 (DO NOT MERGE)"
* commit '8584706e032233a228ab7740ccc1eb70a8082a72':
  Revert "Widevine Libraries to Version 4.5.0.10059 AES 601_AndroidOS_J_MR0 (DO NOT MERGE)"
2012-10-05 13:58:56 -07:00
Fred Gylys-Colwell
8584706e03 am 607d9110: am f4ca146c: (-s ours) am 87fa1829: Revert "Widevine Libraries to Version 4.5.0.10059 AES 601_AndroidOS_J_MR0 (DO NOT MERGE)"
* commit '607d91108f38b9603a3a93200c21354d3315687b':
  Revert "Widevine Libraries to Version 4.5.0.10059 AES 601_AndroidOS_J_MR0 (DO NOT MERGE)"
2012-10-05 13:57:07 -07:00
Fred Gylys-Colwell
607d91108f am f4ca146c: (-s ours) am 87fa1829: Revert "Widevine Libraries to Version 4.5.0.10059 AES 601_AndroidOS_J_MR0 (DO NOT MERGE)"
* commit 'f4ca146ca9d0c388b83c083ad6dd1c8fef81231f':
  Revert "Widevine Libraries to Version 4.5.0.10059 AES 601_AndroidOS_J_MR0 (DO NOT MERGE)"
2012-10-05 13:54:55 -07:00