History log of /frameworks/av/media/libstagefright/MediaCodec.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
32c1bcda7c9fb429fe6c235184f8bb6aa7ef12db 14-Jun-2017 Dongwon Kang <dwkang@google.com> Report error when using buffers for secure codec without providing crypto

Test: passes media post-submit tests and MediaCodecCapabilitiesTest
Bug: 62570231
Change-Id: I07ff8d28700d19d1ed2c08bbb070ffa5407932ef
/frameworks/av/media/libstagefright/MediaCodec.cpp
4a9ab2a382558941ea7fe92324a3d97848686ca8 14-Jun-2017 Dongwon Kang <dwkang@google.com> Revert "Throw IAE when crypto or descrambler is not given for secure codec"

This reverts commit aaa5e6400d7654ca1a7dcebeba36214ed060e3cb.

Test: revert change
Bug: 62570231
Change-Id: Ic1d8b67616a3ac8f491e367d91b3a70d7d22ffa0
/frameworks/av/media/libstagefright/MediaCodec.cpp
aaa5e6400d7654ca1a7dcebeba36214ed060e3cb 08-Jun-2017 Dongwon Kang <dwkang@google.com> Throw IAE when crypto or descrambler is not given for secure codec

Test: MediaCodec throws IAE for the given decoder stress test
Bug: 62100632
Change-Id: I33e7a1f942c49647a17bc2728f1d3b099265628d
/frameworks/av/media/libstagefright/MediaCodec.cpp
afb43f76821e6a63e17e6484289a40430ada6978 09-Mar-2017 Ray Essick <essick@google.com> Name changes to Media Metrics Keys

The API council noticed that we used keys like "ht" and "wid" which
are more properly namespaced like "android.media.mediacodec.height".
This changes those keys on the generation side of the system; it goes
together with other changes that document the namespaced-names in the
consumption and documentation side of the system.

Bug: 35811992
Test: check 'dumpsys media.metrics', subset of CTS
Change-Id: Ie05a105229ab931a6b14c0157cc642b5d8413dde
/frameworks/av/media/libstagefright/MediaCodec.cpp
3b2847fa5506dc265d2e46f067bfbb66ae209f74 19-Jan-2017 Chong Zhang <chz@google.com> MediaCas: add CAS support to MPEG2TSExtractor and MediaCodec

bug: 22804304
Change-Id: I14ec4ffc8c72e283f5cfd742dabaf4ad8bd9d698
/frameworks/av/media/libstagefright/MediaCodec.cpp
9dbe9a57bf0ae2494ec312d6c1b06feec20e9ec9 03-Jan-2017 Chong Zhang <chz@google.com> MediaCas: add MediaCasService

This CL adds API only without implementation.

bug: 22804304
Change-Id: Ibb5a29cc616ec0af81957b2bfe1419c482591753
/frameworks/av/media/libstagefright/MediaCodec.cpp
181fd9b5b64bab24bb49a34208f60a16e98488c5 17-Feb-2017 Chong Zhang <chz@google.com> stagefright: verbose logging for media connect/disconnect

bug: 35364355

Change-Id: I7b5f0aecf98733255cc27b091fea78298fa7e602
/frameworks/av/media/libstagefright/MediaCodec.cpp
cefac14261a32fb856b0d1ab31541787112e306e 07-Feb-2017 Hassan Shojania <shojania@google.com> Modular DRM for MediaPlayer

Bug: 34559906
Test: Manual through the test app

Change-Id: I286f9ff199c34563b7b8643de725f8d1534ea06c
/frameworks/av/media/libstagefright/MediaCodec.cpp
8574195df5de20af5fc16d6f9da1b132d6d5bfee 02-Feb-2017 Ray Essick <essick@google.com> include actual codec used

populate the 'codec' analytics field that tells us which code was
chosen (OMX.google.aac.decoder, for example).
use local declared constants instead of literal strings for our attributes.

Bug: 34935498
Test: examination of generated metrics data
/frameworks/av/media/libstagefright/MediaCodec.cpp
db1221479a7ffe7094c51c463bbd36522ed106ab 26-Jan-2017 Ray Essick <essick@google.com> Media Metrics for NuPlayer, Codec, Extractor

Collect metrics for nuplayer/mediaplayer, codec, extractor.
publishes them to media.metrics service
provides hooks that local APIs use to connect to retrieve metrics
from the above when running on their behalf.

Separate set of changes does the final hop to the local APIs.

Bug: 34715803
Test: build & run, observed code/extractor/player metrics in logs
Change-Id: Ic5a0a7b3b93a5a41af93d81050ba038f0f7a4329
/frameworks/av/media/libstagefright/MediaCodec.cpp
9ee321c347c64886d1078a4e4afb57ec98dd54a2 06-Jan-2017 Wonsik Kim <wonsik@google.com> stagefright: fix premature change of buffer ownership

Bug: 34059849
Test: cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.MediaCodecTest#testUnsupportedCrypto
Change-Id: Id6dbb212551bd086b76895fbc5f699c34a0dc524
/frameworks/av/media/libstagefright/MediaCodec.cpp
dff26e5f53b248fd8cc6605850240c7e7c5438dc 01-Dec-2016 Wonsik Kim <wonsik@google.com> Revert "Revert "MediaCodec refactoring part 2-b: introduce BufferChannel""

- MediaCodec stops tracking the whole buffer array from OMX.
- BufferChannel handles array management instead, if necessary.
- MediaCodec delegates secure buffer management to BufferChannel.
- Remove sf2.

Bug: 32133435
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Play an encrypted content in Play Movies
Test: Mirror the screen via Cast.
Change-Id: I1ca705687956ad972e31257853c54e29cbd7181a
/frameworks/av/media/libstagefright/MediaCodec.cpp
fad01bc45bd47b8f12c89857fee20b7e37310125 06-Jan-2017 Wonsik Kim <wonsik@google.com> Revert "MediaCodec refactoring part 2-b: introduce BufferChannel"

Bug: 34059849

This reverts commit 11b72100e02e02b6cd8a6b14cd2068c96dc49b7d.

Change-Id: I0ab93a617477861a4e6f43152e6b03d5c88783ab
/frameworks/av/media/libstagefright/MediaCodec.cpp
11b72100e02e02b6cd8a6b14cd2068c96dc49b7d 01-Dec-2016 Wonsik Kim <wonsik@google.com> MediaCodec refactoring part 2-b: introduce BufferChannel

- MediaCodec stops tracking the whole buffer array from OMX.
- BufferChannel handles array management instead, if necessary.
- MediaCodec delegates secure buffer management to BufferChannel.
- Remove sf2.

Bug: 32133435
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Play an encrypted content in Play Movies
Test: Mirror the screen via Cast.
Change-Id: Idc9fdee42ea0cdd3b5f15ba5c51647c3e16504a1
/frameworks/av/media/libstagefright/MediaCodec.cpp
d71f16268227c15a0ac2043e15900db5df2c417d 29-Nov-2016 Wonsik Kim <wonsik@google.com> Merge "MediaCodec refactoring part 2-a: introduce callback"
76d73bce9a63b795c7b8edbeab861239ab2eed0f 22-Nov-2016 Wonsik Kim <wonsik@google.com> stagefright: explicitly mark discarded buffers

Return buffers always, but mark discarded buffers explicitly.

Bug: 33059528
Test: (manual) open a website with a looping video and see that it works.
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: Icbe12d09b5721747437592e11def2302f4c8bf79
/frameworks/av/media/libstagefright/MediaCodec.cpp
fc88363032d90492845ad5b917496589ca225f63 21-Nov-2016 Jeff Tinker <jtinker@google.com> Merge "Removing widevine classic"
79054b1f53b448511f1edb6e0dcab1d7b6f39964 14-Nov-2016 Wonsik Kim <wonsik@google.com> MediaCodec refactoring part 2-a: introduce callback

CodecBase instances do not post reply messages back to MediaCodec
explicitly --- Callback does the job instead.

Bug: 32133435
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Play an encrypted content in Play Movies
Change-Id: I210993a3bbc306f970b8e9395a91e8697cfa832e
/frameworks/av/media/libstagefright/MediaCodec.cpp
48d8020342a4de6b0b925328ddbdfe34f22253a3 21-Nov-2016 Wonsik Kim <wonsik@google.com> stagefright: do not set buffer when returning buffers

Bug: 32976893
Bug: 32542437
Test: (manual) play secure content on Play Movies app (fugu) and see that it doesn't crash
Change-Id: Ib45fd552634c9addc8ce25a1d255113c80cc8ce7
/frameworks/av/media/libstagefright/MediaCodec.cpp
349b8b4c47817a565ded94ff351caf48782f1252 18-Nov-2016 Chong Zhang <chz@google.com> stagefright: fix potential codec leaks in async stop/reset

Currently if stop is followed by a reset from another thread,
we unblock the stop first (to avoid ANR) without waiting for
kWhatShutdownCompleted, and proceed with the reset request.
But this could cause release to return too early when the
kWhatShutdownCompleted for the stop is received. When this
happens, the reset() will unregister ACodec's handlers before
the real shutdown with deallocation is processed, causing
a codec node instance to be leaked.

To solve this problem, separate kWhatShutdownCompleted into
two messages kWhatStopCompleted and kWhatReleaseCompleted.
Release should only return upon kWhatReleaseCompleted.

