History log of /frameworks/av/drm/libmediadrm/ICrypto.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6dcab2bafd847be84c2c2230bbd04af9c45c491e 28-Mar-2017 Chong Zhang <chz@google.com> DRM: more fixes for heap base mapping -- DO NOT MERGE

Heap base for the same heap could be mapped to different values
after they go across binder to CryptoHal. So we can't use heapbase
to index the heaps.

Since each ACodec instance allocates all its shared memory buffers
from the same memory dealer, we let CryptoHal assign a sequence
number to the ACodec when it calls setHeap. In subsequent calls
to CryptoHal::decrypt, reference the heap by the seq num, and ignore
the heap base address.

Bug: 36479980
Bug: 36209723
Bug: 36660223

Test: the above bugs don't repro

Change-Id: I2f519a689a5891447385d1bf9d6e668bb3b4dbe2

(cherry-picked from bf628da1e231e2e4d6bf61f9884e120bae3f9156)
d07c92742fc5801cab8e99801f591365986acbe9 28-Mar-2017 Chong Zhang <chz@google.com> Revert "Revert "Fix decoder instantiation during playback"" -- DO NOT MERGE

This reverts commit de7268d8e20b883ec88a7ff19ad560a665373484.

Bug: 36479980
Bug: 36209723
Bug: 36660223

Change-Id: I8d83305a28dc35cee16f8f1068c90fdd0b9effff
(cherry picked from commit 6aa5c0662c86c7f7b2890577a207086eeecbd177)
93e29c0846e0f7583ae96edafbf5e8a3169711ee 22-Mar-2017 Jeff Tinker <jtinker@google.com> Merge "Revert "Fix decoder instantiation during playback""
de7268d8e20b883ec88a7ff19ad560a665373484 22-Mar-2017 Jeff Tinker <jtinker@google.com> Revert "Fix decoder instantiation during playback"

This reverts commit 33327c7f0f04bcce3f8e8ee23953f87efc423037.

Bug: 36479980
Bug: 36209723

Change-Id: I8ff9422086f5ba9ba5df60135d20b9d8bfc0be52
7ec2a45e48f6c24a5e8fa96416d8793329b79d2f 17-Mar-2017 Jeff Tinker <jtinker@google.com> Merge "Fix decoder instantiation during playback"
33327c7f0f04bcce3f8e8ee23953f87efc423037 16-Mar-2017 Jeff Tinker <jtinker@google.com> Fix decoder instantiation during playback

When a decoder is created while another decoder
is in use and the two decoders share a common
crypto instance, decryption results would become
indeterminate, which could cause the decoder to
hang. This change adds a notification to the
crypto instance so it can update state when its
ownership changes.

bug: 36209723

Test: playbacktests-debug-androidTest.apk as
described in the bug.

Change-Id: I453c260eace5543dd79a3569bf6a9592394c4113
e424bc24ea6d3c49832436c9e400c6244f3b8c5d 15-Mar-2017 Jeff Tinker <jtinker@google.com> Merge "Fix mediaserver crash due to NULL errorDetailMessage"
9247e10531fa3128d5263e3ad605a0fecefcd2d0 14-Mar-2017 Edwin Wong <edwinwong@google.com> Check opaque size in CREATE_PLUGIN.

Check opaque size to be not greater than an abitrary 100K
and verify malloc succeeded.

Test: Play Movies & TV

Test: Netflix

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

Test: Forcing opaque size to exceed limit and malloc to report failure;
both resulted in Netflix reporting an error and failing to play.
This is the expected result.

bug: 30202440
Change-Id: I9fdaf208471f2781ffbd656358b1bf1ef5b28ee8
0be134af061566c7d68c0c4f868a677daf85f550 10-Mar-2017 Jeff Tinker <jtinker@google.com> Fix mediaserver crash due to NULL errorDetailMessage

bug: 33905340
Change-Id: Icad86ad066a053f4aa9ca708a3c8690a68ec1856
a53d6553fce1818bdf87833f93633c93ad1b5915 20-Jan-2017 Jeff Tinker <jtinker@google.com> Implement client code to use Drm and Crypto HALs

This change adds DrmHal & CryptoHal classes that connect to the Treble
HAL interfaces for drm. These classes mirror the existing Drm and
Crypto classes that connect to the DrmPlugin and CryptoPlugin
interfaces. Having both allows mediadrmserver to run in either mode
while the HAL is stabilized.

The shared memory interfaces between mediaserver's ACodecBufferChannel
and ICrypto had to be reworked to use the Treble HALs. Specifically,
the shared memory path for returning decrypted buffers in the
non-secure case had to become separate instead of piggy-backing on the
source shared memory buffer. A separate shared memory destination
buffer is now allocated on the buffer channel. An abstraction for a
decrypt destination buffer was also introduced to clarify ICrypto's
decrypt method.

Tests: Playback using Play Movies and ExoPlayer works on angler
with and without the treble hal enabled.

bug: 32815560
Change-Id: I5a3dc84f99902eb8cf8eabab9ad074d307744950
75571e4bc76bd2defd4309c7154120840396329d 08-Nov-2016 Marco Nelissen <marcone@google.com> Clean up mediadrm dependencies

Move various things around so mediadrmserver doesn't need
libstagefright and libmedia

Test: build/boot
Change-Id: I48b713cd679b992cb6ad1262c20394a9892d7027