1) Don't count tracks with no samples as malformed for MediaMuxer, but
keep the old behavior as it is for MediaRecorder.
2) When there are no samples to be written in a track, skip that one, but
compose mpeg4 file with all other tracks in it.
3) Allow notifications in MediaMuxer during stop() process.
Bug: 144108285
Bug: 146423844
Bug: 148754639
Test: 1) Unit tested by adding a video and an audio track, once leaving
audio track with no samples and once leaving video with no
samples. Mpeg4 file with expected track was created both the times
and played well.
2) android.mediav2.cts.MuxerUnitTest$TestApi#testSimpleStartStopMuxer
3) android.media.cts.MediaMuxerTest
4) android.media.cts.MediaRecorderTest
Change-Id: If76a1f3b60d09836d53bce6f6e759e6a751f5538
Merged-In: If76a1f3b60d09836d53bce6f6e759e6a751f5538
(cherry picked from commit afc9f27233fa7dfb8c03e0fc83f612e7a19f27f2)
Added ability to set duration of last frame by writing an empty buffer with
EOS flag marked along with presentation time stamp at the end.
This timestamp would be used to calculate the duration of the original last frame.
Bug: 141573686
Bug: 121052341
Test: atest android.media.cts.MediaMuxerTest
atest android.media.cts.MediaRecorderTest
Unit tested with last sample duration equal to previous sample,
different from previous sample and zero as well. STTS entries and
track duration were created as expected.
Change-Id: Ie769dcd013c8c13e69529480d51d124a7ee3b094
Merged-In: Ie769dcd013c8c13e69529480d51d124a7ee3b094
(cherry picked from commit 53f255f5fc560274d69cccb9a546f0aa494e76f2)
ASSERT_*() calls in getInbufBUfferInfo() weren't resulting in test failures earlier
Also added a sanity check for MediaAdapter allocation failure
Test: atest writerTest -- --enable-module-dynamic-download=true
Bug: 150181503
Change-Id: I600ab1e7cbbd6d5e508efbf85c3a40753ca14a18
am skip reason: Change-Id I6a8f7dd374a3252ba93f386d3c62cd735fe82802 with SHA-1 84e512b692 is in history
Change-Id: If591f7687ddd740f5f97ba24b8a5768832376e07
If the CSD is processed before flush, make sure client and component
are in sync.
Bug: 142542964
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Change-Id: Ia51591770a4fdac1c1334a94fa8d6b2776da1a81
Current encode batching mandates delay for the first frame. Since photo
images are one frame, reduce the latency for encoding the first frame
Test: atest android.media.cts.VideoEncoderTest
Bug: 145356198
Change-Id: I6a8f7dd374a3252ba93f386d3c62cd735fe82802
(cherry picked from commit 84e512b692)
Merged-In: I6a8f7dd374a3252ba93f386d3c62cd735fe82802
releaseAsync() kicks off shutdown sequence but don't wait for it to
finish. Instead, mark itself as pending removal to the resource manager.
Bug: 129008570
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Test: ResourceManagerServce_test
Change-Id: I119945684e4c101c44d64c13913fa01320662fa9
C2BufferData#linearBlocks() returns a std::vector. Chaining method calls
results in an immediate dereference of a dangling pointer. Save a
reference to the otherwise temporary for the duration of the function
call.
Bug: 142544793
Test: m, flash device
Change-Id: I99d662a8fe5deec652cdcd82f420c836c76d5539
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Current encode batching mandates delay for the first frame. Since photo
images are one frame, reduce the latency for encoding the first frame
Test: atest android.media.cts.VideoEncoderTest
Bug: 145356198
Change-Id: I6a8f7dd374a3252ba93f386d3c62cd735fe82802
When creating native audio track, a IAudioTrackCallback will be created
systematically. All callbacks will be cached in Threads and protected by
a lock. Whenever there is a callback event from audio HAL, it will
finally trigger callback to native audio track. Currently, there is only
one callback event, which is codec format change.
Bug: 150301890
Test: manual
Change-Id: I32293627ed923b17dd25f11f0ee0a0c35cd7c01f
There was a link error that process from vendor fails to find
libstagefright_bufferqueue_helper_novndk.so which was only in the
swcodec APEX. To fix this issue, this change enables the library also
from the system libraries.
Bug: 150257951
Test: m -j passed & Tested from betty
Change-Id: I0f6568e043a9ff1b7fdfe059d0619895efffe67d
Make the media.swcodec always link to the no-binder version of
bufferqueue, even if the device build doesn't use vndk. These
devices don't have a "vendor" target and the same system build
of libstagefright_bufferqueue_helper.so is used on the apex,
which brought in libgui/libEGL*.
bug: 150155192
bug: 139201422
Change-Id: Ib356e65019dba4495f2fc1eb6db6de4ff251bbde
Merged-In: Ib356e65019dba4495f2fc1eb6db6de4ff251bbde
ensures that the @include'd policy files (code_coverage, crash_dump)
used by mainlined media processes are carried within the respective
APEX files. Parent policy files now @include the copy held within
the apex.
Bug: 147914640
Test: built/booted/examined filesystem
Change-Id: I34213fbc93ca51696b6a5a3c60bfd3ffa7ce6764
This was accidentally removed when converting MediaExtractorService
to AIDL, but is needed for large MediaBuffers
Bug: 147152626
Bug: 147835592
Test: CTS, manual test app
Change-Id: I403968efa4319f316aa2ba5c0d7db71a0781b883
am skip reason: Change-Id I2d47a05309031a735397838cca11bb4ffbf279e4 with SHA-1 1a1500139b is in history
Change-Id: I3af4132db60346e3ddcdfa63fe95b611418ac0a4
Note: new limit, data_size - 8, should be smaller than the previous one,
UINT_MAX, since we global atom size checking with kMaxAtomSize, 2^26.
Test: run poc
Bug: 127973550
Change-Id: I1744d71d2e10183dd2bebfd01b15d9ee5998fdf3
Mark updatable APEXes as updatable: true so that they are opted-out from
optimizations that make sense only for non-updatable modules; such as
symlinking to the libs in the system partition.
Bug: 149805758
Test: m and check that there is no symlink from the APEX to the system
partition.
Change-Id: I368d72cc6dba6de38fd18f2479b4a2ce77aa1a69