Also initializing the fence fd in the metadata buffer (even
though it's not used) to avoid warning in freeBuffer.

bug: 32750454
bug: 32971559

Change-Id: If218c853955729a2a2f2e8356908115a79c442e3
/frameworks/av/media/libstagefright/MediaCodec.cpp
29b7dcf6d3cdb97103467dc8106151c6260c239a 24-Oct-2016 Jeff Tinker <jtinker@google.com> Removing widevine classic

bug:30505334
Change-Id: I40ac8020b5442857936037a15847b0271359e624
/frameworks/av/media/libstagefright/MediaCodec.cpp
ad60a0f6cd9012507f8086fe741236d12d280ef3 10-Nov-2016 Wonsik Kim <wonsik@google.com> stagefright: reuse buffers instead of cloning

In buffer array mode, the buffer reference is kept in clients of
MediaCodec, so allocating new buffer for new input/output does not
work in that case.

Bug: 32577275
Bug: 32579231
Test: use screenrecord and investigate the output file.
Test: cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.EncodeDecodeTest
Change-Id: I26d89f6b5735094062b8a2027bcab4754576d574
/frameworks/av/media/libstagefright/MediaCodec.cpp
d4855ba417bcc0f9c50ea813dca51c8e33e84175 31-Oct-2016 Wonsik Kim <wonsik@google.com> Merge "stagefright: fix buffer array population for secure input"
d72ffc4416959d2c94838888c781468b2351716d 28-Oct-2016 Wei Jia <wjia@google.com> Merge "BatteryNotifier: attribute battery usage of video to correct uid."
f2ae3e19080938db8cbf29a963fd744a3964fcc2 28-Oct-2016 Wei Jia <wjia@google.com> BatteryNotifier: attribute battery usage of video to correct uid.

Test: manual check batterystats
Bug: 32361950
Change-Id: Id052220e87f6667ca908d5bf6be6164dc8c14c53
/frameworks/av/media/libstagefright/MediaCodec.cpp
14e8740f39a707898cd0f7d476ec39ab44eaec38 28-Oct-2016 Wonsik Kim <wonsik@google.com> stagefright: fix buffer array population for secure input

Bug: 32474779
Test: Play secure content in Play Movies app
Change-Id: I89c99c7d8ed9fe88f756579447ec4bbf886be59f
/frameworks/av/media/libstagefright/MediaCodec.cpp
fd44d8e2f2d37184f7add67125657f3fbfb5a085 20-Oct-2016 Wonsik Kim <wonsik@google.com> MediaCodec refactoring part 1-c: buffer ownership

- Buffers are (roughly) owned by themselves.
- As a corollary, remove output format change related events
and replace by inspecting formats associated with each buffers.

Bug: 32133435
Test: gts-tradefed run gts -m GtsExoPlayerTestCases
Test: (manual) Run Play Movies app to play a secure content.
Change-Id: I6b57da61c2d71acd0d5be4281de823ba1c95b72f
/frameworks/av/media/libstagefright/MediaCodec.cpp
124f54a23dcd3e8b58152d2d0a51c8bf462db6c7 19-Oct-2016 Lajos Molnar <lajos@google.com> Merge "stagefright: unblock stop if already in error state"
5d552fb812bebc3f15c7fe91a3e315a97e3ffb34 24-Sep-2016 Chong Zhang <chz@google.com> stagefright: unblock stop if already in error state

If we received an error from component during stopping, or we
already have a sticky error when we received a stop request,
post reply with error immediatly to unblock the client.

Internally, we process the stop as usual and stay in STOPPING
state. If the client doesn't do anything after that, we wait
for the component's shutdown complete. (It's possible it never
completes, and we leak the resouce; but that's still better than
leaking the resource AND have the app ANR.) If the app initiates
release or reset, we'll release with timeout.

bug: 31671152
Change-Id: I8b7ada773c1fff77aff736efd40087bd3e9b178e
/frameworks/av/media/libstagefright/MediaCodec.cpp
4811923e80a8abefa278307ebf8cc9b0294ba67f 13-Oct-2016 Wonsik Kim <wonsik@google.com> MediaCodec refactoring part 1-b: secure buffers

- Define SecureBuffer to encapsulate secure buffers containing
decrypted data.
- ACodec and MediaCodec use SecureBuffer to communicate between
themselves.

Bug: 32133435
Test: Play an encrypted content in Play Movies
Change-Id: Ic70f7f78aad15bd91ab8ccd31c340bc7964ab1b3
/frameworks/av/media/libstagefright/MediaCodec.cpp
addf2cbb120346ae42e78fa739245a353db5edad 29-Sep-2016 Chong Zhang <chz@google.com> IOMX: consolidate createInputSurface APIs

- Create GraphicBufferSource in IOMX regardless of persistency.

- Remove createInputSurface on IOMXNode, only keep setInputSurface
which accepts either a persistent or non-persistent surface.

- Instead of holding a IGraphicBufferConsumer, hold
IGraphicBufferSource across session as the persistent surface.

- Fix up GraphicBufferSource to allow usage across sessions.
GraphicBufferSource itself becomes agnostic to persistency.

- Remove max encoder input buffers profiling code.

bug: 31399200
Change-Id: I15ed52cc64509fd87736372a580abf7b51bf4de7
/frameworks/av/media/libstagefright/MediaCodec.cpp
7e34bf5af26f8752d4786d3098740cdf51e2438f 22-Aug-2016 Wonsik Kim <wonsik@google.com> MediaCodec refactoring part 1-a: buffers become separate class

MediaCodecBuffer is meant to replace ABuffer and MediaBuffer in
communication between framework components. As the first step, replace
use of ABuffer in MediaCodec with MediaCodecBuffer, and adjust related
classes accordingly.

MediaCodec.getBuffer() and related APIs now returns MediaCodecBuffers;
thus change MediaCodec clients to use MediaCodecBuffer accordingly.

Test: manually tested for key use cases (Camera, YouTube and Play Movies)
Change-Id: Iba7ce131645e75ce5ddbf497fb793ab38b7f245b
/frameworks/av/media/libstagefright/MediaCodec.cpp
6d332d2cdf6e62c2c20ebff220868fe9e3ed7f44 07-Sep-2016 Chong Zhang <chz@google.com> stagefright: abstract GraphicBufferSource to interfaces

Create two interfaces from GraphicBufferSource:

a) IGraphicBufferSource for client (ACodec) to configure the graphic
buffer source. IOMX no longer routes these messages and OMX internal
options are removed.

b) IOMXBufferSource for IOMX to send OMX specific callbacks.

Added an |origTimestamp| argument to emptyGraphicBuffer, and restore
the original PTS inside OMX to avoid going back to GraphicBufferSource
to patch the output PTS. In the longer term, we should consider moving
the max PTS gap entirely into OMX (probably as an extension index).

Define newly introduced interfaces using AIDL to facilitate code
development.

bug: 31399200

Change-Id: Ibaf6ca1a0737ba6ba9f83bedc3b06ef358db36cb
/frameworks/av/media/libstagefright/MediaCodec.cpp
2a5da2a81131bd71395fbc47234ddc77185e8973 30-Aug-2016 Chong Zhang <chz@google.com> stagefright: return an empty array if using surface inputs am: e4aab10641
am: 65da6ecc85

Change-Id: Ic44cc0d201521331346ac77ebddeb4a33f80befc
e4aab10641a099d8a295b3ed61e2f5248f28a669 30-Aug-2016 Chong Zhang <chz@google.com> stagefright: return an empty array if using surface inputs

bug: 21376040

Change-Id: Iba9d1e7738f6da050bd1df11af75e28d51f69445
/frameworks/av/media/libstagefright/MediaCodec.cpp
a944197b97b4e64ffb3abe91218d1db06ea9d7de 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 6ae8c7b to stage-aosp-master
am: 32d6e5f0eb

Change-Id: I200068e27004c5f3c9508a4f46747e0459b31ba8
32d6e5f0ebe9e00f80401e5f4fd6e285a474590d 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 6ae8c7b to stage-aosp-master

Change-Id: Iabb5d9b93b98e428c53f0504fbfe832ed24d988d
0d1ed381fde5dac12dd84fcf3da66dac46699378 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in stagefright.

* Add explicit keyword to conversion constructors.
* Or add NOLINT to implicit conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1

Change-Id: I7a15ac1e37973fe2c661f577a6106b913653de40
Merged-In: I7a15ac1e37973fe2c661f577a6106b913653de40
/frameworks/av/media/libstagefright/MediaCodec.cpp
c524d2336022df90786cd627c92e34e5cfba954a 01-Jul-2016 Lajos Molnar <lajos@google.com> Merge \"stagefright: use uniqueId to detect same surface for setSurface\" into nyc-dev
am: ecc6049ec0

Change-Id: I59f712f7ee90fcdb0a8719504570d3dd1650cf18
c58f76670d68e57ff036cda3b4293a58b210a278 29-Jun-2016 Lajos Molnar <lajos@google.com> stagefright: reconnect to ANW on setup in non-output-meta mode
am: 098446ae41

Change-Id: I09ea4d3c1a245656dedea581328e5b73d18f18cf
b9fa58afa4c7772fe3c4cfdea9e45bc85cf43537 28-Jun-2016 Lajos Molnar <lajos@google.com> stagefright: use uniqueId to detect same surface for setSurface

Bug: 29422927
Change-Id: I8b0105f87ca7e8ee745c60ab726b1dffbbd4aa87
/frameworks/av/media/libstagefright/MediaCodec.cpp
098446ae4100dfd989c452bb67133559aa892cd3 28-Jun-2016 Lajos Molnar <lajos@google.com> stagefright: reconnect to ANW on setup in non-output-meta mode

BufferQueue now needs reconnect to allow dequeuing all buffers from
a BufferQueue.
Use getConsumerName instead of connect failure to detect that we
are connecting to the same surface.

Bug: 29422927
Change-Id: I4fc4d1ec9fd452ec027cab60b06e4af88d53d830
/frameworks/av/media/libstagefright/MediaCodec.cpp
47734c9509ecb472c2844cae46e2d916b9358321 02-May-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 98a9b2a to nyc-dev-plus-aosp

Change-Id: Iae0a5cb698807d74ba28878d7ce1f69b6ba5219a
090ef604f81447eab4aa0a5b45d6307482573560 27-Apr-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: I625fbab25f16282c2ea929cd16283d9d146fa17b
/frameworks/av/media/libstagefright/MediaCodec.cpp
b77d03b62cb743d0faf74b54aa466b4d220b5e61 03-Mar-2016 Lajos Molnar <lajos@google.com> stagefright: connect color aspects and surface dataspace

1. Keep configuration format as video decoder and encoder will need
it to reset their default color aspects on mode/size change.

2. Separate color aspect handling for decoder and encoder as they
are quite different. Update decoder and encoder color aspect setting
to latest policy.

3. propagate dataspace to GraphicBufferSource, MediaCodecSource,
CameraSource and SoftwareRenderer

Bug: 25684127
Change-Id: Ie9a7528af36ed44605a7ce3e69b5794ef16b1c66
/frameworks/av/media/libstagefright/MediaCodec.cpp
d5ef65ea897a7c0e3704000e33975f357bfc1c56 11-Mar-2016 Lajos Molnar <lajos@google.com> Merge "ACodec: move getPortFormat closer to PortSettingsChanged event" into nyc-dev
b0a4b9e917bd26bf366fb20c48315f51285c18f9 08-Mar-2016 Lajos Molnar <lajos@google.com> ACodec: move getPortFormat closer to PortSettingsChanged event

Per OMX spec, we should read the new format even before disabling
the port.

