Recognize AV1 content in various container formats, so we can extract
and pass to the AV1 codec.
Bug: 111936705
Test: playback of AV1 videos
Change-Id: I8a5523741481586b3569006236bd1fc92869ee76
Remove diagnostics mode from CFI across the board. This should reduce
performance overhead and also allows the minimal runtime to work when
other ubsan sanitizers are enabled. CFI stack dumps should include a
CFI related function, so it should be apparent when a crash is
CFI-related.
Bug: 117417735
Test: make -j
Change-Id: Ie697f83b4894230ac90a4de447dccbc006c9c5a6
check getFormat() return before dereferencing the pointer. Also fix
stagefright test harness to check AudioPlayer::start() return value
Bug: 118620871
Test: poc
Change-Id: I5864d3a12c77141109d6cbbbe1a688ae88456202
Disambiguate ::ALooper (NDK) from android::ALooper (AV framework).
Fixes compile errors when a header causes ::ALooper to be included.
Test: Builds
Change-Id: I63c4dd8483f9bc91c4b22e05b9a86637c5f9e549
Add FALLTHROUGH_INTENDED for clang compiler.
Bug: 112564944
Test: build with global -Wimplicit-fallthrough.
Change-Id: Ifba4afb0d332fc7d8f57486d09b7b8e6b763293c
It is no longer needed in libmediaextractor, and moving it back
to libstagefright will avoid a circular dependency later.
Bug: 111407253
Test: build, boot, play some files
Change-Id: I1373a9eedee27998e7733ea23ae1a375e45cc9c3
Currently this prints out the format of each buffer being read from
the input during 'dump' operation.
Change-Id: I44e59b96bfb07181d03903dab30c1b65f5eb6fcd
When extracting bitmaps, MediaMetadataRetriever does a copy from
StagefrightMetadataRetriever's VideoFrame to IMemory. We could
just allocate IMemory directly and return that to the client.
bug: 78475896
Change-Id: Ibe07e7d2c68f031261470308476089c2fa9298ea
* Add AC4 mime type
* Add AC-4 support to TS extractor
** Extract PES private data and AC4 descriptor.
** Dequeue and parse AC-4 access unit and sync frame
** Validate AC4 elementary stream header and parse sampling rate.
* Add AC-4 support to MPEG4Extractor
** Parse AC-4 sample entry in MP4 and set AC-4 MIME
** Add AC-4 sync header to MPEG4 encapsulated AC-4 raw frame
* Add AC4 DSI Parser
** In order to populate the AudioPresentation objects we need to
extract the AC4 presentation information from the dsi that is
written to the MPEG4 file during muxing.
Change-Id: If84c24ca475cabf3e0d2bdf3e4850aeeb185a0de
Signed-off-by: Previr Rangroo <prang@dolby.com>
We switch our NULL check to before we dereference 'buffer' for
the range_length(). This allows a debug build with a bad state
to have things caught via CHECK instead of a crash.
Test: Treehugger
Change-Id: Iae3a6a9e90ec91962dc0e9bebcac075cf1d7d4c1
- Add MetaDataBase base class that MetaData derives from, but which
does not derive from RefBase.
- MediaBuffer::meta_data() now returns a MetaDataBase& rather than an
sp<MetaData>
- Rename MediaSourceBase to MediaTrack.
- MediaSource no longer derives from MediaSourceBase (or MediaTrack)
- MediaTrack::getFormat(), MediaExtractor::getTrackMetaData() and
MediaExtractor::getMetaData() all take a MetaDataBase& parameter that
they fill out, rather than returning a MetaData directly (the
corresponding methods on MediaSource and RemoteMediaExtractor continue
to return MetaData)
Bug: 67908544
Test: CTS MediaPlayerTest, DecoderTest, EncodeDecodeTest, manually record video
Change-Id: Ib531ab309061290be33d40d6100c9a8127e22083
MediaBuffer class exposes internal classes, ABuffer and IMemory, which
we don't want to expose to plugins. This change introduces
MediaBufferBase which does not expose any classes from system library.
Test: build and post-submit media cts tests
Bug: 67908556
Change-Id: Ic9ee239caf9b84b2b3740e2d533257afa25c8784
- Implement CCodec::setInputSurface().
- Introduce InputSurfaceWrapper to handle both IInputSurface and
IGraphicBufferProducer.
- Create C2OMXNode to wrap codec 2.0 component in IOMXNode, so that
it can be used in IGraphicBufferPrdoucer::configure().
Test: setprop debug.stagefright.ccodec yes
Test: screenrecord --codec-name c2.google.avc.encoder /sdcard/record.mp4
Test: screenrecord --persistent-surface --codec-name c2.google.avc.encoder /sdcard/record.mp4
Change-Id: I7ea9f150ae06996f03a78645d6e748d265b975df
- Implement createInputSurface()
- Handle RGB format in C2AllocatorGralloc
- Define picture type mask and handle it
- Process onWorkDone_nb() callbacks in a separate thread
- Add an unofficial option to take component name directly in screenrecord
- Force array mode for allocation latency; to be removed once proper
buffer pool is in place.
Test: setprop debug.stagefright.ccodec yes
Test: stagefright -S -N c2.google.avc.decoder /sdcard/a.mp4
Change-Id: Iba225350e2eb2a1e6f4d45a02628d0f7ba188df3
- Get components from C2ComponentStore
- Determine type of the stream from C2ComponentInterface
- Change Codec 2.0 prefix from "codec2." to "c2."
- Define csd info and handle it
- Change codec name override flag for stagefright command-line tool
from "-O" to "-N"
Test: setprop debug.stagefright.ccodec true
Test: stagefright -S -N c2.google.avc.decoder /data/local/tmp/a.mp4
Change-Id: Id9d60fd086ddcb751e5d8f658ef81bd629c0f4a1
- Implement CCodec and CCodecBufferChannel: video decoder only
- Modify stagefright command line tool to take component name
- Fix C2SoftAvcDec around EOS and flush
Bug: 69376489
Test: setprop debug.stagefright.ccodec true
Test: stagefright -S -O codec2.google.avc_decoder /data/local/tmp/a.mp4
Change-Id: I36d5f476099b5c055c0be0244e99bdf9dd28441e
This essentially reverts commit ba40190c5e,
which was made originally for b/69110957.
The change in addition to reverting is the reordering of calls in
main_codecservice.cpp. This CL makes the call to SetUpMinijail() come
before the call to ProcessState::self()->startThreadPool().
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: Ic62acf3ae1aa3f9249e5c3ce542fb4f95689704e
libmedia_omx_defaults includes source files and this default was
used in both libmedia.so and libmedia_omx.so. This is an issue because
libmedia_omx and libmedia are both loaded in the framework process
through dependency chains such as libstagefright ->
libstagefright_omx_utils -> libmedia_omx.
To fix the issue, libmedia_omx_defaults is removed from libmedia and
libmedia now depends on libmedia_omx. Other modules/libs that originally
depended on libmedia and need access to libmedia_omx_defaults' source
files, now depend on libmedia_omx as well.
Bug: 67871061
Test: mma -j and boot test
Change-Id: I93a10df1fed3c7cea93b580d00f33ba749d80e95
This reverts commit 85e88d9b45.
Also, this fixes the crash that would happen on devices that do not have
full Treble enabled.
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: 68340092
Bug: 67990472
Change-Id: I6d96cecb8eaa8691c4c0f15fe0c8e60d0c74b440
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