CodecID for MKV MP3 audio is not only A_MPEG/L3, but also
AMS_ACM. When CodecID is AMS_ACM, we should check format ID and
the file is MP3 if format ID is 0x0055. Need to support this
MP3 type.
Bug: 123594233
Test: Test MKV file whose audio CodecID is AMS_ACM and format
ID is 0x0055, and check if the MP3 audio can be played.
Change-Id: I15129e276b19338dc4f3f09eee6020aca5a5fa8e
Esqueue may receive incorrect MPEG audio frames with wrong layer or
wrong framesize after seek. MP3 decoder will fail to decode and play
abnormally.
The solution is to skip the frames with wrong layer and wrong
framesize.
Bug: 124268510
Test: play .ts file, seek several times during playback
Change-Id: I7fbe7c68871d4257c95235d172a4f11b405bf6d5
When playing audio-haptic channels, there could be request to mute
haptic channels according to settings. To support that, do not select
haptic output when forcing muting haptic channels.
Test: Play audio-haptic coupled data
Bug: 126401770
Change-Id: Ifb52385c56ec8d67fe031e1877ea35cbe2319600
This is a part of cutting dependency from libmediandk to
libandroid_runtime.
By making a libandroid_runtime to be loaded lazily,
libmediandk won't load libandroid_runtime when it is used as a LL-NDK.
Bug: 124268753
Test: m -j
Change-Id: Ib040856c58d38e11a5f32cd5dd5519910573334b
This is a part of job to cut dependency from libmediandk
to libandroid_runtime. As a LL-NDK, libmediandk desn't have
to depend on libandroid_runtime.
depependcy:
* libmediandk -> libmedia_jni -> libandroid_runtime.
Libmediandk calls three functions defined in libmedia_jni.
However those three functions are independent from libandroid_runtime.
After extracting those utility functions into a new library
(libmedia_jni_utils), libmediandk now depends on it instead of
libmedia_jni.
Bug: 124268753
Test: m -j
Change-Id: If283fefca5cf4e282d1c29876b78037bc9df7625
Merged-In: If283fefca5cf4e282d1c29876b78037bc9df7625
This is a part of job to cut dependency from libmediandk
to libandroid_runtime. As a LL-NDK, libmediandk desn't have
to depend on libandroid_runtime.
depependcy:
* libmediandk -> libandroid -> libandroid_runtime.
Libmediandk uses only one symbol(ANativeWindow_aquire) from
libandroid and it is re-exported from libnativewindow.
So by switching from libandroid to libnativewindow, the dependency
from libmediandk to libandroid is cut easily.
Bug: 124268753
Test: m -j
Change-Id: I5da320780dba7c63ce39679dbf5d40fe9202eb00
Merged-In: I5da320780dba7c63ce39679dbf5d40fe9202eb00
This was not efficient and leaded to an assert in obtainBuffer.
I'm not sure which condition can lead to a getNextBuffer of size 0,
but it has been observed and is not forbidden by getNextBuffer
documentation.
Test: atest android.media.cts.AudioPlaybackCaptureTest#testCaptureMediaUsage
Bug: 111453086
Change-Id: I5accf7c1d488ff4686272588329bab71d64f67cd
Signed-off-by: Kevin Rocard <krocard@google.com>
Query the package manager to check if the app has not opt-out of its
playback being captured.
Test: adb shell audiorecorder --target /data/file1.raw &
adb shell am start -a android.intent.action.VIEW -d file:///system/media/audio/ringtones/Lollipop.ogg -t audio/ogg
adb dumpsys media.audio_policy # check playback is not recorded
# change media player manifest to allowPlaybackCapture=true
adb dumpsys media.audio_policy # check playback is recorded
kill %1
adb pull /data/file1.raw && sox -r 48000 -e signed -b 16 -c 2 file1.raw file.wav&& audacity file.wav
# check silence then sound
Bug: 111453086
Change-Id: Id6fb7d0e10c02b0473bcbc0786e8360536996f48
Signed-off-by: Kevin Rocard <krocard@google.com>
Change to new properties + swap audio XML files, and supports following
scenarios:
1) (default) audio_policy_configuration.xml
Using BluetoothAudio HAL (+ A2DP offload if supported)
2) audio_policy_configuration_a2dp_offload_disabled.xml
Using BluetoothAudio HAL only when A2DP offload is supported but
disabled.
3) audio_policy_configuration_bluetooth_legacy_hal.xml
No BluetoothAudio HAL nor A2DP offload
Bug: 126304229
Test: Switch BluetoothAudio HAL and A2DP offload manully
(cherry picked from commit baa9e4e167)
Change-Id: I3c17b304a12c1eccd9f97ee50a0b7cf6e4b9a1da
Set bufferSize in @3.4::Stream::bufferSize for JPEG_APP_SEGMENTS stream.
Bug: 124999074
Test: Build
Change-Id: I6f24f4273b0d3d18b1bdbf263fc12ed48e857004
make parameters to GetSizeWidth() reflect values being used in
corresponding EncodeSize() invocations so we won't overflow the buffer.
Bug: 123701862
Test: y
Change-Id: I78596176e6042c95582494a8ae1b9c3160bf5955
Track1's execution of setting track1's mStartTimestampUs and setting MPEG4Writer's
mStartTimestampsUs may be interrupted by track2. If track2 was just running
exceedsFileDurationLimit() where all tracks would check if the track mStartTimestampUs was greater
than MPEG4Writer's mStartTimestampsUs, track1 would detect that its mStartTimestampUs is less than
MPEG4Writer's mStartTimestampUs which was set by track2 and that causes fatal error.
Current fix is to update MPEG4Writer's mStartTimeStampUs before updating track's
mStartTimeStampsUs so that we avoid getting into the scenario described above.
Bug: 123263577
Test: cts-tradefed run cts-dev -m CtsMediaTestCases --compatibility:module-arg
CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice
Change-Id: I3be78c92f756250f86fc8bd0c9ff84d95fe4d9e8