Bug: 25684127
Change-Id: I78fc0d85dbf8e2d7e2c670c33e70fed6d79cf3c7
/frameworks/av/media/libstagefright/MediaCodec.cpp
ea15fd29af81490311af9e12949b43524c39400e 03-Mar-2016 Ronghua Wu <ronghuawu@google.com> media: changed resource type from String8 to enum.

Bug: 27338692
Change-Id: I0161de084682e2317cba81dc5f55c17d5d478570
/frameworks/av/media/libstagefright/MediaCodec.cpp
c6e96a912c2cdedf853e3bd7b68c953fa818ff40 26-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: propagate nativeHandle properly for secure playback

- fix prototype constness (so ACodec can pass handle to client)
- fix handle passing to decrypt

Bug: 26782004
Change-Id: Ia2f85ded66fbb459a9db8096eb5b9e34ef45ce16
/frameworks/av/media/libstagefright/MediaCodec.cpp
9ac86b3cae9a1e14b12bf97223ddde96142aae43 24-Jan-2016 Jeff Tinker <jtinker@google.com> stagefright: ICrypto: enable passing secure buffers in native_handle

Previously secure buffers were passed as opaque
void * values, which no longer works since
mediadrmserver is now a separate process from
mediaserver.

Bug: 22990512
Change-Id: I5c458ba19e78e20d1bd5a5899df0bce16f71bfd8
/frameworks/av/media/libstagefright/MediaCodec.cpp
a63141af8f036bda0b8f7800107ca8a0e0623135 12-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: enable native handles for secure buffers

- rename IOMX::allocateBuffer to allocateSecureBuffer as ACodec
only uses allocateBuffer for secure compressed buffers.
- add argument to return native_handle if component supports it.
- rename IOMX::enableGraphicBuffers to enableNativeBuffers.
- add argument to select graphic vs. native handle mode
- request native handles for secure input buffers, but allow
fallback

Bug: 26782004
Change-Id: Ide9d07f54d2e7e3e6a82dbca011f4db9a5630950
/frameworks/av/media/libstagefright/MediaCodec.cpp
65dd3eeef54cf1d1c4edf2f966d3dabb508d3cb9 05-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: Move CodecCapabilities querying into MediaCodec

1. We cannot assume that codecs are OMX based
2. We still have a strange dependency where MediaCodec's
create methods depend on MediaCodecList, which depends on
MediaCodec's static method. This is to be untangled later.

Bug: 17108024
Change-Id: Idd619ee959627539a65f5f7da586108883dcb5f2
/frameworks/av/media/libstagefright/MediaCodec.cpp
9d73ec661e34f91f8d80a11cc5208a23997b75a0 04-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: move MetadataRetriever off of OMXCodec

Also remove some unneeded OMXCodec includes.

Bug: 17108024
Change-Id: I1e4b32d83216e9c6b1d76a18fb346dc632be4b1d
/frameworks/av/media/libstagefright/MediaCodec.cpp
6880f83431e54765364664d9ec50ce0d748bdfae 04-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: change signature of MediaCodec::Create methods

Most clients already have AString when creating codecs, and
internally we use AString.

const char * automatically casts to AString, but it does incur a
copy cost, so we incur it on every MediaCodec::Create call.

Bug: 17108024
Change-Id: I213dde7a6fc3cf3756eee6afd7194413bcca54a5
/frameworks/av/media/libstagefright/MediaCodec.cpp
5b05e49e6550cb2abf1a88272d6cd460b8957176 05-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: Move CodecCapabilities querying into MediaCodec

1. We cannot assume that codecs are OMX based
2. We still have a strange dependency where MediaCodec's
create methods depend on MediaCodecList, which depends on
MediaCodec's static method. This is to be untangled later.

Bug: 17108024
Change-Id: Idd619ee959627539a65f5f7da586108883dcb5f2
/frameworks/av/media/libstagefright/MediaCodec.cpp
d100a1e67d754239c0d2f13b512003c08f3da15d 05-Feb-2016 Lajos Molnar <lajos@google.com> Merge "stagefright: move MetadataRetriever off of OMXCodec"
5405b7f0c1e1859d036951a1ddba0fb222a11934 05-Feb-2016 Lajos Molnar <lajos@google.com> Merge "stagefright: change signature of MediaCodec::Create methods"
6b0795009b8f53ab771e0074b76381977d016f4b 04-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: move MetadataRetriever off of OMXCodec

Also remove some unneeded OMXCodec includes.

Bug: 17108024
Change-Id: I1e4b32d83216e9c6b1d76a18fb346dc632be4b1d
/frameworks/av/media/libstagefright/MediaCodec.cpp
6fc17d1a7c5d2fb117491b2e9f66c6236b526508 04-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: change signature of MediaCodec::Create methods

Most clients already have AString when creating codecs, and
internally we use AString.

const char * automatically casts to AString, but it does incur a
copy cost, so we incur it on every MediaCodec::Create call.

Bug: 17108024
Change-Id: I213dde7a6fc3cf3756eee6afd7194413bcca54a5
/frameworks/av/media/libstagefright/MediaCodec.cpp
4f59c7e373a7e883f21ba33d44ea7caa86b65b02 04-Feb-2016 Hangyu Kuang <hkuang@google.com> stagefright: Print warning when configure with empty CSD string.

Change-Id: I82ed59e449419ea380b93bb798ab66e7bcac9f66
/frameworks/av/media/libstagefright/MediaCodec.cpp
0c353b583daa4dcd149d933f187307c71d8a991d 21-Jan-2016 Ronghua Wu <ronghuawu@google.com> Merge "libstagefright: keep reference to the codec memory on reclaim"
d9f1f950d18b4e166b178d93260074019588c956 13-Jan-2016 Jeff Tinker <jtinker@google.com> Fix protected content playback

bug: 26532678
Change-Id: I402a4b3aef126a0f6b35c1d68d3def12be3789b3
/frameworks/av/media/libstagefright/MediaCodec.cpp
18cb1eca504817b5b144a023ae2792d90e74c9a5 18-Dec-2015 Jeff Tinker <jtinker@google.com> Support AES-CBC sample encryption in MediaDrm

bug:23719082
Change-Id: I3028452f315122b65296881aed1fbf66c3ceeebc
/frameworks/av/media/libstagefright/MediaCodec.cpp
86b997dcf1101cdd259460fb4f82204200a9a993 23-Dec-2015 Ronghua Wu <ronghuawu@google.com> libstagefright: keep reference to the codec memory on reclaim

Bug: 26309822
Change-Id: I98b48ad38cf0834c08e004027cb2b5c187c198a0
/frameworks/av/media/libstagefright/MediaCodec.cpp
2034457336d28124e0f9f3c625978052ae03fcea 10-Dec-2015 Wei Jia <wjia@google.com> MediaCodec: check buffer size to prevent possible integer overflow for video encoder.

Bug: 25812794

Change-Id: Ib32053bc4d6a2ebe69aa4993dc32f5ab1b13ae81
/frameworks/av/media/libstagefright/MediaCodec.cpp
3f273d10817ddb2f792ae043de692efcdf1988ae 24-Nov-2015 Wei Jia <wjia@google.com> Uses AudioFlinger to signal battery stats for audio.

Bug: 18177221
Change-Id: I704010c037cb99bb74b98798ee8e494fa8bdc875
/frameworks/av/media/libstagefright/MediaCodec.cpp
ece0e6e40fbd34c83c4906346f26e546f1d7b161 23-Oct-2015 Ronghua Wu <ronghuawu@google.com> Merge "Allow ALooper::awaitResponse to return immediately if the looper is stopped." into mnc-dr-dev am: 0983d691b7 am: 72920648c7
am: 69f028a231

* commit '69f028a23114439bf2a5a72b511ffef6a5549903':
Allow ALooper::awaitResponse to return immediately if the looper is stopped.
0abb2aa4859ced9165c77324cb83d1cd94f5f20c 21-Oct-2015 Ronghua Wu <ronghuawu@google.com> Allow ALooper::awaitResponse to return immediately if the looper is stopped.

Bug: 25088488
Change-Id: I63e69886a8e9cffcaad675ca1a5642c0abf3b466
/frameworks/av/media/libstagefright/MediaCodec.cpp
c4b3c2a7737039d0fcbceaa36590468926bdd1d3 13-Oct-2015 Ronghua Wu <ronghuawu@google.com> am cb9124f5: am 5e20fad6: am e5200ea7: Merge "libstagefright: don\'t reclaim codec when there\'s buffer owned by client. Notify the client and try to reclaim again in 0.5s." into mnc-dr-dev

* commit 'cb9124f5c810b4777f8c6644135531477eeed79a':
libstagefright: don't reclaim codec when there's buffer owned by client. Notify the client and try to reclaim again in 0.5s.
4b710f086070fabe022b3a1f474bfcbec842b8fc 15-Sep-2015 Ronghua Wu <ronghuawu@google.com> libstagefright: don't reclaim codec when there's buffer owned
by client.
Notify the client and try to reclaim again in 0.5s.

Bug: 23703241
Bug: 23949540
Change-Id: I1afe50c71635645668bfb73ffa0d801765b5ae3c
/frameworks/av/media/libstagefright/MediaCodec.cpp
b4b5d529dca327ae93e26a8bc0cb54cadf6bb354 11-Sep-2015 Ronghua Wu <ronghuawu@google.com> am c5c0e4ec: am 885dedb4: am ad26bbdd: Merge "libstagefright: Do not add audio codecs to resource manager. They are too small anyhow." into mnc-dr-dev

* commit 'c5c0e4ec73d25543693e4902c19f239671ede94b':
libstagefright: Do not add audio codecs to resource manager. They are too small anyhow.
58828196edf2fc4debbd7913198a8149f039b4a9 10-Sep-2015 Ronghua Wu <ronghuawu@google.com> libstagefright: Do not add audio codecs to resource manager. They are too small anyhow.

Bug: 23703241
Change-Id: I3c2882a1d6736bb8a4099289d8bab4974343586d
/frameworks/av/media/libstagefright/MediaCodec.cpp
0362655ca9494052f348f83dabecf9ea27003976 09-Sep-2015 Aaron Vaage <vaage@google.com> Fixing string format that was breaking build.

Change-Id: Ic3e3127914e76cd3608795b94c1172807064bd89
/frameworks/av/media/libstagefright/MediaCodec.cpp
b22909302f02bb33ee6264f9a64cd0a4f3790f48 04-Sep-2015 Aaron Vaage <vaage@google.com> Fixing MediaCodec::getBufferAndFormat returns OK on invalid state

