History log of /frameworks/av/services/mediacodec/main_codecservice.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4271c82efd7c59f6e75e09fa748769bad4cfeee2 27-Apr-2017 Pawin Vongmasa <pawin@google.com> Make IOmx registration independent of IOmxStore

This CL allows IOmx to attempt registration even when IOmxStore fails to
register.

Test: Manual use of Camera

Bug: 37657124
Bug: 37726880
Change-Id: I108c507326ee55c17acc524233e70afa5cb5a4f0
/frameworks/av/services/mediacodec/main_codecservice.cpp
52257b75115135821bba562ac35c0c6325a1e100 25-Apr-2017 Pawin Vongmasa <pawin@google.com> Stub implementation for IOmxStore.

Test: Small CtsMediaTestCases

Bug: 37657124
Change-Id: I5728a12d000223231600ab3c3ab4eb044dd1847d
/frameworks/av/services/mediacodec/main_codecservice.cpp
6772cfb5ac55fca9a31ce6a91855f6e8d14e18be 12-Apr-2017 Iliyan Malchev <malchev@google.com> mediacodec: route all libbinder traffic to /dev/vndbinder

This CL provides additional sandboxing to ensure that the ban on using
/dev/binder to communicate between system and vendor is enforced (even
if SE policy might otherwise permit it.) This is done only on
full-Treble devices.

b/36604251 OMX HAL (aka mediacodec) uses Binder and even exposes a
Binder service

Test: marlin

Change-Id: I344f5eb9d8719beec02207be65caca78336afff5
Signed-off-by: Iliyan Malchev <malchev@google.com>
/frameworks/av/services/mediacodec/main_codecservice.cpp
d4e9ca49a3863beeb0027f51e2331e4c5ec2402b 30-Mar-2017 Pawin Vongmasa <pawin@google.com> Remove dependency on persist.hal.binderization.

Test: Manual use of Camera, Movies, Photos and YouTube apps.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 34274385
Change-Id: I5251fea337f33460d1f0db174cedc465822f2a47
/frameworks/av/services/mediacodec/main_codecservice.cpp
04563aafa0debc95d50951ca944abf37ef2777ce 09-Mar-2017 Pawin Vongmasa <pawin@google.com> Move hybrid interface from libbinder to libhidl/transport.

Also, merge android.hardware.media.omx@1.0-impl into libstagefright_omx.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Manual use of Camera, Photos, Play Movies and YouTube apps.
Test: Manual use of screen mirroring.

Bug: 33854657
Change-Id: Ie927bcafd86dc7e9509bb8b76bb3b51f9a423cc7
/frameworks/av/services/mediacodec/main_codecservice.cpp
79234e4a1317167b23482024bf060080af04f257 23-Feb-2017 Jeff Vander Stoep <jeffv@google.com> Combine platform and vendor seccomp policy at runtime

Previously, vendor customization to seccomp policy was combined
with the platform's policy at build time. In order to remove
frameworks dependencies on the device folder, this policy
combination is being moved to runtime.

For mediacodec and mediaextractor, platform seccomp policy specified
in the frameworks will be loaded from /system/etc/seccomp_policy.
Optional vendor customizations must reside in
/vendor/etc/seccomp_policy. If the vendor policy exists, it will be
concatenated to the end of the platform policy and loaded, otherwise
just the platform policy will be loaded.

Bug: 34723744
Test: Dragon, Marlin, Muskie build and boot.
Test: Watch videos on youtube no seccomp violations observed.
Test: For both mediacodec and mediaextractor verify
"cat proc/<pid>/status | grep Seccomp" == Seccomp: 2
Change-Id: I08b79b207785df69add31e4662e2c33fa28b4f4d
/frameworks/av/services/mediacodec/main_codecservice.cpp
568e453d72f4026c1a0e902d533f9352a7ca190c 23-Feb-2017 Steven Moreland <smoreland@google.com> Merge "Revert "OMX: don't respect binderization toggle.""
a45c300fcad38e23107b3ad8dd1d3935f5127f9c 23-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "OMX: don't respect binderization toggle."
7e0c3c3e93cdf0d1fe59b82e8bc9c7c2fa678faf 23-Feb-2017 Steven Moreland <smoreland@google.com> Revert "OMX: don't respect binderization toggle."

This reverts commit 373580e1d51d3e89c16612998a10105fea09c3c5.
/frameworks/av/services/mediacodec/main_codecservice.cpp
373580e1d51d3e89c16612998a10105fea09c3c5 23-Feb-2017 Steven Moreland <smoreland@google.com> OMX: don't respect binderization toggle.

Test: pass
Change-Id: I495c71b0a39ae8423e109219f8f5e96812fe2aa1
/frameworks/av/services/mediacodec/main_codecservice.cpp
0d3a5edf232916e81adbc46fc0f4a1753166b066 22-Feb-2017 Pawin Vongmasa <pawin@google.com> Remove the dependency on passthrough IOmx in media.codec.

Also clean up some other dependencies.

Test: Manual testing with Camera, YouTube and Play Movies apps.
Bug: 35445903
Change-Id: I28562b5fbcc7054cf45c4ec2530bbe2ab4b5645f
/frameworks/av/services/mediacodec/main_codecservice.cpp
9c47c97ecac581d66b6febafd156618247e86742 08-Feb-2017 Pawin Vongmasa <pawin@google.com> Enable full migration of OMX to Treble.

