Add session parameter to OEMCrypto_CopyBuffer

Merge from master branch of Widevine repo of http://go/wvgerrit/66070
Merge from oemcrypto-v15 branch of Widevine repo of http://go/wvgerrit/63662

To make the threading model more clear, CopyBuffer is now a session function.
This means we need to pass in which session the current thread locks.

Test: unit tests.
Test: tested as part of http://go/ag/5501993
Bug: 113680369
Change-Id: I2fdd2cfcaab99f3793950b3845941463675f5e4c
This commit is contained in:
Fred Gylys-Colwell
2018-11-12 14:15:00 -08:00
parent 5b20bb54ff
commit 43a47a60c0
6 changed files with 56 additions and 44 deletions

View File

@@ -523,7 +523,7 @@ extern "C" OEMCryptoResult OEMCrypto_DecryptCENC(
}
extern "C" OEMCryptoResult OEMCrypto_CopyBuffer(
const uint8_t* data_addr, size_t data_length,
OEMCrypto_SESSION session, const uint8_t* data_addr, size_t data_length,
OEMCrypto_DestBufferDesc* out_buffer, uint8_t subsample_flags) {
if (!crypto_engine) {
LOGE("OEMCrypto_CopyBuffer: OEMCrypto Not Initialized.");