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
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
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
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
(cherry picked from commit 62a9cf3cbe)
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 CL is a merge of the widevine change
https://widevine-internal-review.googlesource.com/#/c/11881
The function rand() was not available on the mips build used to
generate the level 3 oemcrypto fallback library. This function has
been replaced by the openssl RAND_bytes(), so that compilation may
complete.
New version of library:
libwvdrmengine/level3/mips/libwvlevel3.a NONOB Level3 Library Dec 3 2014 17:11:00
bug: 17288466
Change-Id: Ibe2ae3add4f5830ddc1cce501d76aeb4be5ce926
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
Change-Id: Ic92676d09c84582de18091a91ea8742a6faf05e7
This is a merge of the Widevine change:
https://widevine-internal-review.googlesource.com/#/c/11871
The level 3 oemcrypto fall back now compiles cleanly on a Fugu, and
passes all unit tests.
New version of library:
libwvdrmengine/level3/x86/libwvlevel3.a Level3 Library Dec 3 2014 13:06:03
bug: 17289103
Change-Id: I677888536dd2ca12e27b5985737e080b69d81477
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)