Protobuf 3.9.1 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it.
Bug: 117607748
Test: m checkbuild
Exempt-From-Owner-Approval: approved at https://android-review.googlesource.com/q/Idb741c8be97df1c752083350fb8fed257903944c
Change-Id: Idb741c8be97df1c752083350fb8fed257903944c
See build/soong/README.md for more information about soong
Bug: 122331945
Test: treehugger
Test: cd frameworks/av/drm/mediacas/plugins; mma
Change-Id: I7a3ab863c4e589bd0c1954d3735602fed7cf79b4
cas@1.1 hal interface and implementation are available.
Fix a bug in default plugin for CTS test.
Test: Manual
bug: 123903559
Change-Id: Icd41736c45bb70e4f9e275bd989eca4f64ba3dac
This reverts commit a4f9d509c0.
Reason for revert: <original CL isn't related to public API which triggered this revert, so revert this revert>
Change-Id: I31fda92c2915dc04bc100cb97d36cf4bead234b7
Implement sendSessionEvent and onSessionEvent in ClearKeyCasPlugin and MockCasPlugin
Test: manual
Bug: 122472761
Change-Id: Iceb3e14f35cf3178b70e43b59fd492255ab205bc
Protobuf 3.5.2 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it.
Bug: 117607748
Test: m checkbuild
Change-Id: Ifdbc33cdafca5b82a1ffbcbfa4e292a819deb244
Change the session to shared_ptr and use atomic_load/store.
Test: POC; CTS MediaCasTest; CTS MediaDrmClearkeyTest#
testClearKeyPlaybackMpeg2ts
bug: 113027383
Change-Id: I75f4cb33a022f28d45918442d64c5c46df2640ef
(cherry picked from commit 7934a8f7ee)
Change the session to shared_ptr and use atomic_load/store.
Test: POC; CTS MediaCasTest; CTS MediaDrmClearkeyTest#
testClearKeyPlaybackMpeg2ts
bug: 113027383
Change-Id: I75f4cb33a022f28d45918442d64c5c46df2640ef
* Comment out unused parameters.
* Remove unused local constants.
* Use both unsigned/signed values for EXPECT_EQ.
Bug: 66996870
Test: normal build.
Change-Id: Ia396e5ba1f57e547ac731bd7cdb3e6ff4290b52a
MockCasPlugin.cpp: These are printing out `size_t`s, so we should be
using %zu.
ClearKeyFetcher.cpp: asset_.id() is an `unsigned long long`, so we
can't use PRIu64 for it.
Bug: None
Test: mma. Warnings are gone.
Merged-In: Ie34acb274696dea999f6309fb914b39ef00f4d77
(cherry picked from commit 843328ff13)
Change-Id: I7be4fff7d3fd603b7ab64397a6a05c28f7a34ace
Calculating index sometimes causes an unsigned integer overflow. This
throws a runtime error on integer sanitized builds.
runtime error: unsigned integer overflow: 0 - 1 cannot be represented
in type 'unsigned int'
Since this gets implicitly converted to ssize_t anyhow, make the
conversion explicit before decrementing to avoid the overflow.
Bug: 30969751
Test: Compiles.
Change-Id: Ibd39c1ba0dc64673743672ffc70c22c09f8e828a
MockCasPlugin.cpp: These are printing out `size_t`s, so we should be
using %zu.
ClearKeyFetcher.cpp: asset_.id() is an `unsigned long long`, so we
can't use PRIu64 for it.
Bug: None
Test: mma. Warnings are gone.
Change-Id: Ie34acb274696dea999f6309fb914b39ef00f4d77
When the vndk is enabled (BOARD_VNDK_VERSION=current),
vendor libraries must only link against vendor variants
in the build system. This also means that they receive
restricted sets of headers and that automatic global
headers are restricted.
Test: build ClearKeyFetcherTest with BOARD_VNDK_VERSION=current
Bug: 37342627
Change-Id: If4a6b78f515a29c0af13ca1db8c75a06d10369eb
When the vndk is enabled (BOARD_VNDK_VERSION=current),
vendor libraries must only link against vendor variants
in the build system. This also means that they receive
restricted sets of headers and that automatic global
headers are restricted.
Test: BOARD_VNDK_VERSION=current m -j k libmockcasplugin
Bug: 37342627
Change-Id: I6129ae91458216f537f6fb4065ecd9f26739851c
Instead of relying on the global include paths, use the new headers lib
'media_plugin_headers'.
Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j libclearkeycasplugin
Change-Id: Ic6b5230bc9b674e21ccd36ce6ad117c687200599
Non-treble process can no longer load .so from /vendor/lib.
Move the clear key plugin to /system/lib until MediaCas is converted
to treble.
bug: 37476803
Change-Id: I563b4576aeada5470355e7e168fa2c73997004d7
Combine the two openSession methods into one that doesn't take any
arguments. This gives the client more flexibility on creating
sessions efficiently. They can better decide whether to share one
session for multiple streams, or create one session per stream.
bug: 22804304
Change-Id: I9634f4dd4fc437229068103b54555cc28a818937
- Set crypto mode to kMode_AES_CTR, since kMode_AES_CBC is not defined
on Java API, and is rejected when the sample is queued to MediaCodec.
- Wrap the plugin object in a RefBase, and hold a strong ref to it
when executing any API calls in CasImpl. This is needed because
CasImpl could be released by Java API, while MediaCodec native is
still trying to access it.
- Fix build warnings.
Tests: cts-tradefed run cts-dev --module CtsMediaTestCases --test android.media.cts.ClearKeySystemTest
It should not fail.
bug: 22804304
Change-Id: Id4ef037d57dd741d2bb22b1de3d04c8d078b69fb
- MockCasPlugin: does nothing other than API logging
- ClearKeyCasPlugin: implement a clear key CAS that carries content
keys in the clear in ECMs. It initializes from a test asset string
with a valid id. It outputs to clear buffers.
bug: 22804304
Change-Id: Ifc70b86c1ec80a45b75c7bdd1e558a59018ace5a