Rather than having a lib called libstagefright_foundation and one
called libstagefright_foundation_vendor, we now just have one library
and the build system keeps track of the vendor APIs that are exposed.
Test: (sanity) boot device, watch (part of) DRM protected movie.
Change-Id: I49f1c557ae8f93092bad5314e0630583cc7dc710
Merged-In: I49f1c557ae8f93092bad5314e0630583cc7dc710
If addValue does not succeed, there will be memory leak on
decodeSession. Fixed it by checking if addValue returns true first.
Plus fixed a small indentation error.
Test: mmm with static analyzer and warning disappears.
Change-Id: Ibf9b85e4c416e8fea8b80a3ba47f87f88573c54c
If binderDied is invoked after a plugin is destroyed
the pointer can already be null. Also reset the init check
state after the plugin is deleted to make sure the
checks in other methods remain valid.
bug:62667492
Test: Play Movies, ExoPlayer
Change-Id: Ie12191b744331a7a435b4c64bbd1c179918553ac
Since libdrmclearkeyplugin is in vendor partition, it is linked against
the vendor-variant of the libstagefright_foundation.
Bug: 37343126
Test: sailfish builds and boots
Test: BOARD_VNDK_CURRENT=current m libdrmclearkeyplugin is successful
Merged-In: Id8302f88978fc91282c54e0a679bcd8978898f8d
Change-Id: Id8302f88978fc91282c54e0a679bcd8978898f8d
(cherry picked from commit 24aa2adf67)
* Owners are selected from top CL approvals or owners.
They will be suggested to review/approve future CLs.
* OWNERS files are recognized by the new find-owners plugin, see .md files in
https://gerrit.googlesource.com/plugins/find-owners/+/master/src/main/resources/Documentation/
Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I7c848855a2d7a0d7f33123ea4ef5c2d03977b495
A plugin's listener reference was preventing the plugin
from being released in binderDied, which caused
drm sessions to be kept open if an app was abnormally
terminated. Setting the plugin's listener to NULL
in binderDied resolves the problem.
Test: repeat {launch netflix app, kill <app-pid>}
Prior to this change the netflix app would always fail to
run on the second iteration and the log showed
ERROR_TOO_MANY_SESSIONS. After this change, the netflix app
can be killed and restarted without failures.
Also verified with gts tests and play movies app.
bug:37720811
Change-Id: Iceb1c23e2a1d518da85641336f017bb8b2948863
Use defaultServiceManager() instead of IServiceManager::getService()
bug:62073349
test:
repeat {launch Play Movies, play a movie, exit} while monitoring
adb shell cat /sys/kernel/debug/binder/stats |
grep -A10 '^proc <mediadrmserver PID>'
--> Make sure number of nodes is stable
Change-Id: Ibea0437ed21a9d58f3eb7ffa9461fb71d9c2b4ab
See build/soong/README.md for more information.
Also moves a few headers into the same library as their
implementation, and fixes a few includes to go through the
global frameworks/av/include path instead of manually adding
frameworks/av/include/drm.
Test: m -j checkbuild
Change-Id: I0c2d2f2262e7ed78d80a0d44795705c64b797ff0
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.
Test: links
Bug: 33276472
Change-Id: Iecab9a10a6973d01c47bffd5589d71e35614f855
(cherry picked from commit cb421ce297)
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: Icfc13bb5f55fa156ef72d3cf3a327e38739d775b
Merged-In: Icfc13bb5f55fa156ef72d3cf3a327e38739d775b
(cherry picked from commit 53f2035f1d)
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: Icfc13bb5f55fa156ef72d3cf3a327e38739d775b
Merged-In: Icfc13bb5f55fa156ef72d3cf3a327e38739d775b
(cherry picked from commit 53f2035f1d)
This flag is obsolete now that the conversion
to treble is complete.
Change-Id: I7073d337939da43bddf99644bfe52db9baa2f605
Merged-In: I7073d337939da43bddf99644bfe52db9baa2f605
related-to-bug: 32815560
(cherry picked from commit 99a5aba027)
* changes:
LOCAL_CLANG := true is now the default
stagefright: move several static methods out of ACodec
stagefright: move MediaDefs from libstagefright to libmedia
Test: verify that build has no failures
Change-Id: Ib249b276c6295e55eb54fa37b6d15486415dfbed
Merged-In: Ib249b276c6295e55eb54fa37b6d15486415dfbed
(cherry picked from commit 5f5ee1110d)
A function argument which is an array with a fixed size is not
actually a fixed size array, but rather just a pointer. Thus,
when we were using sizeof() for 'key' and 'iv', we were mostly
likely only logging the first 4 or 8 bytes of the array, and
not all 16.
We change this code so we're at least passing the correct size
to the arrayToString method, and thus logging all the bytes.
This API is still fragile, as there is nothing which assures
callers to decrypt are passing in arrays which are exactly 16
bytes. However, this API is equivalent to before, so we aren't
introducing any compatibility issues.
The compiler gave a warning about this.
Test: Compiled and confirmed there's no longer this compiler warning.
Change-Id: Ie3a32eef0882ea95bccc3e22ffcab7336779bd4c
Move various things around so mediadrmserver doesn't need
libstagefright and libmedia
Test: build/boot
Change-Id: I48b713cd679b992cb6ad1262c20394a9892d7027
Merged-In: I48b713cd679b992cb6ad1262c20394a9892d7027
(cherry picked from commit 75571e4bc7)
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