Video Editor engine wrongly set the profile in place of level.
So level was always 1 (default value for Profile)
Change-Id: I202f866d32e81869d9692174d59d9d777a772282
This previous frame size computation code had two incorrect
assumptions:
1/ the ADTS frame length value already contains the header size
2/ the ADTS header is not of fixed size: it is 2 bytes bigger
if it contains the CRC value.
For 1/, the code worked because when the header size was added
to the frame size, the + operator is of stronger precedence
than the ? operator, so the size added was always 0 (instead
of ADTS_HEADER_LENGTH.
For 2/, the code worked as long as there was no CRC in the ADTS
data.
The fix consists in:
- documenting what the frame length computation code returns
- fixing the frame length computation
- when computing the frame length, also returning the header
size so the correct data can be sent to the decoder.
Change-Id: I92df72a9e531f594f762e63d62f9dee7b0109904
This change updates the MediaDump test to use the new
MediaPlayer#setSurface method in place of MediaPlayer#setTexture, which
will be removed.
Change-Id: I33f59705c728f0884452d45cf83cb5b80f66a95a
Cannot trust references to IRemoteControlDisplay to remain the
same when removing a RemoteControlDisplay, compare the
result of .asBinder() instead.
Change-Id: Ib2e82aa24bd4b12804bccff94a6a0090ff83bea8
The RemoteControlClient / Display feature only supports one
display. If multiple displays are registered, this CL implements
the following policy:
- cannot unregister a display that is not the current one,
- registering a display when another is already registered
causes the old one to be unregistered.
This fixes a death handler leak where the previous display was
simply overwritten, without unlinking to its death.
Change-Id: I63f8a38093796e0960761936d7fc58d47b7589b3
If a RemoteControlClient has a null artwork, do no attempt to
rescale the bitmap, it's ok to send a null bitmap to the
IRemoteControlDisplay.
Change-Id: I8332ccfcf18107ea0b41d4e7fa232d7f68798efc
in order to compute the final delay before posting end-of-stream correctly.
Change-Id: I4ff6d7142fdf1ea2d19d12ec78c1e84322d22e5f
related-to-bug: 5216930
AudioTrack::stop() is not synchronous, so a stop() followed
by flush(), which is synchronous, will not always report
a playhead position of 0 after being called.
This CL adds a flag to mark a track as flushed, and report the
correct playhead position in this state.
Bug 5217011 has been created to address the real issue in the
future, where flush could be made synchronous, to properly
address bug 4364249.
Change-Id: Icf989d41a6bcd5985bb87764c287f3edb7e26d12
Locks related to audio focus and remote control should always be
taken in the following order:
1/ audio focus lock
2/ remote control stack
3/ current remote control client generation
Change-Id: If8be11bfef92849957e692b2bd52adbd67a2ef0b
The client does not have to send (w, h) = (0,0) in dequeuebuffer. It can
set the same w, h as the default width and height.
Change-Id: I8202f90261ccaebbd35ea28c153a7472f01912f1
When the client gets cleared, let the display know the new
client generation ID is for a clear.
When a new client becomes current, let the display know
what the associated media button event receiver is.
Change-Id: I18e37a309b5b30ed361a68918379b60418409f1e
This is the test for Gralloc buffers based encoding.
contains a combination of two main changes:
1. GL based encoding tests added to SurfaceMediaSource_test
2. SurfaceMediaSource ::read() colorformat
The SurfaceMediaSource::getformat() sets it to OMX_COLOR_FormatAndroidOpaque.
The omx encoder needs to interpret that colorformat and reads the format
from the Gralloc buffers directly
Change-Id: Iee2fe8901384109a4952e1d6c528c59eb01eb5b1
When metadata gets applied, optimize the artwork and metadata
update by doing it in a single call.
Add missing RemoteControlDisplay-related methods in AudioManager.
Change-Id: I97aa802cc480327bee5592ea8dfdbd414c0f037a
A MetadataEditor contains all the metadata and artwork to be applied
to a RemoteControlClient.
A MetadataEditor can only be applied once.
Change-Id: I3ce9d97f520cd9ab009fb1a92a2b399717511bd8
Remote control displays expose an IRemoteControlDisplay interface
which they register through AudioManager.
Remote control clients create a RemoteControlClient object, which
implicitely exposes an IRemoteControlClient interface registered
in AudioService through AudioManager.
AudioService tells all clients and displays when a new client
is the one that should be displayed.
A client's data gets sent to the display when it is valid, or
it sets new data (while being valid).
The implementation for setting metadata and album art is temporary,
and will migrate to the MetadataEditor API in future CLs.
Change-Id: Ibab6ea1d94c68f32482c760c6ae269541f885548