1. Toggling between Treble and non-Treble OMX will now be controlled by
two properties: "persist.hal.binderization" and
"persist.media.treble_omx". (Before this CL, this was controlled by
"debug.treble_omx".)
- If persist.media.treble_omx is not set, it will assume a default value
of -1.
- If persist.media.treble_omx is -1, persist.hal.binderization will be
used to determine whether OMX will be created as a Treble or non-Treble
service.
- If persist.media.treble_omx is 1, OMX will be created as a Treble
service.
- If persist.media.treble_omx has any other value, OMX will be created
as a non-Treble service.
- persist.media.treble_omx can be changed without rebooting, but it will
only take effect after media.codec and mediaserver processes are killed.

2. Remove all dependencies on non-Treble service. This was not done for
MediaCodec, MediaPlayerService::Client, MediaRecorderClient, stagefright
command, and omx_tests command. OMXClient and media.codec process will
now pick the right version of OMX based on properties mentioned above.
Before this CL, media.codec would always present the non-Treble version
of OMX regardless of the flag.

3. Provide workarounds for some HIDL issues.
- A sequence of nested binder and hwbinder calls require many threads to
handle. (b/35283480) The workaround is to increase the number of threads
in the thread pool of media.codec process.
- android.hidl.base@1.0::IBase::unlinkToDeath takes a strong pointer
instead of a weak pointer. (b/35233970) This causes an infinite
recursion in the destructor of ServiceDeathNotifier in
MediaPlayerService::Client and MediaRecorderClient. The workaround moves
calls to unlinkToDeath() outside of the destructor.

Test: Recorded and played videos with Camera app. Ran stagefright and
omx_tests commands.
Bug: 31399200

Change-Id: Id1940ed982838e10bf10fe8ed5b7bb912a5a2d3a
/frameworks/av/services/mediacodec/main_codecservice.cpp
80959a7c89e310b74c7e3a68d7f80ceac7a1574d 14-Feb-2017 Jorge Lucangeli Obes <jorgelo@google.com> Allow media.codec and media.extractor to specify two policy files.

Bug: Bug: 34723744
Test: Unit tests.
Test: media.codec, media.extractor start, have Seccomp.
Test: cat /proc/`pgrep .codec`/status | grep Seccomp
Seccomp: 2
Test: cat /proc/`pgrep .extractor`/status | grep Seccomp
Seccomp: 2
Change-Id: If5c3dcc934f5d76bd32859b2f7b7ecb772a56303
/frameworks/av/services/mediacodec/main_codecservice.cpp
fbfb8e8b9a7e6a2d351b28bfd8cdd3dacd10e975 14-Feb-2017 Jorge Lucangeli Obes <jorgelo@google.com> Unify media.codec and media.extractor Minijail usage.

That way we can modify this code in one place to take a list of seccomp
policy files.

This CL removes around 70 lines by unifying identical code. No change
in behavior.

Bug: 34723744
Test: media.codec, media.extractor start, have Seccomp.
Test: cat /proc/`pgrep .codec`/status | grep Seccomp
Seccomp: 2
Test: cat /proc/`pgrep .extractor`/status | grep Seccomp
Seccomp: 2
Change-Id: Ia8be7b9c3d6163804d2a45954f8d03315ae32e7a
/frameworks/av/services/mediacodec/main_codecservice.cpp
033975f9afa776fab47c027c0b3b80c438216d77 26-Dec-2016 Pawin Vongmasa <pawin@google.com> Add the Treble version of OMX to the service.

To enable the Treble version of IOmx in mediacodec process, use "setprop
debug.treble_omx 1".

Test: Compiles
Bug: 31399200
Change-Id: I0935dc7943e25067f5d8e75264cf2b088498a862
/frameworks/av/services/mediacodec/main_codecservice.cpp
c9ea2114a26470e0f3b010392132b5394d358031 17-Feb-2016 Jeff Vander Stoep <jeffv@google.com> mediacodec: add seccomp filter for arm/arm64

mediacodec always runs in 32 bit mode so the arm seccomp filter is also
used on arm64 devices.

Tests: mediaserver CTS for bullhead, volantis and shamu

Add policy to log blocked syscalls to syslog and allow debuggerd attach
on mediacodec crash.

Bug: 27066802, 27064966
Change-Id: I4bdbba25b8847afa98d89b4b4ca863829fa19754
/frameworks/av/services/mediacodec/main_codecservice.cpp
1900e77bac4276f247f80fd06d19316cac598f57 03-Feb-2016 Marco Nelissen <marcone@google.com> Run codecs in a separate process

Encoders and secure decoders still run in the mediaserver, while
all other codecs run in a separate codec process.

Bug: 22775369

Change-Id: Ifbcab8a8f2fe77d2567830ac88f0d982e77f7b00
/frameworks/av/services/mediacodec/main_codecservice.cpp
260e56c9a17737bf280d776797d6dee411c9b4da 28-Jan-2016 Marco Nelissen <marcone@google.com> Revert "Run codecs in a separate process"

This reverts commit 4f12d94fc26df1d0c7a566792711b8863fd39fe9.

Change-Id: Ic850a950119a45efd3042f40147253b37c328853
/frameworks/av/services/mediacodec/main_codecservice.cpp
4f12d94fc26df1d0c7a566792711b8863fd39fe9 16-Dec-2015 Marco Nelissen <marcone@google.com> Run codecs in a separate process

For now this only runs decoders and Google encoders in the codec process.

Bug: 22775369
Change-Id: Iadd8b6bc2873ddcfaee3e68866642ba74c6949aa
/frameworks/av/services/mediacodec/main_codecservice.cpp