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
Loading
Please register or sign in to comment