Defined safe outcomes for when given an index that is out of
bounds or when the index points to a buffer that is not owned
by the client.

While at it, added guards against NULL parameters.

Bug: 23112275
Change-Id: I7919e75a0bb91dc2c97736623624ecbbdbe6ea4b
/frameworks/av/media/libstagefright/MediaCodec.cpp
68845c14ebf2c7282800b1abffde38d8e9a57aab 21-Jul-2015 Ronghua Wu <ronghuawu@google.com> libmediaplayerservice: propagate caller pid to MediaCodec.

Bug: 22630317
Change-Id: I0337d74f4ef04bf96f2de83f33d98d0d7da47c12
/frameworks/av/media/libstagefright/MediaCodec.cpp
f8f669d7a727e4ad5505cd85741f4d50dbaffbf9 18-Jul-2015 Chong Zhang <chz@google.com> Merge "fix soft renderer rotation" into mnc-dev
505aab41c0e8e79a49d4506344fcd9d220d5965b 18-Jul-2015 Chong Zhang <chz@google.com> fix soft renderer rotation

bug: 13222807
Change-Id: I6f6f417422d3a18117b594670bb23e3019d449bb
/frameworks/av/media/libstagefright/MediaCodec.cpp
37c8924c508a7c9b8bd3c8ce80fc005070531902 15-Jul-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: add pid to removeResource method

Bug: 22496209
Change-Id: I73311573e8d1ac15fec668a9ef6e6af7a07a1d30
/frameworks/av/media/libstagefright/MediaCodec.cpp
a81c6229638a4db56752dd77a6610e0f0971e877 11-Jul-2015 Lajos Molnar <lajos@google.com> nuplayer: use codec->setSurface when possible to avoid seeking

Bug: 22414719
Change-Id: I0442e12af960f86a0fc090b4a469c62ba638a1a0
/frameworks/av/media/libstagefright/MediaCodec.cpp
264bac95912efe121d6a60026612617f04f42966 27-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: prevent allocating stale buffers for OMX decoders

Also fix some issues encountered once using generationNumbers:
- properly account outstanding buffers in MediaSync
- don't release arbitrary frame if attach fails

Bug: 11990461
Change-Id: Icee5ea188ca4eb856138feb5e6ec5d4ee5e44008
/frameworks/av/media/libstagefright/MediaCodec.cpp
c6044a135324979e62cc59db9dbde8b11c4bb74b 17-Jun-2015 Andy Hung <hunga@google.com> MediaCodec: handle a spontaneous error while configuring

Allow the INITIALIZED and UNINITIALIZED state to prevent
a CHECK() from aborting the thread. This state flexibility
makes the handling for kWhatComponentConfigured similar
to kWhatFlushCompleted.

Bug: 21840990
Change-Id: I57e08cfb146b0b9a355061e4f9ffbe176f213cf6
/frameworks/av/media/libstagefright/MediaCodec.cpp
c8edf5af010ac24a99b302a18e7b84e8b4b2b783 12-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: use media timestamp for default render timestamp

Bug: 21814308
Change-Id: I897bc4878c0b3a758d630e9c117b746ef7e55146
/frameworks/av/media/libstagefright/MediaCodec.cpp
90fcf68fd29f3cb695bd53a830ad984cb7d430c0 04-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: add support for output frame rendered callback

- Added FRAME_RENDERED event in OMX, used by tunneled video decoders
to signal rendered event timing
- Track buffers sent for rendering in ACodec and in SoftwareRenderer, and
determine when they have rendered
- Propagate render times to MediaCodec

Bug: 20503131
Change-Id: Idf0a8714d5368b237c2285dd39fa82db847c232f
/frameworks/av/media/libstagefright/MediaCodec.cpp
cb18ec05b7097a63262b81afe1e866105d400f4a 02-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Track camera and flashlight usage in battery stats." into mnc-dev
99e69716215cd0665379bc90d708f2ea8689831d 27-May-2015 Ruben Brunk <rubenbrunk@google.com> Track camera and flashlight usage in battery stats.

Bug: 15986092

Change-Id: I9dc6828332e4091fd93bf2d82839e8e3862a2fc2
/frameworks/av/media/libstagefright/MediaCodec.cpp
79608158c2254fe1357959157f2d0c1560a8a6c6 20-May-2015 Chong Zhang <chz@google.com> stagefright: measure max encoder buffer count for persistent surface

bug: 19127604

Change-Id: I9a9b29b527d20f43a5a0188380baf2242bd31507
/frameworks/av/media/libstagefright/MediaCodec.cpp
55c3bd0cacfb6e1601cd03fdba814be544a34326 13-May-2015 Chong Zhang <chz@google.com> Merge "stagefright: rename usePersistentInputSurface to setInputSurface" into mnc-dev
8f469e18c307cb9dc0d16ed9225972aa8be4516f 13-May-2015 Chong Zhang <chz@google.com> stagefright: rename usePersistentInputSurface to setInputSurface

and clear persistent surface pointer when MediaRecorder is reset

bug: 21045118
bug: 21045402
Change-Id: Ifd0d6deeb969f2252123929541b30b518cecbf9a
/frameworks/av/media/libstagefright/MediaCodec.cpp
47a2e875bdd2bd25cb8500208940ff1488b01e08 13-Mar-2015 Ronghua Wu <ronghuawu@google.com> libstagefright: report special error when codec is released by resource manager.

Bug: 19620911
Change-Id: I3403da361adbf2ea6979fcadb0d5ad0889d3513e
/frameworks/av/media/libstagefright/MediaCodec.cpp
8b23759763dbf11b0c628a7e62dc5b3dea7dc188 06-May-2015 Lajos Molnar <lajos@google.com> stagefright: support push-blank-buffers-on-shutdown for SW renderer

Bug: 20885565
Change-Id: I2a361b8dd6d39d2cf994f6748ed562be4c642b77
/frameworks/av/media/libstagefright/MediaCodec.cpp
8651c6f5069cca40ef805b800a9730617ff7f9b8 02-May-2015 Lajos Molnar <lajos@google.com> Merge "stagefright: add support for dynamically setting MediaCodec output surface" into mnc-dev
d291c222357303b9611cab89d0c3b047584ef377 01-May-2015 Chong Zhang <chz@google.com> MediaCodec: implement persistent input surface APIs

Bug: 19127604
Bug: 19489395

Change-Id: Idaf1cc9008016f66903e93907a676f54e342e1a3
/frameworks/av/media/libstagefright/MediaCodec.cpp
1dcdfead2971c1fa7c02f24ba86f706890c9f99e 30-Apr-2015 Lajos Molnar <lajos@google.com> stagefright: add support for dynamically setting MediaCodec output surface

Bug: 11990461
Change-Id: I2aee89ef504234dc66eb5fcf6e62e1706088f758
/frameworks/av/media/libstagefright/MediaCodec.cpp
f06cc24ce7aeb5ff6f45b770a15286c95f8cc9ff 01-May-2015 Lajos Molnar <lajos@google.com> stagefright: MediaCodec: rename mNativeWindow to mSurface

because mNativeWindow is of type sp<Surface>

Bug: 19489395
Change-Id: I5ddc78b04e387915a2293b71195d7a6494986356
/frameworks/av/media/libstagefright/MediaCodec.cpp
1de1e25cba872bd4c077c2e394f8ca9c70b65856 01-May-2015 Lajos Molnar <lajos@google.com> stagefright: remove NativeWindowWrapper

Now that Surface and SurfaceTextureClient are the same and Surface,
it does not add value.

Bug: 19489395
Change-Id: I016ecd1cf5cc51ce6244b6fa34ecd75f84e3db01
/frameworks/av/media/libstagefright/MediaCodec.cpp
48a31bf3f1c1ed5953a4e64f71cdf528f3a38ee5 29-Apr-2015 Andy Hung <hunga@google.com> Omx: Return an error if no IOMX is available

Previously caused fatal crash.

Bug: 20566134
Change-Id: I9761d043422954615dbe81b301401765146a7283
/frameworks/av/media/libstagefright/MediaCodec.cpp
c721e71f4d7e3cd4fc9332fd55fb6942f54cec39 25-Apr-2015 Ronghua Wu <ronghuawu@google.com> DO NOT MERGE libmedia: add sub resource type audio-codec and video-codec.

Bug: 20559813
Change-Id: If231cb44337ca7dc74c39fc3cd73e2b6f3cb85b8
(cherry picked from commit d4c1f6b4ecfef7323422359fc38bd1edb1abf205)
/frameworks/av/media/libstagefright/MediaCodec.cpp
21db57282da8b3daba1549f3a8e41c4fbaf80059 24-Apr-2015 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: add dumpsys support."
45c765da4d67088ea7ce0fab438300682c3914f0 24-Apr-2015 Chong Zhang <chz@google.com> MediaCodec: ignore error when linkToDeath to batterystats

bug: 20071299
Change-Id: I932b40e46312db467fe88f8ff6cea028b63785cd
/frameworks/av/media/libstagefright/MediaCodec.cpp
8f9dd872366f54b6260506c75c3d0cc3f9f73f81 24-Apr-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: add dumpsys support.

Bug: 20233206
Change-Id: Ic253985e408b05b488e87cd5c50c0d619ac568ef
/frameworks/av/media/libstagefright/MediaCodec.cpp
ea44f41bb142555e747cc11382296e94af99d312 21-Apr-2015 Ronghua Wu <ronghuawu@google.com> Merge "media: ignore the result of linkToDeath, which can fail if called from same process."
e4237177a4a3eea059cd74247b2d770d301a8230 21-Apr-2015 Ronghua Wu <ronghuawu@google.com> media: ignore the result of linkToDeath, which can fail if called from same process.

Bug: 19620911
Change-Id: I6a25ed1ef1b2790d0976943ec129f31972e27714
/frameworks/av/media/libstagefright/MediaCodec.cpp
ee4e1b1a63758941460ae79a064249d3a5189443 17-Apr-2015 Lajos Molnar <lajos@google.com> stagefright: warnings be gone, some are now errors, use clang

Change-Id: I81f438ae444f04c12ae27ae4ef6d073033de172c
/frameworks/av/media/libstagefright/MediaCodec.cpp
3d66eb4128aebef31bb0fa44c4d53d6122294a26 16-Apr-2015 Chong Zhang <chz@google.com> MediaCodec: hold input buffers during FLUSHED state

