Current make files builds only shared libraries for extractors
Enable building static libraries for MediaTesting
Test: builds
Bug: 144965408
Change-Id: I4f05cfed60ac19b21aaeab396895b7b94eedee12
This is obviously a typo.
Found by Clang tautological-constant-out-of-range-compare warning.
Test: presubmit
Bug: 72331526
Change-Id: I2cb217282c524bb9fbae899fa5a731b7575e393a
Shared libcrypto provides FIPS self tests, use it whenever possible.
Bug: 141248879
Test: m checkbuild
Change-Id: I811db67a35b321505e50476313384fe51d8154d2
When a mov file includes alac audio, the alac codec
info is included under bellow box:
stsd->alac->wave->alac
The .mov cannot work with the original code for alac.
So we need to handle it by judging if it is a mov file.
Bug: 134102659
Test: Play a mov video with alac audio and check if it
can play normally.
Change-Id: Ibadfbd5b4036b220bd6ebf431fd53e4d1a69be8b
Some mkv file's AAC codecprivate is incomplete, so
CHECK(codecPrivateSize >= 2) fails and it results in a
native exception. Our solution is to make it skip the
track.
Bug: 132738230
Test: Test a mkv file whose AAC codecprivate is short and
check if native exception occurs.
Change-Id: Ia8cdd863df1bd1e7570cc3b509d1d76d52d76be6
Ensure the WAV extractor never outputs a partial sample, which
would trigger a CHECK in NuPlayerRenderer:onDrainAudioQueue().
Also ensure it never emits a partial frame (e.g. only a left
sample for a stereo file).
Bug: 133824968
Test: play the corrupted file and there is no NE
Change-Id: I9143f859c55351e06126e4ad8f33f5752113d7f4
(cherry picked from commit 8fb6b7e1ff)
mp4 Opus Specific box says Version should be 0.
OpusHead requires this to 1.
MPEG4Extractor now validates that version before
overwriting it with 1.
Bug: 133448278
Test: Extract an mp4 file with opus track
Test: Mux the extracted file to ogg
Test: Extract opus from the muxed ogg file
Change-Id: Iee31eed69ea906b8f34f75f01a4d2c77b3e32077
Also set CSD from codecPrivate data in mkv extractor
Test: stagefright /sdcard/av1.mp4
Test: Manually verified profile present in format string returned by extractor
Bug: 132439629
Change-Id: I1683539c3a37c88edd0edcb9f3e073c5ea077372
When we play the mp4 file whose pcm audio's sample size of stsz box
is not correct, it will stuck. The root cause is it may take wrong
buffer to pcm decoder, and AudioTrack might not be able to play the
decoded pcm data and cannot get right timestamp, so video will stuck
by audio.
Bug: 132042434
Test: test with the mp4 file whose pcm audio sampleSize is abnormal
and check if the video can be played normally.
Change-Id: I06c69e43922512f43d996fafcbe8b9c23ce3e7dd
MPEG4Extractor was signally wrong CSD size for csd-0 in case of opus
Instead of signally actual CSD size, size of the array used to hold
the header was being sent.
Bug: 132692852
Test: Manually verified using AMediaExtractor based test application
Change-Id: I88f247a24ab09d0a39b32934659705d7bc9d3f7d
Instead of hard coding codecDelay, read it from opus header.
Also allow for variable sized opusheader to support multiple channels
Bug:129712302
Test: atest android.media.cts.DecoderTest
Change-Id: I5e134f688125d275163dfa496acd8133354b5617
This reverts commit 784bfac0b0.
Reason for revert: decided to use device which matches to the test suite.
Bug: 131869673, Bug: 125914810
Change-Id: I5738a5303f3368f63fcd51074ee9b2db7344d518
m2ts is based on the MPEG-2 transport stream container.
The standard MPEG2-2 TS 188-byte packet is prefixed with a
4-byte extra header to a total size of 192 bytes.
This patch makes MPEG2TSextractor support both
MPEG-2 transport stream and m2ts.
mts file use the same container as ts file
Bug: 123261411
Test: play m2ts file and check if it's normal
Change-Id: I7798a6bf3fcddf064d6bb6e39cd303bf83c3489e
(cherry picked from commit c1a4646708)
The test APEX is built with aosp_x86_64 where first ABI is 64-bit.
But the test APEX can be installed to 32-bit target like cf_x86_phone.
The lack of 32-bit extractor libraries in the 32-bit target can cause
problem. So, install both ABIs of the extractor libraries to the test
APEX.
Bug: 125914810
Test: choosecombo to aosp_x86_64 and build test_com.android.media
Check that the test APEX has both lib and lib64 directories.
Change-Id: Ib073f61838fea0b823c870c8c71b49a7ecc9346e
mkv support audio codec as bellow:
codecID: A_MPEG/L2 (mp2 audio)
codecID: A_PCM/INT/LIT and A_PCM/INT/BIG (pcm audio)
codecID: A_MS/ACM
We can check the supported type in MKVWave2MIME function,
including mp2, mp3, pcm, adpcm.wma
Bug: 128470241
Test: play the files with new supported codecs and check
if they can be played normally.
Change-Id: Id92303b42ef763d1ce08a3c96265eda69622c79d
(cherry picked from commit 7f20f58a4b)
Detect when media contains too much tx3g data, defined as max atom size
even if spread across multiple tx3g atoms. Also validate that any tx3g
atom has non-zero size.
When assembling the possibly many atoms, use a more efficient append/grow in a
local buffer and only attach it to the track meta data when the track is
complete; saves a possible O(n*n) copy/re-copy/re-copy behavior.
Bug: 124330204
Test: poc
Change-Id: I55ab88a4b650e508c0d49f9bd07284d9ddcf6361
Media files with zero STTS delta in video track exists, probably malformed files. If the same
video track has edit shift entry to shift(prepone) video frames, then CTS could get negative.
Since negative CTS values are not meaningful, this CL fixes that by only subtracting the lower
of CTS and edit shift value from CTS.
Bug: 117402420
Test: cts-tradefed run cts-dev -m CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:
include-annotation:android.platform.test.annotations.RequiresDevice
Change-Id: I49657457f90e9bbee5fc8bf45235eeb7b0873ab6
Check for unreasonable sampleCounts, unreasonable sampleDurations,
especially when mapped as same duration for all samples.
Bug: 124389881
Test: poc
Change-Id: Ic1afecc42c1ec5c63b8dee1743ee0e473e82ba8b
parseHEVCLayerId() would CHECK() if there was no data, we now return
that there was no valid HEVC layer info. This was triggered by changes
so a bad NAL would be skipped rather than aborting.
Bug: 127833120
Bug: 122749422
Test: re-ran CTS
Change-Id: I239697f9d1f77995f9ccf5e8c77cfaa01994e326
Structures stored in Vector might have their destructor called when
the Vector needs to be extended, so ensure we handle that correctly.
Bug: 128371202
Change-Id: I6eeb4aa67edaa63e0068f6102457f693f63768bc
This key could be useful to query if a file contains haptic channels or
not.
Test: test with files (not) containing haptic channels
Bug: 128012181
Change-Id: I5f0a9ca9fde23ce7d6f48921acc9a1074a6a1601