common_time and mediadrm only has OWNERS file
for now, so no TEST_MAPPING FILE is added.
Bug: 155319496
Test: atest
Change-Id: Ie4d27837a3acdc554c4c4f259ad1ed25c1088e5b
Compute summary statistics based on the current device
rather than the entire AudioTrack or AudioRecord duration.
Test: adb shell dumpsys media.metrics
Bug: 149850236
Change-Id: Ia3a5707c43c4530f5a6ac90f52901bd2e0bd0bab
If sample duration is not available, use the average
frame duration of the sequence; if that's not available
default to 30fps.
bug: 120414514
bug: 139815242
test: test some 25fps heif sequence files, the reported
duration should be 40ms instead of the default 33ms.
Change-Id: I5ddf0a6cbfb44021dee2955badf3f2772586bb1e
Move ExtendedAudioBufferProvider.h to libaudioclient. This is
a more appropriate location because EABP extends AudioBufferProvider.
Move SingleStateQueue.h to libnbaio_mono. This is a more appropriate
location because SSQ is a non-blocking queue.
This allows to remove the dependency of libnbaio on libmedia
which is a good thing because libnbaio provides more low-level
abstractions than libmedia.
Also, replace a dependency of libnbaio on libbinder with
a dependency on libaudiohal header library.
Test: make
Change-Id: Ie48b523790cd8230695ec2e4710e50981b616289
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
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 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
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
Normally the flush is processed on ObtainBuffer.
But that is not called when the track is paused.
So it was not possible to flush and re-prime a
track that was paused.
Now we flush synchronously for inactive tracks,
and flush from prepareTracks_l for active tracks.
Bug: 19193985
Bug: 27791443
Change-Id: I39a7e4921e45041c3a51cf91fd3995b5edee6dd4
Signed-off-by: Phil Burk <philburk@google.com>
Provide server timestamps if the HAL doesn't provide it.
Provide monotonic - boottime translation.
Bug: 17472992
Bug: 26682703
Bug: 27749434
Change-Id: I6c9b213d9f9284092e34d57f52870e02c72df62a
The server was waiting for a full buffer.
But the buffer was only getting partly filled.
So the stream was not starting.
The fix involves having the server look at the adjustable threshold.
Bug: 27505889
Change-Id: I5dbf686413e670dacbbecc9e0f838744e465f44f
Signed-off-by: Phil Burk <philburk@google.com>
When audio flinger mixer removes an AudioTrack from the
active list in case of underrun, it is possible that the
client has written a full buffer just after the underrun detection and
is blocked waiting for more space to write. In this case, the client
will never detect the DISABLED flag and the track never be restarted.
Also implement missing DISABLE flag detection in server side audio tracks
(OutputTrack and PatchTrack).
bug: 27567768
Change-Id: I8d0753429d4113498258b1f61bd8ac5939a612f0
Provide server timestamps if the HAL doesn't provide it.
Provide monotonic - boottime translation.
Integrate record timestamps and playback timestamps together.
Bug: 17472992
Bug: 22871200
Bug: 26400089
Bug: 26682703
Change-Id: If1974f94232fcce7ba0bbcdf63d9e54ed51918ff
Also add getBufferCapacityInFrames().
These can be used to dynamically raise or lower latency.
Bug: 21019153
Signed-off-by: Phil Burk <philburk@google.com>
Change-Id: I02ca7f6f5cc4e089fcd81cc8a2b6ff234e0381a8
Use this struct to handle the parameters for TimestretchBufferProvider all
across the system.
Add stretch mode and fallback mode to TimestretchBuffer Provider.
Change-Id: I19099924a7003c62e48bb6ead56c785cb129fba2
Allow restoration of loop and position.
Make position and loop synchronously readable.
Bug: 17964637
Change-Id: I8cfb5036e665f55fdff5c67d27e1363ce9a8665d
StaticAudioTrackServerProxy::framesReady() previously returned
only the contiguous frames, update to return the total
available frames. This resolves short-count looping in
SoundPool for FastTracks.
Also (1) Removes the racy condition of reading two variables
and (2) Fixes buffer->mNonContig to return the correct value
and (3) Restores behavior that loop count of 1 goes back to
loopStart once during playback.
Bug: 11830751
Bug: 12070295
Bug: 17456842
Change-Id: I64906e6036bb00a1d7375b03efe6deb69d6478ca
This structure is passed between 64 and 32 bit processes via shared
memory, so ensure it's the same size, and that the members we care
about are in the same place.
Bug: 17569156
Change-Id: Id776bc825af1fbf43a6dd3407cca064f6d932902
Add support for audio device connections between different audio
hw modules.
The patch is performed by creating a bridge between the playback
thread connected to the sink device and the record thread connected
to the source device using a pair of specialized PlaybackTrack and
RecordTrack.
- Added PatchTrack and PatchRecord classes.
- Added TrackBase type to indicate more clearly the track behavior.
- A TrackBase can allocate the buffer or reuse an existing one.
- Factored some code in openOutput() and openInput() for internal use
by PatchPanel.
Bug: 14815883.
Change-Id: Ib9515fcda864610458a4bc81fa8f59096ff4d7db
This will allow (eventually) a greater dynamic range for gains.
However there are still a few remaining places in effects and mixer
that will also need to be changed in order to get the full benefit.
Also fixes a minor bug: was not checking for NaN in AudioTrack C++.
Change-Id: I63bce9e82e0a61546d8ff475fb94bcb700d99c96