bug: 20267388
Change-Id: I21a12cb2ebb74e17dcdb7b502c3f674e9e64b5dc
/frameworks/av/media/libstagefright/MediaCodec.cpp
67e7f543c7f1c4fe4ee1989ceb0aebe44a63b49e 13-Mar-2015 Ronghua Wu <ronghuawu@google.com> media: use ResourceManagerService with MediaCodec

Bug: 19620911
Change-Id: I235a97e5195b28645b7834dda0dd77307d93f4a8
/frameworks/av/media/libstagefright/MediaCodec.cpp
db93079daf06a94e50622d0383b9ed8e767e2f92 13-Apr-2015 Chong Zhang <chz@google.com> Merge "MediaCodec: add DeathNotifier to BatteryNotifier"
e6109e2f10b43c2cc2561c6fd6633b5f988bd7a9 11-Apr-2015 Lajos Molnar <lajos@google.com> mediaplayer: support async mode for widevine legacy mode

Bug: 14679336
Change-Id: Id224eb8c31ec148ca9a144758cc56ddbf5465f5c
/frameworks/av/media/libstagefright/MediaCodec.cpp
d7ed649cfeff62680b8edb4cb86ce239116d8c8b 10-Apr-2015 Chong Zhang <chz@google.com> MediaCodec: add DeathNotifier to BatteryNotifier

make the battery notifier more robust

bug: 20071299

Change-Id: I0ecfecc787c88ace26dba5e235aa0c345bcace6d
/frameworks/av/media/libstagefright/MediaCodec.cpp
c481b5012a5f6cf72e5e93b36f1ed4c9169916f2 07-Apr-2015 Jeff Tinker <jtinker@google.com> Pass crypto source data using a shared buffer

MediaCodec was using a binder transaction buffer
to pass encryption source data for protected content.
On some 4K content, the max binder transaction buffer
size was being exceeded. This change uses a shared
buffer for the encryption source data instead of a
binder transaction buffer, which avoids the problem and
may be more efficient.

bug: 20027687
Change-Id: I36a24ebf600d7e1064b78e48b167fdc29b2c65e9
/frameworks/av/media/libstagefright/MediaCodec.cpp
3f27436a9346f043f52265da1e6a74cde2bffd4d 05-Mar-2015 Lajos Molnar <lajos@google.com> stagefright: don't use ALooperRoster mutex for reply handling

Change replyID-s from uint32_t to an object
Move reply handling into the loopers (to reuse a common mutex)

Bug: 19607784
Change-Id: Iaa035b846c424c5687ed17ce1079b325e86c54be
/frameworks/av/media/libstagefright/MediaCodec.cpp
1d15ab58bf8239069ef343de6cb21aabf3ef7d78 05-Mar-2015 Lajos Molnar <lajos@google.com> media: switch to new AMessage handling

Bug: 19607784
Change-Id: I94cddcb81f671422ad4982a23dc4acfe57a9f1aa
/frameworks/av/media/libstagefright/MediaCodec.cpp
5549bb5b651db8465ac846b3490eee9378253a76 06-Feb-2015 Lajos Molnar <lajos@google.com> am e5760862: am bcd22f0f: am 0662f5b0: Merge "stagefright: add fallback for native flex-YUV support" into lmp-mr1-dev

* commit 'e576086224f6e630159eaeec59ab5146c8533dc7':
stagefright: add fallback for native flex-YUV support
e576086224f6e630159eaeec59ab5146c8533dc7 06-Feb-2015 Lajos Molnar <lajos@google.com> am bcd22f0f: am 0662f5b0: Merge "stagefright: add fallback for native flex-YUV support" into lmp-mr1-dev

* commit 'bcd22f0f3a4cd5f78e03af23aafadb2d1aec6794':
stagefright: add fallback for native flex-YUV support
3a01a71dcbb467d06cc5da4a72a82bb588648cfc 31-Jan-2015 Lajos Molnar <lajos@google.com> stagefright: add fallback for native flex-YUV support

Use software renderer if codec cannot support flex-YUV on a surface

Bug: 17906609
Change-Id: I3d0e3ff5fee7d7b3e2416892968fa18f6139598a
/frameworks/av/media/libstagefright/MediaCodec.cpp
0a08a1e0dd576f0682cf7d665fe940bc26af52d7 04-Feb-2015 Elliott Hughes <enh@google.com> am e91c3dd0: am 6a025acb: am ec0472ba: Merge "Move AString\'s StringPrintf out of the way."

* commit 'e91c3dd028c6cf551e905c5d2cfb5d1fc0c8bcb7':
Move AString's StringPrintf out of the way.
e91c3dd028c6cf551e905c5d2cfb5d1fc0c8bcb7 04-Feb-2015 Elliott Hughes <enh@google.com> am 6a025acb: am ec0472ba: Merge "Move AString\'s StringPrintf out of the way."

* commit '6a025acb630a3ac4a84715d188aeb48f1946bc3f':
Move AString's StringPrintf out of the way.
a1e8944a21e5833b7aadc451776f11797f5f9273 04-Feb-2015 Elliott Hughes <enh@google.com> Move AString's StringPrintf out of the way.

We should come back and replace AString with std::string and switch to the
"real" StringPrintf family, but this fixes the ODR violation that was
preventing us from booting.

Bug: 19265750
Change-Id: I798eb9ca5dd634e44625af5e583439ef9f0cdc35
/frameworks/av/media/libstagefright/MediaCodec.cpp
197f84845ccea9319a1589b85edeb2dcf56b81b3 07-Jan-2015 Lajos Molnar <lajos@google.com> am 644afb88: am 9fc2f470: am 8140a2b7: stagefright: report crop rectangle as codec resolution if exists

* commit '644afb88421ac0e71d526f9b6726404a90c7cccd':
stagefright: report crop rectangle as codec resolution if exists
8140a2b7ef0650e8cce6be16efcbfce56d0ed1e4 07-Jan-2015 Lajos Molnar <lajos@google.com> stagefright: report crop rectangle as codec resolution if exists

Bug: 18789054
Change-Id: I08b82a400541b5e09580801473c34ce56bfef5db
/frameworks/av/media/libstagefright/MediaCodec.cpp
67d93552f0fca5a2ac6a451569cc1b1e15cd138a 26-Nov-2014 Chong Zhang <chz@google.com> am b438123f: am 9574c274: am 5d2c5fcb: Merge "MediaCodec: resume codec if state is FLUSHED in async mode" into lmp-mr1-dev

* commit 'b438123fb1ee0a8c232fd66de658d5382d2083cf':
MediaCodec: resume codec if state is FLUSHED in async mode
d9e0603a1be07dbb347c55050c7d4629ea7492e8 26-Nov-2014 Chong Zhang <chz@google.com> MediaCodec: resume codec if state is FLUSHED in async mode

bug: 18513091

Change-Id: I192625c61834584f711de76db788c2c0332ae774
/frameworks/av/media/libstagefright/MediaCodec.cpp
fc70a810d18f13bdb04be3307aa2b282b0cdc5b0 12-Nov-2014 Andy Hung <hunga@google.com> am 745602d8: Merge "MediaCodec: Prevent stop() in the UNINITIALIZED state" into lmp-mr1-dev automerge: 8bc9b3a
automerge: 3584a1a

* commit '3584a1afb3f263a13d12cc2d8003101c74453ce3':
MediaCodec: Prevent stop() in the UNINITIALIZED state
745602d87607521f4fe84c4f3a6388fbdb6a867c 11-Nov-2014 Andy Hung <hunga@google.com> Merge "MediaCodec: Prevent stop() in the UNINITIALIZED state" into lmp-mr1-dev
944f3112a6d3fca7c70602e9696508101385e57c 06-Nov-2014 Jeff Tinker <jtinker@google.com> am 6e0da022: am e0e8223c: am 1cf9ad1a: Merge "Pass resolution to Crypto plugin on format change" into lmp-mr1-dev

* commit '6e0da0226503ddea118d43962a76fa2fa56bad1e':
Pass resolution to Crypto plugin on format change
33223c4f97abb78fa8c92e1b8c817546f15d97e1 04-Nov-2014 Andy Hung <hunga@google.com> MediaCodec: Prevent stop() in the UNINITIALIZED state

Return INVALID_OPERATION instead. This is a corner case when
the decoder is still allocated, occurring after codec error.

Bug: 18121124
Change-Id: If87e44dd40db48f63f965b765205f1e733663efd
/frameworks/av/media/libstagefright/MediaCodec.cpp
2514d080c8a54ff603a45d7e336de668fe7329db 03-Nov-2014 Jeff Tinker <jtinker@google.com> Pass resolution to Crypto plugin on format change

Change-Id: I56cd557ce3525fe625db8c312d2557d3c8b51101
related-to-bug: 16034599
/frameworks/av/media/libstagefright/MediaCodec.cpp
9b3d384753658a2b7985b1f4d124b09a8fb8f3b6 23-Oct-2014 Lajos Molnar <lajos@google.com> am ccaf667e: am ffe39811: am 8274b049: am cd3fc4e3: am 6ce19d24: Merge "Stagefright: MediaCodec: shutdown allocated codec on error" into lmp-dev

* commit 'ccaf667eb6e96a28caedb0d4f776b1ff9c4aed10':
Stagefright: MediaCodec: shutdown allocated codec on error
52dfbee90cc3c4426428318e06a92774f5201198 15-Oct-2014 Praveen Chavan <pchavan@codeaurora.org> Stagefright: MediaCodec: shutdown allocated codec on error

If MediaCodec sees a fatal error and transitions to
UNINITIALIZED state, The codec may still be alive (with an
exception of 'mediaserver-died' error).
Handle Shutdown of the codec during release().

Bug: 17784012
Bug: 18033275

Change-Id: I891e036499d9b440a57f77fb735a5ba4da9a6e43
/frameworks/av/media/libstagefright/MediaCodec.cpp
115ba24deb7baacdc50fab5b7c673ea589ccb938 11-Oct-2014 Lajos Molnar <lajos@google.com> am 8250b497: am 392730f7: am 6f559515: am a4c3d8f0: Merge "MediaCodec: fix onError and onInputBufferAvailable" into lmp-dev

* commit '8250b4978e1c9f3ceba7e748929d9e126c65eb90':
MediaCodec: fix onError and onInputBufferAvailable
6e029f0ba9a3b421eb7273a095305f7998e9aa5a 10-Oct-2014 Lajos Molnar <lajos@google.com> MediaCodec: fix onError and onInputBufferAvailable

