Support secondary plugin API that uses AMediaFormat so plugins can be gradually
changed over to it.
Bug: 111407253
Test: CTS, manual
Change-Id: I25de3cb9463ca3b91370cecd16c80915d6407daf
Also move NdkMediaFormat internals to libmedia to avoid a future circular
dependency between libmedia and libmediandk.
Bug: 111407253
Test: build, boot, play some files
Change-Id: I54d91439f216c3834726e5505afef40dc0d93e67
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
Add a C API for DataSource/Base, and a helper so extractors
can continue using a C++ API.
Bug: 111407253
Test: build, boot, play some files
Change-Id: I1c8b2990e17d18eee53c9abf7ebef2ced0e8b7fd
Define a C extractor plugin API, along with some helpers
so extractors can still be implemented in C++ if desired.
Bug: 111407253
Test: build, boot, play some files
Change-Id: Iba947381441769d77929b4235cdb4a4cd5d4f606
Add event logging in case of audioserver watchdog to help
collect statistics.
Test: make. Simulate watchdog and check events in logcat.
Change-Id: I4716852c77d56703ad5f3dfc2500f598a2b80a12
Allows common use for latency computation.
Implementation for AudioRecordServerProxy added.
Test: audio sanity, subsequent latency tests
Bug: 80447764
Change-Id: Ib53181cdced16606bf268769a04bd52c689d89d3
Replaces main and aux buf from track dump.
Bug: 80272001
Test: adb shell dumpsys media.audio_flinger
Change-Id: I5d6565410e652ec7fc6701b171d299dea9f7bc3e
Add an api to IMediaMetadataRetriever to decode image rect.
It will reuse the same full frame IMemory, and decode only
the requested rect. For now, StagefrightMetadataRetriever
will only allow decoding of rect that's a full row of tiles,
and the requested must be issued sequentially (i.e. no
arbitrary rects). When the extract side is fixed to allow
seeking by tiles, it can be extended to allow arbitrary
rects.
This allows HeifDecoderImpl (on client side) to start
processing the getScanlines in parallel with the decoding.
Test: CTS MediaMetadataRetrieverTest;
Manual testing of HEIF decoding of files with or without tiles;
Manual testing of HEIF thumbnails generation in Downloads app.
bug: 78475896
Change-Id: I820b21cdf33f80593ee6092d8e1ba68b3beb65dd
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
Implement silencing of audio capture for idle UIDs for
MMAP streams.
Use audio HAL setMicGain() API to silence the mmap buffer for
exclusive mode and when only one client is active in shared mode.
Add new MmapStreamCallback method onStreamSilenced() for AAudio
service to selectively silence streams from silenced UIDs in
shared mode.
Bug: 72134552
Test: manual
Change-Id: I7c92ba0002bc5ba003c1a3c887edddf9ae53b538
Prior to this CL, if an AudioTrack client wrote audio data after
AudioTrack stop(), but before the track was drained by the server,
the newly written client data would be consumed in the drain.
We now limit the server read to the client write position on stop.
This interlocking is essential for rapid asynchronous AudioTrack
command processing.
Test: AudioTrack CTS, SoundPool looping, bug test case
Bug: 75788313
Change-Id: Ib70e3dc46afe047a8c6cf1fb906a618b3c66cc7f
Add a mechanism to monitor execution time of incoming binder
calls to audio flinger and audio policy and cause native audioserver
restart in case of timeout.
Bug: 69250055
Test: manual. audio smoke tests
Change-Id: I01b5bf2599fb2a4cd265cbbe8d4e34b2b059aaf4
- 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
Relocate drm and crypto headers from media
to mediadrm to have finer grained ownership
bug:73556221
Change-Id: I7d1b5944f261f9b1fdeed7605e4c0b4b4ca43e1a
Extractor plugins now use DataSourceBase, which is not refcounted.
Framework-side DataSource derives from DataSourceBase and RefBase.
Also remove MediaExtractor::release, because it is not needed
anymore due to the way the extractor/track/datasource lifecycle
is managed now.
Also add source and target pid to CallbackDataSource name, to
make the extractor dumpsys more useful.
Bug: 67908556
Test: build, boot, CTS, skia test app for heif
Change-Id: I6b9cbe903f76b0cf27ba87f4a456f424803efd08
Extractor plugins now use MediaSourceBase, which is not refcounted.
Framework-side MediaSource derives from MediaSourceBase and RefBase.
Bug: 67908556
Test: build, boot
Change-Id: Ie33ca07f0d0ba783a504d7b7bf1a75ca4acdd745
Add MicrophoneInfo class in native side and native logic for supporting
query all available microphones.
Bug: 64038649
Test: Run test and check the print log.
Change-Id: Ic0a9cce55a1265a66ba08fe81b56b56cb88ba42f
This adds AudioPresentationInfo interface to enable applications
to query and receive audio presentation
information from multiplexed data sources (e.g. MP4 or MPEG2-TS).
Bug: 63901775
Test: make
Change-Id: I3156cc8594ae153fe8cd2dedc191bfab207f5203
Signed-off-by: Previr Rangroo <prang@dolby.com>
Adds an EventMetric class, associated unit tests, and an instance of the
EventMetric to DrmHal. Also added a unit test for CounterMetric and
created a class to hold all of the future metric instances.
BUG: 64001676
Test: Added and ran unit tests. Also added a CTS test case.
Change-Id: Ic94bedd5f8293a58a939613a4ae69ce656a772be
This adds a new class CounterMetric which is used to hold metric
information. It also adds a single use case for recording and
reporting a counter metric.
BUG: 64001676
Test: Added and ran a new test for the specific CounterMetric use case.
Change-Id: I39cab8328f135e579f80b6c2fab721da5f569795
If a sessionID other than AAUDIO_SESSION_ID_NONE is requested
then legacy data path will be forced.
SessionID is implemented for MMAP data path but not used.
It is easier to implement it now then try to figure
it out later.
Bug: 33268927
Test: test_session_id.cpp will be moved to CTS when stable
Change-Id: I3ea67f57c1cbe24a512980f1352b917ab3cb6387
The destination files of these symlinks no longer exist, remove symlink so that
the generated cmake file can be loaded by clion.
Test: make
Change-Id: I00afd6950c80869cb6fb7f01ec42300332002924
Refactor the mechanism used by audio tracks to query and attach
to an output mixer/stream in audio flinger. This will:
- reduce the number of binder transactions needed to create a track
- move sample rate, framecount and flags validations to audio server
side
- move audio session allocation to audio server side
- prepare restriction of certain binder transactions to audioserver only
Test: CTS tests for AudioTrack
Change-Id: If4369aad6c080a56c0b42fbfcc97c8ade17a7439
- 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 has been deprecated for some time. Remove this from codebase
to avoid introducing new HAL for HDCP. Log warning and return NULL
when remote display is requested.
bug: 62213914
Change-Id: I3560b60fe83a01c51df0f2e715a8f2c760e57bf8
nbaio is an acronym for "non-blocking audio I/O", and nblog means
"non-blocking logger" so nblog does not belong with nbaio.
There are a lot of improvements planned for nblog, and having the
restructuring done will make it clearer as more files are added.
Test: builds OK
Change-Id: Ib28bada2566c1d64bdbe9f5d7a5ce40e080178ef
This removes the manually rolled IPlayer implementation and instead uses
an aidl generated implementation. The IPlayer aidl file is moved from
frameworks/base/.
Test: run cts --module CtsMediaTestCases
Bug: 64223827
Change-Id: Ia609f7ba1cc6f71ce919d6174dd8b5e0e1b05575
- add HEIF support in MPEG4Extractor.
- decode HEIF image or tiled image in StagefrightMetadataRetriever's
getFrameAt() api and convert to requested 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: Id4b26f1584ca6219073ffb0167f208e1c3bf8aa2
Every time merge is called by the thread loop,
the data is also processed and written to
PerformanceAnalysis. A call to dump retrieves
the FIFO of processed data in PerformanceAnalysis
instead of the unprocessed Reader FIFO, and prints
the result to the console.
Test: dumpsys media.log
Change-Id: Ic479f48e9e4fdf4523a8f15db514dbdd85b70434
Because DRM Plugins will not be allowed to call the AMI API under
Treble, the mediadrmservice will need to marshal the metrics out of the
plugin in protobuf format and report them to the AMI API instead. This
patch implements the pulling and interpreting of metrics from DRM
Plugins.
Bug: 36497276
Test: Played Google Play Movies, verified that playback still worked and
Widevine metrics appeared in a dump of the system media metrics.
Change-Id: If07717c1b87022bc1fcdedfbc62b9193899742d5
Implement correct indication of client UID and PID to audio flinger
for AAudio MMAP streams in both exclusive mode and shared mode.
- Add start/stop client methods on MMAP streams used only when the MMAP
stream is in AAudio service and carries a mix of shared streams.
- Add "In Service'" indication from "client" side to AAudioServiceStreamMMAP
so that the behavior can be adapted accordingly.
- Modify logic on audio flinger side with regard to mmap tracks and
audio HAL stream activity:
- use same audio session for all clients on a same stream to match
audio policy logic to share same direct output stream for clients on same
session. This is also more consistent with current volume and effect
handling as all MMAP clients sharing the same output stream have the
same volume and use case.
- start/stop the HAL when the stream is started/stopped with the initial client
handle (returned when the stream is opened) but do not create a track.
AAudioService implementation will always send an additional start command before
first client starts and a stop command after last client stops,
in both shared and exclusive mode.
- start/stop a track only if the start/stop stream command is received
with a handle different from the initial handle.
- Allow more than one active client from the same UID on a MMAP input in audio policy.
Bug: 62950008
Test: verify playback and capture in mmap mode
Change-Id: I86151bbb637ff172d2fd5f813056eab13a7bcd3c
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: mma -j BOARD_VNDK_VERSION=current
Test: boots device, audio plays over YouTube
Bug: 37342627
Bug: 63269228
Change-Id: Ifa9c96f6b98b456def485be6bc5046ee54c3c3ca
* 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
libstagefright_foundation_vendor is a vendor-only variant of the
libstagefright_foundation. Vendor libs and other VNDK libs should link
against this _vendor.so library. This vendor-only variant does not have
dependency to libpowermanager which is not available to vendors.
Headers are moved from the global include dir to module-local include
dir. This is because global include dir (e.g. frameworks/av/include) is
not provided when building with BOARD_VNDK_VERSION=current. Instead the
headers are exported via the module's export_include_dirs directive.
Short summary on the directory movement:
"some" libstagefright headers are moved from libstagefright/include to
libstagefright/include/media/stagefright. This is because the headers
are included as <media/stagefright/HEADER_NAME,h>.
libstagefrigut_foundation headers are moved from
libstagefright/include/foundation to
libstagefright/foundation/include/media/stagefright/foundation. Again
this is because the headers are included as
<media/stagefright/foundation/HEADER_NAME.h>.
Furthermore, in order to prevent sudden breakage, symlinks to the
module-local header directories are added to the global include
directory.
frameworks/av/include/media/stagefright ->
<libstagefright>/include/media/stagefright
frameworks/av/include/media/stagefright/foundation ->
<libstagefright_foundation>/include/media/stagefright/foundation
Bug: 37462569
Test: sailfish builds and boots
Test: BOARD_VNDK_VERSION=current m libstagefright_foundation_vendor is
successful
Change-Id: Iadfa594e885e0bd39837ccb282993d3ba5b62852
1) Limit number of VolumeShapers that can be created.
a) 16 system VolumeShapers
b) 16 application/client VolumeShapers
2) Return proper volume before VolumeShaper is started.
3) Consistent xOffset definition used internally:
a) this is now always the position on the volumeshaper curve
which can go backwards if in REVERSE.
b) normalized time is always forward going and is scaled
to 0.f and 1.f depending on progress relative to
the curve's duration.
4) Fix replace method.
5) Add comments.
Test: Use updated CTS VolumeShaperTest
Bug: 37536598
Change-Id: I837ab2a481adc0abbd3f1338bfe2cb79831b11fa
hardware/qcom/display includes frameworks/av/include headers
while compiling with -Wextra. Fix warnings that were hidden
by -isystem.
Bug: 31751828
Test: lunch bullhead-userdebug && m -j checkbuild
Change-Id: Ib1ee7165882ff3cc1d85c123815604079483f725
Move libmediandk and libcamera2ndk headers into their module
and export them from there. Also move them to the same path
relative to the export as used in the NDK, media/ for
libmediandk and camera/ for libcamera2ndk.
Test: builds
Change-Id: I0b424e0e48bfb5e2b762694a97d799de08f5dda3
Merged-In: I0b424e0e48bfb5e2b762694a97d799de08f5dda3
(cherry picked from commit 7e8d4ba588)
Move libmediandk and libcamera2ndk headers into their module
and export them from there. Also move them to the same path
relative to the export as used in the NDK, media/ for
libmediandk and camera/ for libcamera2ndk.
Test: builds
Change-Id: I0b424e0e48bfb5e2b762694a97d799de08f5dda3
(cherry picked from commit 7e8d4ba588)
Move libmediandk and libcamera2ndk headers into their module
and export them from there. Also move them to the same path
relative to the export as used in the NDK, media/ for
libmediandk and camera/ for libcamera2ndk.
Test: builds
Change-Id: I0b424e0e48bfb5e2b762694a97d799de08f5dda3
hardware/qcom/display includes frameworks/av/include headers
while compiling with -Wextra. Fix warnings that were hidden
by -isystem.
Bug: 31751828
Test: lunch bullhead-userdebug && m -j checkbuild
Change-Id: Ib1ee7165882ff3cc1d85c123815604079483f725
(cherry picked from commit 27d3c6a329)
Functions in headers that are not static inline will cause duplicate
symbol errors when linking if the header is ever included twice
into different compilation units of the same module. It also causes
-Wunused-function warnings if they are not used in the cpp file, which
were hidden by the use of -isystem frameworks/av/include.
Bug: 31751828
Test: m -j checkbuild
Change-Id: I36f258bb4f5c3df54e874280beab344e63c519d5
Merged-In: I36f258bb4f5c3df54e874280beab344e63c519d5
(cherry picked from commit 413adafb04)
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)
These warnings were hidden by -isystem.
Bug: 31751828
Test: m -j checkbuild
Change-Id: Ibb1aa07a6827fcbd29fc15291fcd90280c0f608d
Merged-In: Ibb1aa07a6827fcbd29fc15291fcd90280c0f608d
(cherry picked from commit 6f51c153ea)
A method named dump() is already exported by Binder. The warnings
were hidden by the use of -isystem to include frameworks/av/include.
Bug: 31751828
Test: m -j checkbuild
Change-Id: If460a6efc7c7b108243c3ef068c28619482f599d
Merged-In: If460a6efc7c7b108243c3ef068c28619482f599d
(cherry picked from commit f461f38e08)
One version of the CHECK_* macros are defined by
android-base/logging.h, and another by ADebug.h. Eventually
the ADebug.h ones should be replaced with the libbase ones, but
that ripples out into a long dependency chain that needs to link
against libbase. The redefined macro warnings were hidden by the
use of -isystem to include frameworks/av/include. Hack around it
for now by undefining the libbase ones if they exist.
Bug: 31751828
Bug: 37782039
Test: m -j checkbuild
Change-Id: Ifabff1c2bc6bac198804c951e98f3fee282cd018
Merged-In: Ifabff1c2bc6bac198804c951e98f3fee282cd018
(cherry picked from commit 1b1686db53)
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)