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
Add an option --display-id to specify a pyhsical display id to record, bump version to 1.3. If we can not find the physical display from the id, error message will be printed out.
This CL depends on: ag/9366012
Bug: 136165419
Test: screenrecord --display-id 1 /data/local/tmp/test.mp4
Change-Id: I3b90d43024191d1e15563284836dc093862192e1
Bug: 135278534
Test: Run Perfetto with "screen recording" enabled and execute
a query for the "first_frame" slice
Exempt-From-Owner-Approval: cherry-pick
(cherry-picked from commit c840c0bfee)
Merged-In: I20abf7300e8c46b6e6dc52096db699e95c93297d
Change-Id: I20abf7300e8c46b6e6dc52096db699e95c93297d
Bug: 135278534
Test: Run Perfetto with "screen recording" enabled and execute
a query for the "first_frame" slice
MergedIn: Ifb984bfb0cdf48c61352e2923de42ce0ca06ace7
Change-Id: I20abf7300e8c46b6e6dc52096db699e95c93297d
Winscope tool requires frame presentation time relative to
android::elapsedRealtimeNano to synchronise video with SurfaceFlinger
and WindowManager traces. The metadata is stored as a separate data
track in the MPEG-4 container.
Design doc: http://go/winscope-video-sync
Test: adb shell screenrecord /sdcard/test.mp4 --time-limit 5
Bug:
Change-Id: I4536956efe8c62a0586b55bab1db6bdf368d4348
This converts mediaserver, mediametrics and screenrecord and the
libraries they depend on to Android.bp
See build/soong/README.md for more information.
Bug: 122331945
Bug: 80410283
Test: boot blueline
Test: youtube
Test: screenrecord
Change-Id: I132b8b4f7965449df68fb1544034a7241c594a63
Move DataSourceBase and MediaSource to libstagefright, and
MediaBuffer, MediaBufferGroup and MetaData to libstagefright_foundation.
Test: build
Change-Id: I4f0ae01d40a32f4b773a2f74d5f2ae136e375322