- don't call onInputBufferAvailable if we created an input surface
- keep component name alive if an error occurs

Bug: 17934966
Change-Id: I396c6e6cfd9fa589a1a95c6169492089255e6993
/frameworks/av/media/libstagefright/MediaCodec.cpp
36a7f5b2971f9125e908388113d5e52ddcb8822c 03-Oct-2014 Chong Zhang <chz@google.com> am 9b68037c: am f0d98899: am aaa527fb: Merge "send available codec buffer count with codec notification" into lmp-dev

* commit '9b68037c1f3fcf2a390dd796fb31b1d873fe4bea':
send available codec buffer count with codec notification
e47d44486f0a9f9b828b01d0fbaf84f5573f0aa2 30-Sep-2014 Chong Zhang <chz@google.com> send available codec buffer count with codec notification

Bug: 14679336
Change-Id: Id927c96a9a14dd6ecd72540f0037d5841aa32154
/frameworks/av/media/libstagefright/MediaCodec.cpp
37acc9a2ea028c5dad1c6ea744d6727f6b802501 25-Sep-2014 Lajos Molnar <lajos@google.com> am 3e072400: am f74023f0: Merge "stagefright: return encrypted input buffer for secure codecs" into lmp-dev

* commit '3e07240000ed8df9f77733962850ee4ddbea0c7f':
stagefright: return encrypted input buffer for secure codecs
0837d0ac1b572923a27f1b0b742960fc64a6b162 24-Sep-2014 Lajos Molnar <lajos@google.com> stagefright: return encrypted input buffer for secure codecs

Bug: 17630446
Change-Id: I8a9352bcd00a3f4eb6fd2797d6809a8c1edc8482
/frameworks/av/media/libstagefright/MediaCodec.cpp
bcc1a8299224b35aa2d16cf522d4aa5bcfa1ab60 23-Sep-2014 Andy Hung <hunga@google.com> stagefright: Fix MediaCodec::init() AString name usage.

Change-Id: I7f9fcabafd60cba99af6049dc99b1a457db396c4
/frameworks/av/media/libstagefright/MediaCodec.cpp
1a65cb0463b4456cc1110135bab39e86b86a99ce 23-Sep-2014 Andy Hung <hunga@google.com> am d20940ee: am d7f77cd7: Merge "MediaCodec: Fix deallocated pointer reference when calling reset()" into lmp-dev

* commit 'd20940ee9e9da7495a75569ccc513b4aa3ddc179':
MediaCodec: Fix deallocated pointer reference when calling reset()
dc9f58dc23a86d0635fd8601d1cbc8d47bab0303 18-Sep-2014 Andy Hung <hunga@google.com> MediaCodec: Fix deallocated pointer reference when calling reset()

The name pointer argument in MediaCodec::init() was being
implicitly deallocated.

Bug: 17499622
Change-Id: If9409f95674e52d1478f969f77693c4d27ff1ff2
/frameworks/av/media/libstagefright/MediaCodec.cpp
10713e41173918f2a69a602889c28223a35a6d96 11-Sep-2014 Chong Zhang <chz@google.com> am f2745669: am 74848665: Merge "fix failure in MediaCodecTest#testException" into lmp-dev

* commit 'f2745669be588f8bc8fdb3dea60a12d91f6eb9c9':
fix failure in MediaCodecTest#testException
f64b36deccd473b545dbed22c2feb11fc49157e5 10-Sep-2014 Chong Zhang <chz@google.com> fix failure in MediaCodecTest#testException

reset codec after failed configure()
Bug: 17418876

Change-Id: I21ff8a0751dae6a164678015142e11d481403bed
/frameworks/av/media/libstagefright/MediaCodec.cpp
d299f92796f30d249f08f8bf3bcfe289bc9d3627 02-Sep-2014 Wei Jia <wjia@google.com> am f910a3df: am c9d62de7: Merge "MediaCodec: set state to UNINITIALIZED when receiving fatal error." into lmp-dev

* commit 'f910a3dfeb3fb58c297a37757e28150462fe1e9e':
MediaCodec: set state to UNINITIALIZED when receiving fatal error.
c22c695660ed9edaba0d4cd7c0ab3a794216fe80 29-Aug-2014 Wei Jia <wjia@google.com> MediaCodec: set state to UNINITIALIZED when receiving fatal error.

NuPlayerDecoder: release MediaCodec when handling an error.

Bug: 16661923
Change-Id: I1b6fd7ee5cc1136b3f289135e5360cd3d98f9799
/frameworks/av/media/libstagefright/MediaCodec.cpp
f5dea40eefb085b74ee37a548a51ade2ff10d150 25-Aug-2014 Wei Jia <wjia@google.com> am 211aae92: am 848726d8: Merge "MediaCodec: handle errors during flushing." into lmp-dev

* commit '211aae92d3f48a56f266a2b933d6f53b625098b0':
MediaCodec: handle errors during flushing.
5530f7a7f9dff5280be84f2675b3be081beb5540 20-Aug-2014 Wei Jia <wjia@google.com> MediaCodec: handle errors during flushing.

Bug: 17068327
Bug: 13133027
Change-Id: I06caf79b90ebf55d6d7561cb82516c0b6c66f0e4
/frameworks/av/media/libstagefright/MediaCodec.cpp
744f5739019d1fd917f981e740b353c3d73fd1a8 16-Aug-2014 David Smith <davidas@google.com> stagefright: MediaFilter and SimpleFilter(s)

MediaFilter implements CodecBase and provides video filtering support
via filter modules which extend SimpleFilter.

Bug: 17203044
Change-Id: Ifb30c501e2901c44999d95d7d150e863b2bd06c6
/frameworks/av/media/libstagefright/MediaCodec.cpp
111333eaab12448f45927464c8aeacbbf9a578a1 20-Aug-2014 Marco Nelissen <marcone@google.com> Merge "handle error during flush in MediaPlayer.reset()" into lmp-dev
9e2b7918eb5621b24bd54c922f630da45339de77 19-Aug-2014 Marco Nelissen <marcone@google.com> handle error during flush in MediaPlayer.reset()

If there was an error during the flush phase of a reset, then the
reset would never complete. We now make sure the MediaCodec moves
to the right state in this case, and that NuPlayer cleans up and
resumes the rest of the reset after a failed flush.

Bug: 16955082
Change-Id: Ied61136871a9fcdffcc80647fa2bba64a926ac2a
/frameworks/av/media/libstagefright/MediaCodec.cpp
475da7ef08c05a482ced8d318832cf5aa1141aff 09-Aug-2014 Ronghua Wu <ronghuawu@google.com> stagefright: Fix race condition between MediaCodec and SoftwareRenderer

* Set the buffer's format info when it's returned from OMX component.
* Move frame format meta from SoftwareRenderer's ctor to the render call.
I.e. each frame sent to the renderer carries the format info.
* Reset renderer with the new format instead of re-creating
SoftwareRenderer when incoming frame's format is changed.

Bug: 13842676
Change-Id: Ibab46f109200bcbdeab13a4cc1bcd0870f2a99fb
/frameworks/av/media/libstagefright/MediaCodec.cpp
317bb9163befccd87348c11bdfc0044e629b362b 08-Aug-2014 Andy Hung <hunga@google.com> Merge "Clarify and implement MediaCodec status codes" into lmp-dev
251d4be8aa5ab80bc915a82a2420233bdc62018e 31-Jul-2014 Andy Hung <hunga@google.com> Clarify and implement MediaCodec status codes

Clarify MediaCodec status codes in MediaError.h
When appropriate, return OMX error codes for status.
Optionally return a status code from CreateByType() and
CreateByComponentName().

Bug: 12034929
Bug: 13976475
Change-Id: I7463dd08d101074f730481b26127a69c9186c97e
/frameworks/av/media/libstagefright/MediaCodec.cpp
60b1c0e79d12a1c70758bc8d060156924635f8ba 07-Aug-2014 Lajos Molnar <lajos@google.com> stagefright: rework media codec list and infos

This is in preparation of serving the codec list and codec infos
from the mediaserver

Bug: 11990470
Change-Id: Ib8e2708679c9ce461a4ba179974a740cdcdf2731
/frameworks/av/media/libstagefright/MediaCodec.cpp
0e8cfc36044ba97545e7c9e129b0b3e98eec5089 31-Jul-2014 Lajos Molnar <lajos@google.com> stagefright: MediaCodec async operations.

In async mode:
- codec must be restarted after flush
- dequeueIn/OutputBuffers fail
- getIn/OutputBuffers fail

Bug: 11990118
Change-Id: If2d6a76ab499ee9ed4a11486fb537acbc52e66f6
/frameworks/av/media/libstagefright/MediaCodec.cpp
03c556ae1eb409ad088c49037e185946c54e1d25 25-Jul-2014 Lajos Molnar <lajos@google.com> stagefright: add flexible YUV support

Bug: 10706245
Change-Id: Icd246f22edfc67ed5240d59f5a5bde3e5f749465
/frameworks/av/media/libstagefright/MediaCodec.cpp
2606b10d51c2dceb851a2ea63e803aba4134bf00 22-Jul-2014 Chong Zhang <chz@google.com> update battery stats for video/audio

Bug: 12979595

Change-Id: Iafd93046a4fd9f22bcd66084deace746a7ca5d3c
/frameworks/av/media/libstagefright/MediaCodec.cpp
671160ffe81592efa376dc1ff0fc3f4ddcdebc35 15-Jul-2014 Lajos Molnar <lajos@google.com> stagefright: add MediaCodec.reset()

Bug: 12034929
Change-Id: I326f1356df89474aa088c1c87f8505b33654139d
/frameworks/av/media/libstagefright/MediaCodec.cpp
749dafad09d85f2aaf6902a7ff16b4087e3bc4c7 12-Jul-2014 Chong Zhang <chz@google.com> MediaCodec: change onError cb to return CodecException

Bug: 11990118
Change-Id: I3278aecb20df88c42fa2709a66e6166eb3cbe56f
/frameworks/av/media/libstagefright/MediaCodec.cpp
c5619c7a6dcc1137fde7520351ad5284e3e958ab 09-Jul-2014 Chong Zhang <chz@google.com> MediaCodec async callbacks

Bug: 11990118

Change-Id: I6fe4b407d9c85cddec8d958620d5d356735273cf
/frameworks/av/media/libstagefright/MediaCodec.cpp
7bad72237b49ac47e77ffe2a89fd26f3d171324c 09-Jul-2014 Lajos Molnar <lajos@google.com> stagefright: add indexed buffer and format getters to MediaCodec

