All devices should use Treble with OMX hals now.
This CL removes
1. Non-Treble implementations of OMX and OMXStore
2. MediaCodecService
3. All dependencies on sysprop system.persist.treble_omx
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice
Test: make vts -j123 && vts-tradefed run commandAndExit vts \
--skip-all-system-status-check \
--skip-preconditions -m VtsHalMediaOmxV1_0Host \
-l INFO
Bug: 67990472
Change-Id: I245ecf89d30d532f232e05e362e1cea76f5c37de
- MediaSource, DataSource and MediaExtractor are moved to
libmediaextractor so that they can be used by extractor
implementations without depending on libmedia and libstagefright.
- XXXFactory classes has been added in order not to expose CreateXXX
methods in libmediaextractor.
- avc_utils is moved to libstagefright_foundation since most of
extractor implementations are relying on that.
Test: build + post submit media CTS tests
Bug: 65851881
Change-Id: I7d5cf18dd25abc10478ac3f6e7d1828ad023e3fb
This change removes dependency on IMediaExtractor/Source binder
interfaces from MediaExtractor implementations. Wrapper classes,
RemoteXXX and CallbackXXX, have been added to convert the
implementations to binder objects or the other way around.
Test: build, boot, and play mp4 video file
Bug: 65851881
Change-Id: I351fb7bbaf8e0154295ccf258f85b8b2f2a4b8fb
- Allow setDataSource() to specify mime. In case of HEIF decoding
request from skia, we don't want to sniff any other format other
than mp4.
- Allow getFrameAtTime() to specify dst color format.
bug: 64077740
Test: cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice
Change-Id: I471f41c28a2252417c4b3331dcfd4bd00a24408a
* 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
Test: make systemimage
Change-Id: I5f83786afe3f2c65819b127b041cb74fc4c989ac
Merged-In: I5f83786afe3f2c65819b127b041cb74fc4c989ac
Signed-off-by: YOUNG HO CHA <ganadist@gmail.com>
(cherry picked from commit 2ee7aab4a3)
Fix the trivial warnings that are hidden by the use of -isystem to
include frameworks/av and caught by -Werror.
Test: m -j checkbuild
Bug: 31751828
Change-Id: I155f9f772ce0a84b364313814cb7cf528b9de4eb
Merged-In: I155f9f772ce0a84b364313814cb7cf528b9de4eb
(cherry picked from commit b8c35f9447)
Fix the trivial warnings that are hidden by the use of -isystem to
include frameworks/av and caught by -Werror.
Test: m -j checkbuild
Bug: 31751828
Change-Id: I155f9f772ce0a84b364313814cb7cf528b9de4eb
Test: verify that build has no failures
Change-Id: Ib249b276c6295e55eb54fa37b6d15486415dfbed
Merged-In: Ib249b276c6295e55eb54fa37b6d15486415dfbed
(cherry picked from commit 5f5ee1110d)
Enables CFI for libmediaplayerservice, and for the testid3 and
mediafilter executables.
Bug: 30227045
Test: ENABLE_CFI=true m -j40 builds and boots
Test: Media CTS tests pass, testid3 and mediafilter work correctly
Change-Id: If4cbca00157d5dd63c55a1379cfd83b926f56dbe
(cherry picked from commit eb3324081b)
Enables CFI for libmediaplayerservice, and for the testid3 and
mediafilter executables.
Bug: 30227045
Test: ENABLE_CFI=true m -j40 builds and boots
Test: Media CTS tests pass, testid3 and mediafilter work correctly
Change-Id: If4cbca00157d5dd63c55a1379cfd83b926f56dbe
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
Also clean up some other dependencies.
Test: Manual testing with Camera, YouTube and Play Movies apps.
Bug: 35445903
Change-Id: I28562b5fbcc7054cf45c4ec2530bbe2ab4b5645f
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
- MediaCodec stops tracking the whole buffer array from OMX.
- BufferChannel handles array management instead, if necessary.
- MediaCodec delegates secure buffer management to BufferChannel.
- Remove sf2.
Bug: 32133435
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Play an encrypted content in Play Movies
Test: Mirror the screen via Cast.
Change-Id: I1ca705687956ad972e31257853c54e29cbd7181a
These are exposed when frameworks/av/include is moved from being a
system include directory to a normal include directory.
Test: m -j checkbuild
Change-Id: Iaa8f3808d578ebedc75e863b9818cfbbec9080b2
Merged-In: Iaa8f3808d578ebedc75e863b9818cfbbec9080b2
These are exposed when frameworks/av/include is moved from being a
system include directory to a normal include directory.
Test: m -j checkbuild
Change-Id: Iaa8f3808d578ebedc75e863b9818cfbbec9080b2
- MediaCodec stops tracking the whole buffer array from OMX.
- BufferChannel handles array management instead, if necessary.
- MediaCodec delegates secure buffer management to BufferChannel.
- Remove sf2.
Bug: 32133435
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Play an encrypted content in Play Movies
Test: Mirror the screen via Cast.
Change-Id: Idc9fdee42ea0cdd3b5f15ba5c51647c3e16504a1
Make handling of boolean properties more readable and consistent by
using property_get_bool instead of parsing the result of property_get
Change-Id: I8490d0f0b41a92eab5131e0aac0ecdf704a63381
and don't register the sniffers in every process that plays media,
but only in the extractor process.
Bug: 33166870
Change-Id: Id269d1eab8be1549542adad3037729a63b5ebaef
CodecBase instances do not post reply messages back to MediaCodec
explicitly --- Callback does the job instead.
Bug: 32133435
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Play an encrypted content in Play Movies
Change-Id: I210993a3bbc306f970b8e9395a91e8697cfa832e
Currently if stop is followed by a reset from another thread,
we unblock the stop first (to avoid ANR) without waiting for
kWhatShutdownCompleted, and proceed with the reset request.
But this could cause release to return too early when the
kWhatShutdownCompleted for the stop is received. When this
happens, the reset() will unregister ACodec's handlers before
the real shutdown with deallocation is processed, causing
a codec node instance to be leaked.
To solve this problem, separate kWhatShutdownCompleted into
two messages kWhatStopCompleted and kWhatReleaseCompleted.
Release should only return upon kWhatReleaseCompleted.
Also initializing the fence fd in the metadata buffer (even
though it's not used) to avoid warning in freeBuffer.
bug: 32750454
bug: 32971559
Change-Id: If218c853955729a2a2f2e8356908115a79c442e3
This makes it so audioserver doesn't need to link against the entire libmedia,
which has dependencies on camera, ICU, OpenGL and other things that aren't
needed for audio.
Test: build/boot
Change-Id: I99ba1a3dc3b33ca9b3abd98e7519dbf228ee62af
This makes it so audioserver doesn't need to link against the entire libmedia,
which has dependencies on camera, ICU, OpenGL and other things that aren't
needed for audio.
Test: build/boot
Change-Id: I99ba1a3dc3b33ca9b3abd98e7519dbf228ee62af
- Buffers are (roughly) owned by themselves.
- As a corollary, remove output format change related events
and replace by inspecting formats associated with each buffers.
Bug: 32133435
Test: gts-tradefed run gts -m GtsExoPlayerTestCases
Test: (manual) Run Play Movies app to play a secure content.
Change-Id: I6b57da61c2d71acd0d5be4281de823ba1c95b72f
MediaCodecBuffer is meant to replace ABuffer and MediaBuffer in
communication between framework components. As the first step, replace
use of ABuffer in MediaCodec with MediaCodecBuffer, and adjust related
classes accordingly.
MediaCodec.getBuffer() and related APIs now returns MediaCodecBuffers;
thus change MediaCodec clients to use MediaCodecBuffer accordingly.
Test: manually tested for key use cases (Camera, YouTube and Play Movies)
Change-Id: Iba7ce131645e75ce5ddbf497fb793ab38b7f245b
* Add explicit keyword to conversion constructors.
* Or add NOLINT to implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1
Change-Id: I7a15ac1e37973fe2c661f577a6106b913653de40
Merged-In: I7a15ac1e37973fe2c661f577a6106b913653de40
* Add explicit keyword to conversion constructors.
* Or add NOLINT to implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1
Change-Id: I7a15ac1e37973fe2c661f577a6106b913653de40
When pressing ctrl-c immediately after starting screenrecord (after
setting the signal handler, but before gStopRequested is set to false)
the record loop would never exit.
Also delete the target file before recreating it, to avoid multiple
instances of screenrecord writing the same file.
Bug: 30247947
Change-Id: I374c125dac69e75638955680a2a5da81e3b22ffe
- parse btrt mp4 box
- write max and avg. bitrates into avcc
- fix the use of "bit-rate" vs. the correct "bitrate"
- document ESDS better
- fix some spacing
Bug: 28671284
Change-Id: I94961a095c6d162af38b7999cc946f899a1b1b09
- specify requested metadata mode from producers to OMX
- (pass requested metadata in IOMX::storeMetadataInBuffers)
- use correct logic for native handle source
- use native handle source for encoded meta buffers
Bug: 22775369
Change-Id: I58b03acd3e9a5367d5010d7f87b7af5cae23362c
Encoders and secure decoders still run in the mediaserver, while
all other codecs run in a separate codec process.
Bug: 22775369
Change-Id: Ifbcab8a8f2fe77d2567830ac88f0d982e77f7b00
OneShotDecodingSource is a lightweight replacement for OMXCodec
for decoding use. It does not support pause, secure content or
precise seeking.
'stagefright' now lists the codec profiles for all OMX codecs,
not just the regular ones.
Change-Id: I99f0f79af852a8a16607218acd9fdd83457b7f70
(cherry picked from commit bf03e42c7a)
Run extractors in a separate process. Currently all data is copied through a
binder transaction, and WVMExtractor is still run in the mediaserver process.
Change-Id: Ic5dbce87126dd321ad792f4dd540c2ff6b068d13
Now that Surface and SurfaceTextureClient are the same and Surface,
it does not add value.
Bug: 19489395
Change-Id: I016ecd1cf5cc51ce6244b6fa34ecd75f84e3db01
Change replyID-s from uint32_t to an object
Move reply handling into the loopers (to reuse a common mutex)
Bug: 19607784
Change-Id: Iaa035b846c424c5687ed17ce1079b325e86c54be
We should come back and replace AString with std::string and switch to the
"real" StringPrintf family, but this fixes the ODR violation that was
preventing us from booting.
Bug: 19265750
Change-Id: I798eb9ca5dd634e44625af5e583439ef9f0cdc35
MediaPlayerService can't open files (it needs an already opened
file descriptor), so these were just wasting space.
Change-Id: I323044a6c1814a7bff952ed71b5c7792df2abf03
mediafilter was defining LOCAL_NDK_STL_VARIANT, but never setting
LOCAL_SDK_VERSION, so it was a no-op. Since the project was still
manually setting the stlport include path, it was getting the stlport
headers with precedence over libc++, which breaks the world.
Once that is fixed, the project has never linked libRScpp, which is
required (I'm not sure how this part has ever worked).
Change-Id: Iac70c86bc150eea08329812c0d5744434318d28e
* Fix string literal concatenation to not be interpreted as UD
literals.
* Add constexpr compatibility for non-integral static members.
* Use __typeof__ instead of typeof (should become decltype once this
actually becomes C++11).
* Add an appropriate cast for atomic_uintptr_t, since moving to C++11
means moving from <stdatomic.h> to <atomic>, which has better
typechecking (hooray for not macros!).
Bug: 18466763
Change-Id: I9561dcb2526578687819ff85421ba80d8e1a9694
Fix something being declared a struct and forward-declared a class and
vice versa.
gcc doesn't care, clang complains about the mismatch.
Change-Id: I7a7a8e9040e3c86fa1d73eb112631ea140861657
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents.
Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
-R renders video output to the surface ASAP
-T renders video output to the surface using frame timestamps
Change-Id: I232f19587036edc12e86b4f1dea4d12accef3834
Removes the dependency on default constructor parameters for
GLConsumer so that a different constructor prototype can safely be
added.
Change-Id: I0da924bbd4c141edbf305598c1be8bc575654680
This works like the frames output format but without a header so that
the output can be piped directly to mplayer:
adb shell screenrecord --output-format=raw-frames - | mplayer -demuxer
rawvideo -rawvideo w=320:h=240:format=rgb24 -
Change-Id: Ib5ed508fdca3a5d63e973c5189b3677c2d92b43f
This adds the ability to dump frames as RGB data with a minimal
frame header. Only recommended for devices with small displays.
Enable with "--output-format=frames".
The "--raw" option is now selected with "--output-format=h264".
Change-Id: I18d3d4a87cd056d7acf0658985a90dc5895dbfb6
This adds an experimental (undocumented) "--raw" flag. If set, we
output an H.264 byte stream rather than a .mp4 file.
If the filename is "-", we send the output to stdout. If stdout is a
tty, we reconfigure it to avoid CRLF line termination over adb.
Change-Id: I5193f6193c9c1a59f92eefad0ed399f24afbf6de
- change internal sized types to use stdint.h
- printf & scanf formats
- size_t or unsigned int for iterators
Change-Id: Id993a70d8bf54c667c5d652b34179a2c727ed446
This adds the ability to dump frames as RGB data with a minimal
frame header. Only recommended for devices with small displays.
Enable with "--output-format=frames".
The "--raw" option is now selected with "--output-format=h264".
Bug 13140019
Change-Id: I61bee55cea97db3134a91e7ea06106783e5bf340