Added utilities to:
* Query config for IMediaDrmService usage
* Create remote vs local IDrm/ICrypto object based on aforementioned config
Bug: 134787536
Test: MediaDrmClearkeyTest#testClearKeyPlaybackCenc
Change-Id: I72df528c0bbd8a6dbd3c4962ac91eb89696bcaf7
This is a part of cutting dependency from libmediandk to
libandroid_runtime.
By making a libandroid_runtime to be loaded lazily,
libmediandk won't load libandroid_runtime when it is used as a LL-NDK.
Bug: 124268753
Test: m -j
Change-Id: Ib040856c58d38e11a5f32cd5dd5519910573334b
Also move NdkMediaFormat internals to libmedia to avoid a future circular
dependency between libmedia and libmediandk.
Bug: 111407253
Test: build, boot, play some files
Change-Id: I54d91439f216c3834726e5505afef40dc0d93e67
Move libmediandk and libcamera2ndk headers into their module
and export them from there. Also move them to the same path
relative to the export as used in the NDK, media/ for
libmediandk and camera/ for libcamera2ndk.
Test: builds
Change-Id: I0b424e0e48bfb5e2b762694a97d799de08f5dda3
Part of media security hardening
MediaDrm was temporarily allowed to
run in either mediaserver or mediadrmserver
while all nexus devices were implementing
support for the native_handle representation
of secure buffers. Now that all nexus
devices support native_handle, the MediaDrm
stack can be removed from mediaserver.
b/22990512
Change-Id: Ie5d83bfeb4c4a824e1d0edb4c9452c782d6fd386
Part of media security hardening
This is an intermediate step toward moving
mediadrm to a new service separate from mediaserver.
This first step allows mediadrmservice to run based
on the system property media.mediadrmservice.enable
so it can be selectively enabled on devices that
support using native_handles for secure buffers.
bug: 22990512
Change-Id: I70320f0c4b7861cdba26fbc24c20bce54e5749a4
Add crypto/drm related functions, define some media errors
instead of using magic numbers in the code.
Change-Id: I5924cba0bfcdb3623073c9182a646b70f4ead5a5