These are designed to be called from the same thread as the one
calling dequeue?Buffer, and use a mutex to avoid switching
context. All other calls of MediaCodec are designed to be blocking
and synchronous.

Bug: 14297827
Change-Id: If341c6e4407ca6f10f5e0d47008dddc0e20b0a50
/frameworks/av/media/libstagefright/MediaCodec.cpp
92cd05b8f2e994aabcdda5d7454c96a707dc9579 07-Jul-2014 Lajos Molnar <lajos@google.com> stagefright: update MediaCodec to use CodecBase instead of ACodec

MediaCodec still creates an ACodec instance in init()

Bug: 11784825
Change-Id: Ifba1e1582c788056c0e59afdf68cd3a504ab3679
/frameworks/av/media/libstagefright/MediaCodec.cpp
a5750e0dad9e90f2195ce36f2c4457fa04b2b83e 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> libstagefright: 64-bit compile warnings

Change-Id: I3d1146714fa23be3d4e696599b6f70cac1f9d28b
/frameworks/av/media/libstagefright/MediaCodec.cpp
47aea1f7c58f5302b16822f9e7e1763f2af04ef5 15-May-2014 Lajos Molnar <lajos@google.com> ACodec: remove PTS log spam

Bug: 14976517
Bug: 11784827
Change-Id: Ibc1bbd80e7aac30b0f8f1e9ca2be1bb3e5e2ebbb
/frameworks/av/media/libstagefright/MediaCodec.cpp
609b815a3131d22da38b2f452faa9f89daad4039 02-May-2014 Andy Hung <hunga@google.com> Update OMX messages for 64 bit

Change node_id and buffer_id to uint32_t.
Ensure IOMX messages are fixed size.
Remove 64 bit compile warnings in associated files.

Change-Id: Icdbef00aca575e5dc502ebb52e3ce7d0d7883203
Signed-off-by: Andy Hung <hunga@google.com>
/frameworks/av/media/libstagefright/MediaCodec.cpp
fc7fca77caa12993dd938d5ff43797d781291027 08-May-2014 Lajos Molnar <lajos@google.com> MediaCodec: add renderAndReleaseOutputBuffer() method with timestamp

Bug: 11784827
Change-Id: Ia1dcbd6c1d1a4380db04b750c0eb3fa0bd58d7b4
/frameworks/av/media/libstagefright/MediaCodec.cpp
ec5f7cc4756d389505e761b9d803a1a3a46b64d7 31-Mar-2014 Lajos Molnar <lajos@google.com> MediaCodec: move to UNINITIALIZED state on codec error

ACodec moves to Uninitialized state after receiving codec error.
Make MediaCodec also move to the same state, so stop() and
release() will work correctly.

Bug: 13675112
Change-Id: I1c7e8b274f68345fc0e6a55c70dff6c7a4fb2e72
/frameworks/av/media/libstagefright/MediaCodec.cpp
e0381245dff04aa823a59aa8b85869eddab0f39f 25-Feb-2014 Lajos Molnar <lajos@google.com> MediaCodec: add getInputFormat() method

Additional input-port format item:

int32: "adaptive-playback"
video decoders only
whether codec is configured for adaptive playback. In this case, if
codec has max-width/height limits, those limits are also exposed
(int32: "max-width", "max-height")

Also, getInput/OutputFormat() is now callable in CONFIGURED and
STARTING states, although output format may be missing CSD fields
until INFO_OUTPUT_FORMAT_CHANGED message.

Includes missing OMX support for MP3 software decoder.

Bug: 11785204
Change-Id: I90c7e34ba81c7b81c43641599f3f496e838958c6
/frameworks/av/media/libstagefright/MediaCodec.cpp
84333e0475bc911adc16417f4ca327c975cf6c36 08-Feb-2014 Andreas Huber <andih@google.com> warnings be gone.

Change-Id: Ie3bae3f037730e316d7fca12e7a3527973f752ef
/frameworks/av/media/libstagefright/MediaCodec.cpp
79ee2399b67c7a11042c5904dc1309712a76f8cb 14-Jan-2014 Jianzheng Zhou <jianzheng.zhou@freescale.com> correct one logic error in decide whether should render or not

Change-Id: Ie41663f6fd5a7d983279f14a2228cb57231771bf
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
/frameworks/av/media/libstagefright/MediaCodec.cpp
2922d230155cb1be7acc0c11bef6f0ca0345bdb7 05-Nov-2013 Lajos Molnar <lajos@google.com> am 065789f2: Merge "Restore NuPlayer error and EOS handling" into klp-dev

* commit '065789f24890b0a9f3614dc175e6f7664af1f2ce':
Restore NuPlayer error and EOS handling
7fa015217e618265ff5a844cf6961ecc316c81a4 28-Oct-2013 Lajos Molnar <lajos@google.com> Restore NuPlayer error and EOS handling

This was erroneously removed by commit a73c954

Change-Id: I4742339139e770f0181c99d427875897fd60b68e
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 11413439
/frameworks/av/media/libstagefright/MediaCodec.cpp
a35b4278582175ee7e4082c0e93ddb4a83726f47 25-Sep-2013 Lajos Molnar <lajos@google.com> am 6c63fe0f: am ab70649e: Merge "MediaCodec: Pass the crop rect to SoftwareRenderer"

* commit '6c63fe0fdb33e5e7eb8c89f2420262b072cdd83f':
MediaCodec: Pass the crop rect to SoftwareRenderer
6539f82d55d4457bc84ed23d57967346022c56dc 25-Sep-2013 Martin Storsjo <martin@martin.st> MediaCodec: Pass the crop rect to SoftwareRenderer

Change-Id: I434411516eb5fafe9d7aeac9882bbc7f1a8415d8
/frameworks/av/media/libstagefright/MediaCodec.cpp
6f9439efd2a6004b588605f6a9d4af20c98e8e80 05-Sep-2013 Marco Nelissen <marcone@google.com> Better workaround for slow decoders.

This is more in the spirit of the original code. Now it checks
whether a codec instantiated by name is a video codec, and enables
the extra looper if so.

b/10528409

Change-Id: Ia253c04c1283d4ecf66f213ef4bf523279ad7cca
/frameworks/av/media/libstagefright/MediaCodec.cpp
491211b87dd38357d37ece687cf8795bff8996a5 04-Sep-2013 Marco Nelissen <marcone@google.com> Work around decoder slowness

b/10528409

Change-Id: Ifcaf0488d63e87676b1e9382437943138deb76a6
/frameworks/av/media/libstagefright/MediaCodec.cpp
6aade6058521b0dbd35a9a4620f4d04f02f90444 09-May-2013 Marco Nelissen <marcone@google.com> Don't render buffers that have size 0

b/8857451

Change-Id: I12a31a2f85af76602db9e6f0ec80632954b3f7ed
/frameworks/av/media/libstagefright/MediaCodec.cpp
b6ac8e2ce3574160714fd3c0c6d6b5fbf6c8eeab 09-May-2013 Marco Nelissen <marcone@google.com> Don't render buffers that have size 0

b/8857451

Change-Id: I12a31a2f85af76602db9e6f0ec80632954b3f7ed
/frameworks/av/media/libstagefright/MediaCodec.cpp
e96ee699aca0f711d41e6c0833e5de2341c4a36d 01-May-2013 Andreas Huber <andih@google.com> Support MediaCodec::getOutputFormat for encoders

codec specific data is provided as part of the MediaFormat if available.

Change-Id: I5a79c936e2411fe66ebc694791071faefc33941e
related-to-bug: 8616651
/frameworks/av/media/libstagefright/MediaCodec.cpp
cd4ac42ed448f1cb286ca4c3c7ea64621adf9d42 01-May-2013 Andreas Huber <andih@google.com> Support MediaCodec::getOutputFormat for encoders

codec specific data is provided as part of the MediaFormat if available.

Change-Id: I5a79c936e2411fe66ebc694791071faefc33941e
related-to-bug: 8616651
/frameworks/av/media/libstagefright/MediaCodec.cpp
aa7f97bb9c70176245ffb7ed0ce52bee6c1a57d7 19-Apr-2013 Andreas Huber <andih@google.com> 3rd time's the charm, right? Fix another instance where MediaCodec would

not return from a stop() or release() call if mediaserver dies at just the right
moment.

Change-Id: I7728f8df82d62602d4d272f8023aa88678dd7d95
related-to-bug: 8397711
/frameworks/av/media/libstagefright/MediaCodec.cpp
6b5d15099579c179d8e7531bb5abfb272614513a 19-Apr-2013 Andreas Huber <andih@google.com> 3rd time's the charm, right? Fix another instance where MediaCodec would

not return from a stop() or release() call if mediaserver dies at just the right
moment.

Change-Id: I7728f8df82d62602d4d272f8023aa88678dd7d95
related-to-bug: 8397711
/frameworks/av/media/libstagefright/MediaCodec.cpp
03ddaec84b65157af1dbf022a72de778dc59a63e 18-Apr-2013 Andreas Huber <andih@google.com> Make sure MediaCodec::stop() and MediaCodec::release() still return

instead of blocking indefinitely if the mediaserver died while the call
is pending.

Change-Id: If2789b7fe99634d947ce4a3bb69c04baff5f8b10
related-to-bug: 8397711
/frameworks/av/media/libstagefright/MediaCodec.cpp
815dd298dc903606181afee3aec23e9cee629e8f 18-Apr-2013 Andreas Huber <andih@google.com> Make sure MediaCodec::stop() and MediaCodec::release() still return

instead of blocking indefinitely if the mediaserver died while the call
is pending.

Change-Id: If2789b7fe99634d947ce4a3bb69c04baff5f8b10
related-to-bug: 8397711
/frameworks/av/media/libstagefright/MediaCodec.cpp
6507d14c6d10f93d390de62b9eed267f9b544985 05-Mar-2013 Andy McFadden <fadden@android.com> Correct MediaCodec + Surface behavior

