Modules contributing mainline modules (APK/APEX) should set
min_sdk_version as well as apex_available.
For now setting min_sdk_version doesn't change build outputs.
But build-time checks will be added soon.
This is one of two parts: covers mainline-related files.
Bug: 152655956
Test: m
Change-Id: I558b2d717d6cbae920db008d1b0f3ed61958937b
A packet with size 0 would never be removed from the queue,
and thus processed over and over again.
Bug: 129282427
Test: PoC, manual
Change-Id: Ia03a2b23df555a3c8ab53aac4589cb9b0a1b45a8
libstagefright_mpeg2support actually doesn't link with libmedia. It uses
headers from the library. Replace the shared lib dependency to the
library with the header lib dependency to libmedia_headers and
libaudioclient_headers.
Bug: N/A
Test: m libstagefright_mpeg2support
Change-Id: I87dba95b344eb95c9d36746c8234640815236956
A base class with default implementation, SampleDecryptor, is added to
be used in com.android.media without requiring libcrypto.
Test: build
Bug: 141646183
Change-Id: Idbd6b4bc3a9f7edc63bf5b450d02182032be37b2
ensure no underflow when pulling header from front of AAC packet.
Indicate malformed error in parent routine if we don't have the expected
header data.
Bug: 128433933
Test: y
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
Audio presentation metadata is attached to the access units so that
each media buffer read() retreives it's associated audio
presentations information.
Bug: 120846068
Test: atest CtsMediaTestCases:MediaExtractorTest#testGetAudioPresentations
repeat 3..5 times
Change-Id: I47f4d0dd959537fe98aa757bfa762ff02aa86a35
Mpeg2ts extractor has a depedency on libbinder for
IMemory, but it doesn't actually use IMemory other
than using it to construct the hidl memory.
Make mediaextractor use hidl memory allocated by
hidl allocator, instead of constructing hidl memory
from IMemory.
bug: 112766913
bug: 111407253
test: CTS MediaDrmClearkeyTest#testClearKeyPlaybackMpeg2ts
Change-Id: I39e131718ea41f9cb23177c28213ddf7b7741338
Audio preselection descriptors(APD) can switch mid-stream in AC-4 TS.
Detect change in APD by monitoring PMT version & CRC. Update new
audio presentation information to the stream metadata so that
MediaExtractor.getAudioPresentations() always returns a latest
audio presentation available.
Bug: 63901775
Bug: 119312182
Test: atest android.media.cts.MediaExtractorTest#testGetAudioPresentations
Change-Id: I7f29de6fb90b4ac1bddd4ddb47f83d35dc7f2345
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: Id2cb6cb64425c4c89c031d93156fb1a20be5fa7b
CA descriptor can be more than 4 bytes long, skip correct length.
Bug: 118717575
Test: GTS, MediaCasWidevineKeyTest#testWidevineKeyPlaybackMpeg2ts
Change-Id: I127caf46dfbe7408e8d58343d7e7614415fa5dd0
We can no longer assume audio stream can always be
descrambled into clear buffers. If audio is scrambled,
handle it the same way and extract samples in scrambled
form. Set a dummy format on the track to provide info
about stream type only, and leave it to the decoder
to handle the format change.
bug: 111271614
Test: CTS MediaDrmClearkeyTest#testClearKeyPlaybackMpeg2ts
MediaDrmClearKeyTest#testPlaybackMpeg2ts
Change-Id: I2a803a92f395f06af54f3ad65a5c436edd7ce251
Currently, for scrambled streams that require secure decoder,
we descramble the first TS packet (which includes the PES header)
into the clear, and this TS packet is not descrambled again
at decoding time.
However, descramblers may not be able to descramble the bitstream
into clear buffers past the PES header portion. So we need to
assume that in the first pass, we can only get up to the PES
header portion, and at decoding time, this TS packet should be
descrambled again fully.
bug: 111271614
Test: CTS MediaCasTest; MediaDrmClearKeyTest;
tested with clearkey cas plugin modified to return only the PES
header portion of the first TS packet, instead of the full TS.
Change-Id: I8e77df3c5fa1268282442b7556851d89918c244d
* Add AC4 mime type
* Add AC-4 support to TS extractor
** Extract PES private data and AC4 descriptor.
** Dequeue and parse AC-4 access unit and sync frame
** Validate AC4 elementary stream header and parse sampling rate.
* Add AC-4 support to MPEG4Extractor
** Parse AC-4 sample entry in MP4 and set AC-4 MIME
** Add AC-4 sync header to MPEG4 encapsulated AC-4 raw frame
* Add AC4 DSI Parser
** In order to populate the AudioPresentation objects we need to
extract the AC4 presentation information from the dsi that is
written to the MPEG4 file during muxing.
Change-Id: If84c24ca475cabf3e0d2bdf3e4850aeeb185a0de
Signed-off-by: Previr Rangroo <prang@dolby.com>
mpeg2 es stream access units have a 3 byte prefix and a 1 byte start
code. Searching for the next access unit started after the prefix
instead of after the start byte.
Bug: 74114680
Test: ran POC before/after
- Add MetaDataBase base class that MetaData derives from, but which
does not derive from RefBase.
- MediaBuffer::meta_data() now returns a MetaDataBase& rather than an
sp<MetaData>
- Rename MediaSourceBase to MediaTrack.
- MediaSource no longer derives from MediaSourceBase (or MediaTrack)
- MediaTrack::getFormat(), MediaExtractor::getTrackMetaData() and
MediaExtractor::getMetaData() all take a MetaDataBase& parameter that
they fill out, rather than returning a MetaData directly (the
corresponding methods on MediaSource and RemoteMediaExtractor continue
to return MetaData)
Bug: 67908544
Test: CTS MediaPlayerTest, DecoderTest, EncodeDecodeTest, manually record video
Change-Id: Ib531ab309061290be33d40d6100c9a8127e22083