AudioPlaybackRate is now defined in system/audio.h
as 'struct audio_playback_rate_t' (in global namespace).
Similar for the related enums.
To accommodate the existing code, introduce AudioPlaybackRate
as a typedef in the 'android' namespace.
Update code that was forward declaring AudioPlaybackRate
as it's not a struct anymore.
Bug: 133526565
Test: m
Change-Id: Iba20f1de1e8779cd78ac4573f2082416f2b428e2
Otherwise, build complains stagefright is placed
onto system/.
Test: build stagefright in emulator, and play
a mp4 with it.
Change-Id: Iaca6c4cbc23d141fc9ea37f2e4d83dfe8650dea5
Add the possibility for apps to indicate that their
capture use case is private and that a privileged Assistant
should not be able to capture concurrently.
This allows to override the default behavior tied to the audio
source (e.g VOICE_COMMUNICATION is private by default but
UNPROCESSED is not).
- Add AAudio API to set and get privacy sensitive mode on input stream
- Add MediaRecorder API to set and get privacy sensitive mode
- Modify AudioSource constructor to accept audio attributes instead of an
audio source to specify the use case.
- Modify audio policy concurrent capture logic to use audio attributes
flag instead of audio source to decide of a capture client has
requested privacy mode or not.
Bug: 137850106
Test: CTS AudioRecordTest and MediaRecorderTest, manual audio smoke tests
Change-Id: I250ea5da4c1da809ceac0da22ae9bee15b937001
IEEE754 single precision cannot precisely represent
INT32_MAX/UINT_MAX/RAND_MAX.
IEEE754 double precision cannot precisely represent INT64_MAX.
As such, implicit conversions from operations with floating point and
integral operands may result in a loss of precision.
Accept the imprecision with by making the existing implicit casts
explicit.
Bug: 139945549
Test: mm
Merged-in: Ic66b3d3bbac9e644e27ad8233018f24dfce3209f
Change-Id: Ic5a40abbccb1bf4d78475a6f3d1d2835df603d0a
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
IEEE754 single precision cannot precisely represent
INT32_MAX/UINT_MAX/RAND_MAX.
IEEE754 double precision cannot precisely represent INT64_MAX.
As such, implicit conversions from operations with floating point and
integral operands may result in a loss of precision.
Accept the imprecision with by making the existing implicit casts
explicit.
Bug: 139945549
Test: mm
Change-Id: Ic66b3d3bbac9e644e27ad8233018f24dfce3209f
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
AudioPlayer was only used by the commandline utilities, so move it
out of libstagefright.
Test: build, run
Change-Id: I561cccd323206de7415bd235b72711194080aaea
This is preparation for having a subclass of DataSourceFactory which
is only used in mediaserver process with OMA (forward-lock) use case.
Test: build
Bug: 142567168
Change-Id: I2a1ab3d1ae89f657a84376d9a95d4e814b545b4f
into libdatasource, which contains:
DataSourceFactory
(Clear)FileSource
(Clear)MediaHTTP
DataURISource
HTTPBase
NuCachedSource2
This is needed to break a circular dependency in an upcoming CL.
Test: build, boot
Change-Id: I34d9937235c78f18f51b18945342a0743e209577
Merged-In: I34d9937235c78f18f51b18945342a0743e209577
into libdatasource, which contains:
DataSourceFactory
(Clear)FileSource
(Clear)MediaHTTP
DataURISource
HTTPBase
NuCachedSource2
This is needed to break a circular dependency in an upcoming CL.
Test: build, boot
Change-Id: I34d9937235c78f18f51b18945342a0743e209577
This change renames the IMemory raw pointer accessors to
unsecure*() to make it apparent to coders and code reviewers
that the returned buffer may potentially be shared with
untrusted processes, who may, after the fact, attempt to
read and/or modify the contents. This may lead to hard to
find security bugs and hopefully the rename makes it harder
to forget.
The change also attempts to fix all the callsites to make
everything build correctly, but in the processes, wherever the
callsite code was not obviously secure, I added a TODO requesting
the owners to either document why it's secure or to change the
code. Apologies in advance to the owners if there are some false
positives here - I don't have enough context to reason about all
the different callsites.
Test: Completely syntactic change. Made sure code still builds.
Change-Id: I5fb99aa797c488406083178a6b05355d98710d3b
Move DataSourceBase and MediaSource to libstagefright, and
MediaBuffer, MediaBufferGroup and MetaData to libstagefright_foundation.
Test: build
Change-Id: I4f0ae01d40a32f4b773a2f74d5f2ae136e375322
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