Assorted tweaks:
- Allow signalEndOfInputStream() before ACodec is in Executing
state (added message to two more states).
- Return an error if signalEndOfInputStream() is called a second
time on the same stream.
- Require AndroidOpaque color format in createInputSurface().
- Disallow dequeueInputBuffer() after an input surface has been
created (boolean flag in MediaCodec tracks it).
- Discard input surface when encoder is re-configure()ed (drop
OMXNodeInstance's ref when we go back to Loaded).

Bug 7991062

Change-Id: Iff30f3036e14eb5a2f6536910dcf11aba33031ee
/frameworks/av/media/libstagefright/MediaCodec.cpp
ba6218eae3dbcf3f962b3561b26374a214dbf5e2 05-Mar-2013 Andy McFadden <fadden@android.com> Correct MediaCodec + Surface behavior

Assorted tweaks:
- Allow signalEndOfInputStream() before ACodec is in Executing
state (added message to two more states).
- Return an error if signalEndOfInputStream() is called a second
time on the same stream.
- Require AndroidOpaque color format in createInputSurface().
- Disallow dequeueInputBuffer() after an input surface has been
created (boolean flag in MediaCodec tracks it).
- Discard input surface when encoder is re-configure()ed (drop
OMXNodeInstance's ref when we go back to Loaded).

Bug 7991062

Change-Id: Iff30f3036e14eb5a2f6536910dcf11aba33031ee
/frameworks/av/media/libstagefright/MediaCodec.cpp
7cd58537932ef6f481f68be0b9c597a89cebdfec 19-Feb-2013 Andy McFadden <fadden@android.com> Implement Surface input to MediaCodec.

Also, renamed a CHECK_INTERFACE macro that was clashing with the
Binder version.

Bug 7991062

Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0
/frameworks/av/media/libstagefright/MediaCodec.cpp
f779bb50d9746d9526541c3e6dcdf619cac941b7 19-Feb-2013 Andy McFadden <fadden@android.com> Implement Surface input to MediaCodec.

Also, renamed a CHECK_INTERFACE macro that was clashing with the
Binder version.

Bug 7991062

Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0
/frameworks/av/media/libstagefright/MediaCodec.cpp
1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
/frameworks/av/media/libstagefright/MediaCodec.cpp
b1e7cd156ca3e1747374e0d20cdd1ce467210453 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
/frameworks/av/media/libstagefright/MediaCodec.cpp
a2eb22c1de262aa3fa7c356537ac2fe165afdf3d 07-Feb-2013 Andreas Huber <andih@google.com> Allow for dynamic reconfiguration of the video bitrate used

to encode video while running as a wfd source.

Change-Id: I44f7b2350c88fc5807047c61bfe594ef8fa79275
/frameworks/av/media/libstagefright/MediaCodec.cpp
c71601c3b1dd63afc9be462194809813e4dbacf1 07-Feb-2013 Andreas Huber <andih@google.com> Allow for dynamic reconfiguration of the video bitrate used

to encode video while running as a wfd source.

Change-Id: I44f7b2350c88fc5807047c61bfe594ef8fa79275
/frameworks/av/media/libstagefright/MediaCodec.cpp
717fd3d4328abf524978ce9c125ab8ae8d6bffad 25-Sep-2012 Martin Storsjo <martin@martin.st> MediaCodec: Add a method for getting the component name

If the codec was chosen based on mime type, the caller does
not know what component actually was chosen. This allows
getting essential information (such as supported color formats,
for a video encoder) for this component.

Change-Id: Ie471f40f8104b37d27ced3dba5a54facc6504b1b
/frameworks/av/media/libstagefright/MediaCodec.cpp
8601efe463bf3331fa2a389ee13db25f21d28eb9 25-Sep-2012 Martin Storsjo <martin@martin.st> MediaCodec: Add a method for getting the component name

If the codec was chosen based on mime type, the caller does
not know what component actually was chosen. This allows
getting essential information (such as supported color formats,
for a video encoder) for this component.

Change-Id: Ie471f40f8104b37d27ced3dba5a54facc6504b1b
/frameworks/av/media/libstagefright/MediaCodec.cpp
575a5361fc970476cd7979638ee3ac00cc6e5024 03-Oct-2012 Andreas Huber <andih@google.com> Better power savings with wifi display code.

No more polling the encoder for work to do, the encoder instead notifies
if there's activity.

Change-Id: Ia707211b4f5c5a6e6b70d750233d204a2d6bb778
related-to-bug: 7248248
/frameworks/av/media/libstagefright/MediaCodec.cpp
72c6686ad04feb976ea3d2f816c784e485b55506 03-Oct-2012 Andreas Huber <andih@google.com> Better power savings with wifi display code.

No more polling the encoder for work to do, the encoder instead notifies
if there's activity.

Change-Id: Ia707211b4f5c5a6e6b70d750233d204a2d6bb778
related-to-bug: 7248248
/frameworks/av/media/libstagefright/MediaCodec.cpp
496238cc7551d414067dcbbb4fe3bd801f205f95 14-Sep-2012 Andreas Huber <andih@google.com> Support IDR requests in wifi display, MediaCodec and ACodec.

Change-Id: I596cf8dd61b63465437f78413186fad2be287244
/frameworks/av/media/libstagefright/MediaCodec.cpp
03e2ffa64470eec4e886614a4fa4facbae58a862 14-Sep-2012 Andreas Huber <andih@google.com> Support IDR requests in wifi display, MediaCodec and ACodec.

Change-Id: I596cf8dd61b63465437f78413186fad2be287244
/frameworks/av/media/libstagefright/MediaCodec.cpp
972f2321583ef4094477271e0fc6a1d05a1a0eea 12-Jul-2012 Martin Storsjo <martin@martin.st> mediacodec: Return an error on getOutputFormat if there is no output format yet

This avoids crashing if calling the public java method
MediaCodec.getOutputFormat immediately after MediaCodec.start
(as the documentation example shows that one should do!).

Change-Id: Icd3dd7ab9ae9e8f2a67cef171ff176735de95f58
/frameworks/av/media/libstagefright/MediaCodec.cpp
fa2b8f243eb048fb2b8e5a14356190f69eb31a36 11-Jul-2012 Edwin Wong <edwinwong@google.com> Fixed sample video corrupted in MediaCodec mode.

Change-Id: I50c5660072d40f6e297e58fd026ea04c89d6a70a
related-to-bug: 6732061
/frameworks/av/media/libstagefright/MediaCodec.cpp
eb61431af13741aa8b7e57a39f69bba5a6c190dc 11-May-2012 Andreas Huber <andih@google.com> Increase AAC software decoder's buffer count. Refactor how clients

of ACodec get notified about codec buffers and buffer ids.

Change-Id: I962f873262dae7aa7b43f5f68a6d60268282f91e
related-to-bug: 6478823
/frameworks/av/media/libstagefright/MediaCodec.cpp
7541ff5d83a3e77cb533841a0326a241550b95d9 10-May-2012 Andreas Huber <andih@google.com> Properly connect/disconnect to/from the native window in MediaCodec.

Change-Id: Ib5bf90a3b81fca8ff2346235bc28a2bd0bc7bfb1
related-to-bug: 6472161
/frameworks/av/media/libstagefright/MediaCodec.cpp
8ee516a515c70a492c395b67ce12e19e7d159804 08-May-2012 Andreas Huber <andih@google.com> Submit codec specific data automatically

if it is contained in the format passed to MediaCodec::configure.

Change-Id: I8ef6755e8389ec47b44a9c70904ea6c03a00f4f2
related-to-bug: 6364139
/frameworks/av/media/libstagefright/MediaCodec.cpp
5b8987e7de9d04b09153f329c680d2316cdb44ec 19-Apr-2012 Andreas Huber <andih@google.com> Allow propagation of error information and description from the CryptoPlugin to

the higher layers.

Change-Id: I9f434ad55cdf575803c208bedf47b607baff2330
related-to-bug: 6365261
/frameworks/av/media/libstagefright/MediaCodec.cpp
4b75a9c8b93a90749bc5d22912ad0d96c12f4ecf 06-Apr-2012 Andreas Huber <andih@google.com> New API to support submitting encrypted buffers to the decoder.

Change-Id: I69dd60e43078c4211c6123cf6e0ce90e676bf873
related-to-bug: 6275919
/frameworks/av/media/libstagefright/MediaCodec.cpp
1bd139a2a68690e80398b70b27ca59550fea0e65 03-Apr-2012 Andreas Huber <andih@google.com> New Crypto services talking to the new crypto "HAL".

Change-Id: I69ed31e7a8b4d69d1209d2d516f94d258f072566
related-to-bug: 6275919
/frameworks/av/media/libstagefright/MediaCodec.cpp
ed3e3e046840d5bf1ca84a8c0cc097425e89d6d6 26-Mar-2012 Andreas Huber <andih@google.com> Provisional support for secure decryption of media streams.

Change-Id: Ib3982a9c960bfdb0cb7e1b174440b141b194cfbe
/frameworks/av/media/libstagefright/MediaCodec.cpp
c95c2ddcdfc974f42408a377fbe2de51b94a8c94 29-Feb-2012 Andreas Huber <andih@google.com> Separate the notion of "stop" from that of "release", i.e.

stop - means transition back to LOADED state and keeping the component
instance allocated.

release - means we get rid of the component completely.

Change-Id: I40ad01ce70821faaad43f57999249904f9144924
/frameworks/av/media/libstagefright/MediaCodec.cpp
7fb5e8832f582ec515550696e9dabc3a8d9de14d 24-Feb-2012 Andreas Huber <andih@google.com> Merge "Make sure we return input/output buffers to the codec not just while"
8b2a453ab6698eae4560389c6e8f6ecab2643218 24-Feb-2012 Andreas Huber <andih@google.com> Make sure we return input/output buffers to the codec not just while

flushing but also while stopping.

Change-Id: I23534008b93654c9b9c022c0b1d204c2b546d566
/frameworks/av/media/libstagefright/MediaCodec.cpp
0db280176bd3277e3256252d063f3712b1905ba9 24-Feb-2012 Andreas Huber <andih@google.com> Small fix to MediaCodec

Change-Id: I6bcbfd35fdf5a2b0260b8f07a630a5b380e139a0
/frameworks/av/media/libstagefright/MediaCodec.cpp
2d8bedd05437b6fccdbc6bf70f673ffd86744d59 21-Feb-2012 Andreas Huber <andih@google.com> Add new APIs AMessage::(set|find)Buffer to make it safer to pass

ABuffer objects through messages.

Change-Id: I9f8b4e4c4767d0d70a0105e0c0813b754379b49d
/frameworks/av/media/libstagefright/MediaCodec.cpp
5778822d86b0337407514b9372562b86edfa91cd 21-Feb-2012 Andreas Huber <andih@google.com> Implementation of a java media codec interface and associated tools.

Change-Id: I13e54062d4de584355c5d82bb027a68aeaf2923b
/frameworks/av/media/libstagefright/MediaCodec.cpp