This is a merge of http://go/wvgerrit/13710
The oemcrypto adapter loads a version 8, 9 or 10 library and adds
backwards compatibility for version 8 or 9.
The only function whose signature has changed from v9 to v10 is
OEMCrypto_GetHDCPCability. This CL adds backwards compatibility for
that function.
Level 3 libraries are now:
level3/arm/libwvlevel3.a Level3 Library Mar 17 2015 14:33:34
level3/x86/libwvlevel3.a Level3 Library Mar 17 2015 14:30:23
b/19785099 L1 Widevine missing/broken on master (Fugu)
b/19789909 L1 Widevine missing on master (AAY75B)
Change-Id: I9bd716f5cdffaf1bfbdfcd8ed067af3f5d0ac9ba
This is a cherry pick of http://go/wvgerrit/13665
Added a few static casts and removed some unused parameters.
Change-Id: I4f2d1c26580a188de429defc8d1d22757f4c6917
This is a merge of http://go/wvgerrit/13391 from the Widevine repository.
This CL adds the OEMCrypto version 10 API to the header, and changes
just enough code so that code still compiles. There are no unit tests
or implementation.
The level 3 libraries are just stubs so that tests will compile.
level3/arm/libwvlevel3.a Level3 Library Mar 11 2015 13:33:21
level3/x86/libwvlevel3.a Level3 Library Mar 11 2015 15:20:27
Change-Id: I41de753a2a60da29b756c3327341ece72069d8bb
Back when we were being proactive about merging LMP changes to master
in the Widevine repository, there were a few changes that got merged
in a different form than what got checked into the Android repository.
Mostly, this happened due to several large core changes that were
brought over to the master branch in multiple parts so as not to break
other teams using the Widevine repository. This patch brings the two
trees in sync.
Change-Id: I4e56a742686d73d1c6ace209684ce0e8542fd93f
Due to merges happening out-of-order, some formatting fixes that had
previously been merged from the Widevine repository were subsequently
wiped out by later merges.
Change-Id: I9f02d281d276b0f5b5f93b02a699144400db7520
This merges several small changes that were made in response to
comments that arose when LMP changes were merged into the Widevine
repository's master branch.
Change-Id: Ifec968af54dbc3288f24654ec0c6ca9b5962e1aa
Merges missing bits from the Widevine CDM repo for
https://widevine-internal-review.googlesource.com/#/c/10653
Most of this change was submitted into lmp-dev, but some tests
were ommitted. This CL completes the missing changes from the
original widevine repo commit.
It also fixes some missing test installation commands.
b/15388863
Change-Id: Id59d885780134c6c6863477f8c49fb9d8ffe509d
(This is a merge of http://go/wvgerrit/13400 from the Widevine CDM
repository.)
Replace "}; // namespace" with "} // namespace":
ag -l --ignore-dir third_party "}; //" | \
while read f; do sed -r -i 's/\}; \/\//} \/\//' $f ; done
Replace "// unnamed namespace" with "// namespace":
ag -l --ignore-dir third_party "unnamed namespace" | \
while read f; do sed -r -i 's/unnamed namespace/namespace/' $f ; done
Change-Id: I50ece9a127ce669f15cd532dfae1dd741338a075
This copies over formatting changes from the Widevine CDM repository
that resulted from running clang-format with Google style on the
shared core/ directory. It also copies over some rewordings of log
messages that were made at the same time.
Aside from the changed log messages, this should not affect behavior
or functionality.
Change-Id: I69c57c188f7a79f30fa3517afeed17365929b6b6
(This is a merge of http://go/wvgerrit/11285 from the Widevine CDM
repository.)
The key set ID is now available earlier, in order to support the CE
CDM 4.5 interface, which needs it at key request generation time, not
later at key response receipt time. It is still possible to receive
the key set ID at key response time, for Android's purposes. Either
API may now be passed a pointer to store the ID in, which may also be
left NULL if this is not needed.
Change-Id: I47e80ea4005c80282e36cfae92cb91142208f624
(This is a merge of http://go/wvgerrit/12700 from the Widevine CDM
repository.)
Adds unit tests which cover several cases, including five which are
fixed in this patch:
* Find a Widevine PSSH after a PSSH with non-zero flags.
(We have no control over another provider's abuse of the flags field,
so we should not give up if such a PSSH appears before ours.)
* Find a Widevine PSSH after a v1 PSSH.
(CENC now specifies a general v1 format. We don't have to support it
directly in the CDM, but we do have to skip it gracefully.)
* Find a Widevine PSSH after a non-PSSH box.
(This would be unusual input, but we can easily recover from it.)
* Parse a PSSH box with a size field of 0, which means "the rest of the
buffer."
(This would be unusual input, too, but is technically allowed for any
MP4 box.)
* Parse a v1 Widevine PSSH box, ignoring the new fields we don't need.
Bug: 19288007
Change-Id: I355df9e34ba4d53cc02e8501de965a0d193ee554
Android has never used the static adapters. This code is and has
always been dead in the Android codebase.
Change-Id: Ia6bb12a3fafb2c9b08349b0aca31fde45a58dada
This is a combined merge of several small changes to the core in the
Widevine CDM repository:
http://go/wvgerrit/10941
Rename privacy_crypto to allow more variants.
http://go/wvgerrit/11530
Add Missing Header to properties.h
http://go/wvgerrit/11531
More Loosely Couple CdmEngine and CdmSession
Change-Id: I5b3f738ae495ab267da1440421dd7aa6f7860194
This is a combined merge of several small test changes in the
Widevine CDM repository:
http://go/wvgerrit/11252
Chain CreateSession() Helpers in CDM Session Unit Test
http://go/wvgerrit/10931
Increase URLRequest timeouts and tolerate 502's.
http://go/wvgerrit/10695
Remove dead CHROMIUM_BUILD code in engine test.
Change-Id: I75a6c9509880a20c85e54cbd2fcbf34b101ce70e
(This is a merge of http://go/wvgerrit/10674 from the Widevine CDM
repository.)
Now that the CE CDM has CloseSession to handle closing sessions, we
can rename CancelKeyRequest on the CDM Engine & CDM Session to better
resemble its purpose and the name it is known by on Android.
Change-Id: I68d55b3be733579e5875ab33d8e94a62fe1f651d
* 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
This is a copy of the widevine CL:
https://widevine-internal-review.googlesource.com/#/c/12742/
If a session is closed at the same time as an OnTimerEvent is
processing an event, there could be a race condition between the two
threads. This CL adds a lock that prevents a session from being
removed from the list while the timer is currently processing an
event.
If CloseSession is called while the OnTimerEvent method is active, the
session will be added to a dead list, and deleted when the timer event
has finished.
This CL does not address the main problem in bug 19252886, but
one bugreport, netflix_log_3.txt, indicates there may have been
a problem with the CDM timer.
bug: 19252886
Change-Id: I17190edaeb3eef1295d4d204232cc4262cb5fa9b
Netflix reported that after pulling power while their app is active,
the app isn't able to restart. This is because the license file for
session keys isn't getting synched to disk, so the data is still in
the buffer cache when the device shuts down. Calling fflush and fsync
on the file ensures the data is persisted to disk. fclose alone
doesn't do fsync.
In testing, I also noticed that the license file was being rewritten
every second which is hard on the flash filesystem. The timer thread
was modified to avoid these frequent writes.
Merge of https://widevine-internal-review.googlesource.com/#/c/12431/
from the widevine cdm repo.
bug: 19108207
Change-Id: Ibe81e40a3c1f5d25563523da43fefdccdaa6ddcf
If a key query occurred before a license was received an UNKNOWN_ERROR was
returned. This now succeeds but returns no information (an empty container).
Also licenses that were already expired when received were not marked as such.
This did not cause violations in playback rules but caused an exception when
they were queried.
[ Merge of https://widevine-internal-review.googlesource.com/#/c/12300
from wv git repo ]
b/18843625
Change-Id: I6990765c15e519ddf203a2fd8f0a130306f090a6
Cherry pick of the widevine change
https://widevine-internal-review.googlesource.com/#/c/12082/
If the level 1 oemcrypto library loads and initializes, but has the
wrong version or does not have a valid keybox, then the level 3
fallback is used. However, in those cases, the level 1 was not
terminated properly. This caused a resource leak on some platforms.
With this CL, in OEMCrypto_Initialize, the level 1 library Terminate
is called if its Initialize was called and the level 1 library will
not be used.
bug: 18755226
Change-Id: I56e7d3349eeebd94f3fa8c4a1f4b21781cc7428b
Fix a warning in gcc-4.9:
In file included from
vendor/widevine/libwvdrmengine/cdm/core/src/max_res_engine.cpp:3:0:
vendor/widevine/libwvdrmengine/cdm/core/include/max_res_engine.h:56:9:
error: 'class wvcdm::MaxResEngine::KeyStatus' is private
class KeyStatus {
^
vendor/widevine/libwvdrmengine/cdm/core/src/max_res_engine.cpp:10:53:
error: within this context
typedef std::map<wvcdm::KeyId,
wvcdm::MaxResEngine::KeyStatus*>::const_iterator
(cherry picked from commit 944d085a79)
Change-Id: I4984bd52c52c36e59c4d09db5e4f4d581e577b07
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
(cherry picked from commit de4bc34719)