History log of /frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
331207d51a620bf018081950da4b20133014657f 09-May-2017 Chong Zhang <chz@google.com> stagefright: lock mLock in codecBufferFilled

The locking is to protect mOriginalTimeUs, adding to which is done
in emptyBuffer under mLock.

bug: 38111548
Change-Id: If7853e3fe50c68279ee5d74373b53bc34bd56cfd
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
0de04e850beced076e4b1fcf0e513255f62a7d85 12-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove setQuirks() from IOMXNode and IOmxNode." into oc-dev
81b554b04c93aebf3e74116330024272770d2967 28-Mar-2017 Marco Nelissen <marcone@google.com> Don't allow using or allocating a buffer after the first state transition

Bug: 35467458
Change-Id: Ia76c8cec8ad2abb95ca29b2a89075f7acab4b174
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
6ed07dc02d4240f94e7fb0786fb263bdc7a610ba 05-Apr-2017 Pawin Vongmasa <pawin@google.com> Remove setQuirks() from IOMXNode and IOmxNode.

Test: Media post-submit tests on Pixel phone.
Test: Manual use of Camera, Photos, Play Movies and YouTube apps.
Bug: 36952714
Change-Id: I230df51c2d658e29cffec369ba622e336c3402d2
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
2c8fec10807dc50c2d65d250e7a9157580f7094c 05-Apr-2017 Robert Shih <robertshih@google.com> omx node: patch err code to preserve API contract

Bug: 36789323
Change-Id: Ie1d8dde5e4df8f5f4061cba7b20e1732b1466235
Test: adb shell am instrument -e size small \
-w android.media.cts/android.support.test.runner.AndroidJUnitRunner
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
8a21c0191f974a0b9cbd5818052e2655e0aaa306 26-Dec-2016 Pawin Vongmasa <pawin@google.com> Modify ACodec to allow using Treble.

ACodec will connect to the Treble version of Omx if the property
"debug.treble_omx" is set to true ("1", "y", "yes", "true" or "on").

Also, fix some bugs found so far.

Test: Compiles
Bug: 31399200
Change-Id: I52b27b5f99bc1d6797d3b83b8be794ed2de9956a
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
f62ea8018813951e8f6a182880cadb3217e4ce37 19-Dec-2016 Pawin Vongmasa <pawin@google.com> Use HIDL's memory in CodecBuffer and add wrapper classes for
IOmxBufferProducer and IOmxProducerListener.

Test: Compiles
Bug: 31399200
Change-Id: Ia09973ee7b25120bc35cff02b1409f33b28a4b4e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
3e378967b379afcd559b53d70d00e758f9c2616d 05-Jan-2017 Wonsik Kim <wonsik@google.com> stagefright: fix unreleased OMX handle

- Ensure OMX handle is freed even if binder death notification comes
first.
- Add DeathRecipient in ResourceManagerService so that it could
handle dead clients properly.

Fix: 28824626
Fix: 34252788
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: Ifc441a2771b5674749ff65a4520177dda115b292
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
49b2b4d30a0f74314630a5ea5f0e59697d90443e 12-Jan-2017 Chong Zhang <chz@google.com> stagefright: add rangeOffset to OMXBuffer

bug: 31399200
bug: 22804304

Change-Id: I0ac9a7ee684067d40a26135ab26ebd3de3a2f06d
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
ba1dbe6e1fbb77a6b52549d42402d0ebf7c01c59 02-Dec-2016 Marco Nelissen <marcone@google.com> Merge "Use property_get_bool where possible"
96626b7f9a4e5c9e1e04f7f710383631d1470364 01-Dec-2016 Marco Nelissen <marcone@google.com> Use property_get_bool where possible

Make handling of boolean properties more readable and consistent by
using property_get_bool instead of parsing the result of property_get

Change-Id: I8490d0f0b41a92eab5131e0aac0ecdf704a63381
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d3ed3883c2d7bf3fb871be512055ed72cea964da 01-Dec-2016 Pawin Vongmasa <pawin@google.com> Decouple OMX from OMXNodeInstance.

OMXNodeInstance has a member named mOwner, which is a reference to OMX.
Since Treble conversion would replace OMX with a new class (to be named Omx),
mOwner should have a type that is different from OMX. Fortunately, the
only use of mOwner in OMXNodeInstance is to call freeNode(). This CL
introduces OMXNodeOwner, an abstract class that has freeNode() as the only
function, and changes the type of mOwner to OMXNodeOwner. This way,
OMXNodeInstance can work with both OMX and Omx.

Test: adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 31399200

Change-Id: Ia2d07a48aa94da8378fd36e55244a7e7817a5f42
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d02c08671d666e12a94bcadd943787a9ab2ceea8 13-Oct-2016 Chong Zhang <chz@google.com> IOMX: add API for setPortMode

- Add setPortMode to centralize port mode configuration

- Remove storeMetaDataInBuffers and enableNativeBuffers. These are
no longer exposed to the client. Metadata mode and native/secure
buffer mode will be enabled by OMX as needed by the port mode.

- Move handling of legacy adpative experiment (legacy metadata mode)
to OMX side. Legacy mode will now appear the same as non-metadata
mode to client.

bug: 31399200

Change-Id: Iaf33bd7c30fab4acbc19e9fb8c19e322f9b4a0a0
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
3fd200feb657c157125e45e30c2a7262e3c0244d 08-Oct-2016 Chong Zhang <chz@google.com> IOMX: consolidate buffer passing on IOMX

- Use OMXBuffer to parcel different buffer types.

- Only leave one useBuffer, emptyBuffer and fillBuffer.

- Remove the update metadata calls.

bug: 31399200
Change-Id: I307e59415c3c5be61772210431bd8225ce6b75a3
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
3604cb1a5548694393c7b7a87191eb517bebaa47 10-Oct-2016 Chong Zhang <chz@google.com> IOMX: move max pts gap handling to OMX

bug: 31399200

Change-Id: I52177d6826caeedf670ecf3e6d0ff85d0e3bf1df
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
ecc97eb44a0675974fcf43b0c68edaaa539d2996 13-Oct-2016 Chong Zhang <chz@google.com> IOMX: do not allocate if output port is in metadata mode

We used to always use useBuffer() for output meta. If we let
the component allocate, some components (eg. secure decoder)
could give us a buffer that we can't update.

bug: 32136559
Change-Id: I1eefe5cbde2d0b1944ff3e72e31663693f6c1fdb
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.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/omx/OMXNodeInstance.cpp
21b46588d022d0c22d7c7c08e919d7a9c5cd76e3 04-Oct-2016 Chong Zhang <chz@google.com> IOMX: remove allocateBufferWithBackup

Only keep useBuffer. Pass in quirks requirement for now, once
we have access to MediaCodecList XML info in OMX, we can remove
the quirks from IOMX.

Also remove a few unused variables on BufferMeta.

bug: 31399200
Change-Id: I93bef964ce034d4aeb1f5d13a75f130108e4e648
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
7dcc5f394b17238f2ae1a9c59f34664d3ad085e7 05-Oct-2016 Chong Zhang <chz@google.com> IOMX: remove getState() and livesLocally()

These are no longer used.

bug: 31399200

Change-Id: Ic61e8c7fa016ccd038e2b2427ccb08b78af34245
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d59b97223424a3974d2ac31cff998d02eecf2eed 21-Sep-2016 Chong Zhang <chz@google.com> IOMX: separate node interface from IOMX

- Separate node interface from IOMX. Client allocates the
node through IOMX, and once it has the node interface,
it can interact with the node directly. There is no need
to go through IOMX and refer to the node by id.

- Simplify OMX, remove id-to-instance mapping on server
side, and move the callback dispatch into node instance
(as dispatcher is per-node).

- Keep track of node generation on client side to ensure
that message handling ignores messages directed at an
expired node.

- Remove MuxOMX, always use IOMX from media.codec.

- Minor whitespace reformatting.

bug: 31399200

Change-Id: I8aef6ec1fa5aba861da7d121960ed2974a963d81
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.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/omx/OMXNodeInstance.cpp
e20d91ebf23df23b7ed213487af64431d4617e0c 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component am: ea76573aa2 am: 86d9bb9141 am: dfe5b5193c am: b308b1a5d9 am: 87415a74ee am: 130eb563b8 am: 106a9050b9 am: 53de578e88 am: 295244de61 am: 17b0bdf4e8 am: ea65b73f84 am: 58bb33f447 am: 6d50452127
am: b572e4adb8

Change-Id: Ieea0a3c8b54d606bea1d2e0fa99b58de552bc6d3
b572e4adb8f7645990406e05da3b76ad3d0c0b44 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component am: ea76573aa2 am: 86d9bb9141 am: dfe5b5193c am: b308b1a5d9 am: 87415a74ee am: 130eb563b8 am: 106a9050b9 am: 53de578e88 am: 295244de61 am: 17b0bdf4e8 am: ea65b73f84 am: 58bb33f447
am: 6d50452127

Change-Id: I5ccff32fda63c26a2163d9ca5f471d1644330684
6d50452127e736319204f70976982d2b1772fce3 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component am: ea76573aa2 am: 86d9bb9141 am: dfe5b5193c am: b308b1a5d9 am: 87415a74ee am: 130eb563b8 am: 106a9050b9 am: 53de578e88 am: 295244de61 am: 17b0bdf4e8 am: ea65b73f84
am: 58bb33f447

Change-Id: Ic92e8fbc87ce94f03a4eaa84fc7676cb5b8f4282
58bb33f447c1a6fd1e64de399f177e6875b2c90d 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component am: ea76573aa2 am: 86d9bb9141 am: dfe5b5193c am: b308b1a5d9 am: 87415a74ee am: 130eb563b8 am: 106a9050b9 am: 53de578e88 am: 295244de61 am: 17b0bdf4e8
am: ea65b73f84

Change-Id: Ib5c4248b350758a4fdb097dfbf15ab66ae976f19
53de578e884f12d45eef09312ac51c30d68e079a 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component am: ea76573aa2 am: 86d9bb9141 am: dfe5b5193c am: b308b1a5d9 am: 87415a74ee am: 130eb563b8
am: 106a9050b9

Change-Id: Id244e1a1872462d64da300c0c461ee939a8f1f76
106a9050b939c99c62d80489e3167a04512bf95e 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component am: ea76573aa2 am: 86d9bb9141 am: dfe5b5193c am: b308b1a5d9 am: 87415a74ee
am: 130eb563b8

Change-Id: I8a6ee92a0077102d93f6c9e82b5f439f99e4749c
87415a74ee6ce2618b036a4dcee6015956b072d7 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component am: ea76573aa2 am: 86d9bb9141 am: dfe5b5193c
am: b308b1a5d9

Change-Id: I502080e16a7543aac4b6720283f27b365bac8d52
b308b1a5d95a03d45cf8bfaf4f35debd398f3c20 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component am: ea76573aa2 am: 86d9bb9141
am: dfe5b5193c

Change-Id: Ibd28b74deb652eb61b08e933a5e288d145841a14
ea76573aa276f51950007217a97903c4fe64f685 20-Sep-2016 Chong Zhang <chz@google.com> IOMX: do not clear buffer if it's allocated by component

The component might depends on their buffers to be initialized
in certain ways to work. Don't clear unless we're allocating it.

bug: 31586647
Change-Id: Ia0a125797e414998ef0cd8ce03672f5b1e0bbf7a
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d5d60f642d1d2620b120ca46b1d409007f494321 19-Sep-2016 Lajos Molnar <lajos@google.com> fix build

Revert incorrectly merged f8a4cb410115045278f534e54b41ac78d6bf6c07.
Merge 7c3c2fa3e233c656fc8c2fc2a6634b3ecf8a23e8 instead.

Keep fixes to these that were merged in since then.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
7dc9a2cb91daedbc4a8ed8d5ba82a18ac9203fbf 16-Sep-2016 Wei Jia <wjia@google.com> OMXNodeInstance: sanity check portIndex. am: f80a1f5075 am: 42f2e3d01d
am: d6743b21c9

Change-Id: Ifc05bd88225a33d8bf40251d01f490ac5dde2a5b
d6743b21c990d4e7d006a02b13ee95a7d301b4c0 16-Sep-2016 Wei Jia <wjia@google.com> OMXNodeInstance: sanity check portIndex. am: f80a1f5075
am: 42f2e3d01d

Change-Id: Ib44a8e7f31f97c26de070fbf0f2bb85ad58f3c1f
42f2e3d01d1dac5d698bfd5e12c264ec3f4ddcfc 16-Sep-2016 Wei Jia <wjia@google.com> OMXNodeInstance: sanity check portIndex.
am: f80a1f5075

Change-Id: Ia03a18d6aaa65bd40cdcf008bc40ea7013345fb0
0d12304082da254f6165a4edddc573d03dfa9b8a 16-Sep-2016 Wei Jia <wjia@google.com> Merge "OMXNodeInstance: sanity check portIndex." into nyc-dev
0520fa2f690f26d392c716af5863b657e4faadc7 16-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state am: c13904014b am: 99accf6cdc am: 9a565c52b0 am: daa3b8e3fa am: c47a0e4c71
am: 1f05c699bd

Change-Id: I9bd9cbf1623de997afddaff4503bc639b6fd158f
c47a0e4c71e87e73613f3f9ed49b21a3320ad676 16-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state am: c13904014b am: 99accf6cdc am: 9a565c52b0
am: daa3b8e3fa

Change-Id: I163ffc7bb0b794af540653614be05abfe2fb828e
daa3b8e3fae616a73c2087d657a2f2a8afcec62f 16-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state am: c13904014b am: 99accf6cdc
am: 9a565c52b0

Change-Id: If2465b5f16cc58d5d0d7cda3e117ad863dafd479
fb735e250be26a235ddeb9a0e3db36bef4c7adc1 16-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state am: e03b22839d am: 66b557b3a2 am: 59ae56a5ba am: 860a1a25b5
am: 173bf42e3c

Change-Id: I1a8b2aab0bbc473e044ebd576056e55aacc0b679
173bf42e3ca7d1875f9c07d252ecf4dd12e5970e 16-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state am: e03b22839d am: 66b557b3a2 am: 59ae56a5ba
am: 860a1a25b5

Change-Id: I619d6cc0b70dc597796afe2c597e44c64e8f8bc3
c8a2fd3fe2dc649b9aefe6f69b3fbc5ee36dbf5c 15-Sep-2016 Lajos Molnar <lajos@google.com> Merge commit '534bb6132a6a664f90b42b3ef81298b42efb3dc2' into HEAD
1658f22ef0f4e4ae5640d2474fc138dab4a84844 02-Aug-2016 Lajos Molnar <lajos@google.com> IOMX: work against metadata buffer spoofing

- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Do not share metadata mode buffers cross process.
- Disallow setting up metadata mode/tunneling/input surface
after first sendCommand.
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.

Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
3a8eaeec94e305334e5f4a0000f7e56eb547a482 15-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: do not convert ANWB to gralloc source in emptyBuffer am: 534bb6132a am: c695faf1de am: 6f04c53ef5 am: 69e38e79a9
am: 424dea98b4

Change-Id: Icc3b89cb979d775980b8cd1978a344f6e59bced3
424dea98b4c42961471fdf7ffb2329e8170b517d 15-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: do not convert ANWB to gralloc source in emptyBuffer am: 534bb6132a am: c695faf1de am: 6f04c53ef5
am: 69e38e79a9

Change-Id: I9b3d9b950049eb895e3063adf5fe8e47395bc779
f80a1f5075a7c6e1982d37c68bfed7c9a611bb20 14-Sep-2016 Wei Jia <wjia@google.com> OMXNodeInstance: sanity check portIndex.

Bug: 31385713
Change-Id: Ib91d00eb5cc8c51c84d37f5d36d6b7ca594d201f
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
6f04c53ef5447ea48cc3e7e722e857ef5bc00457 15-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: do not convert ANWB to gralloc source in emptyBuffer am: 534bb6132a
am: c695faf1de

Change-Id: Icd3f99383bb6abede6a18bbdc489bc307c14c550
c695faf1dea6888b805d4a1ab10411d1d52a8fbc 15-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: do not convert ANWB to gralloc source in emptyBuffer
am: 534bb6132a

Change-Id: Icf260f16e4edb7467ad8e96ff67c3709c2a27e28
7ef56575285409728278b0eda07c025ee5c5e217 14-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state am: 6392ae13cf am: bb79fb6b49
am: 523227eb02

Change-Id: I989937c02d4a167dcfb19e040d1a7fa177883536
523227eb0209060ab551b661e95a22e415d24930 14-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state am: 6392ae13cf
am: bb79fb6b49

Change-Id: I7e453a4c74d9ee3cdcbb1892f93ff2e258cd42de
e03b22839d78c841ce0a1a0a1ee1960932188b0b 14-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state

This was disallowed recently but we still use it as MediaCodcec.stop
only goes to loaded state, and does not free component.

Bug: 31450460
Change-Id: I72e092e4e55c9f23b1baee3e950d76e84a5ef28d
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
087ff38490016f4a0b6a1e717ae8af781d9b750c 12-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: restrict conversion of ANWB to gralloc source in emptyBuffer

This is only allowed in-process (if backup and codec buffers are
connected.)

Bug: 29422020
Bug: 31412859
Change-Id: If48e3e0b6f1af99a459fdc3f6f03744bbf0dc375
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
c13904014bfeb56b8a3cc372190bb3a2dd8f1e0d 14-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state

This was disallowed recently but we still use it as MediaCodcec.stop
only goes to loaded state, and does not free component.

Bug: 31450460
Change-Id: I72e092e4e55c9f23b1baee3e950d76e84a5ef28d
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
6392ae13cf6e15c706fce45396ec1e79af6171a9 14-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: allow configuration after going to loaded state

This was disallowed recently but we still use it as MediaCodcec.stop
only goes to loaded state, and does not free component.

Bug: 31450460
Change-Id: I72e092e4e55c9f23b1baee3e950d76e84a5ef28d
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
534bb6132a6a664f90b42b3ef81298b42efb3dc2 12-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: do not convert ANWB to gralloc source in emptyBuffer

Bug: 29422020
Bug: 31412859
Change-Id: If48e3e0b6f1af99a459fdc3f6f03744bbf0dc375
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
09fcc862f226df509cde12923d92cf6db53c4108 09-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "stagefright: remove OMXNodeInstance usage from GraphicBufferSource"
6cf9a1238986880536de705255f7c2c91c1ba719 09-Sep-2016 Chong Zhang <chz@google.com> stagefright: remove OMXNodeInstance usage from GraphicBufferSource

This is a preliminary to separate GraphicBufferSource from IOMX.

- Use IOMX instead of internal OMXNodeInstance.

- Keep track of codec buffers by buffer_id, do not write to the
OMX buffer headers directly

- Upon data space change, notify IOMX to handle it

bug: 31399200

Change-Id: I86534d7602294f70da582457b5af2eb9b6a58eda
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
71aba39b8767de04e35b3366a6413928f50582f0 09-Sep-2016 Lajos Molnar <lajos@google.com> resolve merge conflicts of 35514a3 to nyc-mr1-dev-plus-aosp

Change-Id: Id8987a560a26cd02b6ec51be72dd0914f451d800
61bb7a0d99bcacac5ae4ea2171add8d4dd9ea459 09-Sep-2016 Lajos Molnar <lajos@google.com> DO NOT MERGE: IOMX: work against metadata buffer spoofing am: 9a4768f7bf
am: da3cba194b

Change-Id: I018340e57d237e4d36d68e2cd118336242447b9c
beb7008c2e6c8ee71b5e5aaf101990ea52a67da1 09-Sep-2016 Wonsik Kim <wonsik@google.com> DO NOT MERGE omx: check buffer port before using am: 0e2cc67785
am: 5dd07a6ef3

Change-Id: I3b95ef380f380dac23aaf97be96630ca8bef552c
6e076c0600ece3819d03819f2a7336654e995626 09-Sep-2016 Lajos Molnar <lajos@google.com> DO NOT MERGE: IOMX: work against metadata buffer spoofing
am: 7c3c2fa3e2

Change-Id: Ia4570bec9d092566ab437e46c4030b739160d82e
35514a3f80f9c83529f454343b7bc405ccab6ba1 09-Sep-2016 Lajos Molnar <lajos@google.com> IOMX: work against metadata buffer spoofing
am: d32d4030c3

Change-Id: I828a193e45fcf9c5d0ea689b964ece082ad06e43
01b589c3e1976672dc9106d17c6e0095915082be 09-Sep-2016 Lajos Molnar <lajos@google.com> Merge "IOMX: work against metadata buffer spoofing" into nyc-mr1-dev
fcf7cf78bc0abc61b86ccb08fb3391f560143ad2 30-Aug-2016 Hangyu Kuang <hkuang@google.com> media: Move video buffer timestamp adjustment from CodecSource to GraphicBufferSource.

Bug:31158120
Bug:30919939
Change-Id: I7c1b626eee8512dac691b03309f724b3351e6e2f
(cherry picked from commit 61fcfd1b0b58dff9284ede8dc49749ca7395856d)
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
3dfe842f35e2ee752f5b5b860d63b00863ad6179 02-Sep-2016 Hangyu Kuang <hkuang@google.com> media: Move video buffer timestamp adjustment from CodecSource to GraphicBufferSource. am: 61fcfd1b0b
am: 5ed707356a

Change-Id: I9e779e5de2d108a5b0c66c80d0613a3bdaf7fa6e
61fcfd1b0b58dff9284ede8dc49749ca7395856d 30-Aug-2016 Hangyu Kuang <hkuang@google.com> media: Move video buffer timestamp adjustment from CodecSource to GraphicBufferSource.

Bug:30919939
Change-Id: I7c1b626eee8512dac691b03309f724b3351e6e2f
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
7c3c2fa3e233c656fc8c2fc2a6634b3ecf8a23e8 02-Aug-2016 Lajos Molnar <lajos@google.com> DO NOT MERGE: IOMX: work against metadata buffer spoofing

- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Use a backup buffer for metadata mode buffers and do not directly
share with clients.
- Disallow setting up metadata mode/tunneling/input surface
after first sendCommand.
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.

Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d32d4030c3778b7947c08e9be7d38c229d8d555d 02-Aug-2016 Lajos Molnar <lajos@google.com> IOMX: work against metadata buffer spoofing

- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Use a backup buffer for metadata mode buffers and do not directly
share with clients.
- Disallow setting up metadata mode/tunneling/input surface
after first sendCommand.
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.

Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
9a4768f7bfcd4654f93ad9b22eff87df493a9d5e 02-Aug-2016 Lajos Molnar <lajos@google.com> DO NOT MERGE: IOMX: work against metadata buffer spoofing

- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Do not share metadata mode buffers cross process.
- Disallow setting up metadata mode/tunneling/input surface
after first sendCommand. (Except to Idle for OMXCodec quirk.)
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.

[backported from M]

Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
86369364a07c85dd8f0e890b783a7bd434b8ef7c 02-Aug-2016 Lajos Molnar <lajos@google.com> DO NOT MERGE: IOMX: work against metadata buffer spoofing

- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Do not share metadata mode buffers cross process.
- Disallow setting up metadata mode/tunneling/input surface
after first sendCommand. (Except to Idle state for OMXCodec quirk.)
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.

[backported from L-MR1]

Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
807e827d4c1196754faaf138cb93c57c5b137e69 02-Aug-2016 Lajos Molnar <lajos@google.com> DO NOT MERGE: IOMX: work against metadata buffer spoofing

- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Do not share metadata mode buffers cross process.
- Disallow setting up metadata mode/input surface
after first sendCommand (except to Idle for OMXCodec quirk).
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.

[backported from L]

Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
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/omx/OMXNodeInstance.cpp
40d8899f60c5212af9d727ba0ffaaecf676ebd1d 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
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
f8a4cb410115045278f534e54b41ac78d6bf6c07 02-Aug-2016 Lajos Molnar <lajos@google.com> IOMX: work against metadata buffer spoofing

- Prohibit direct set/getParam/Settings for extensions meant for
OMXNodeInstance alone. This disallows enabling metadata mode
without the knowledge of OMXNodeInstance.
- Do not share metadata mode buffers cross process.
- Disallow setting up metadata mode/tunneling/input surface
after first sendCommand.
- Disallow store-meta for input cross process.
- Disallow emptyBuffer for surface input (via IOMX).
- Fix checking for input surface.

Bug: 29422020
Change-Id: I801c77b80e703903f62e42d76fd2e76a34e4bc8e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
0e2cc67785e417da3df72b3e7d8fcb792582b076 25-May-2016 Wonsik Kim <wonsik@google.com> DO NOT MERGE omx: check buffer port before using

Bug: 28816827
Change-Id: I3d5bad4a1ef96dec544b05bb31cc6f7109aae0a5
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d53e3ba7c75cb7ae82702294475a1f85d19aea9f 21-Jun-2016 Wonsik Kim <wonsik@google.com> resolve merge conflicts of bce0a92 to nyc-mr1-dev-plus-aosp

Change-Id: I94f7a7be4ceff016c9779c2898ad3dd8ab1f41b2
bff5b5a8bb44754e0b51631527de1c49ab7e5a43 20-Jun-2016 Wonsik Kim <wonsik@google.com> resolve merge conflicts of fd15c3f to nyc-dev-plus-aosp

Change-Id: If72b6d7e2985787aa0ba1baf00952524721396c7
cb76af124c655e7cd02403c1170df653e3355ef5 25-May-2016 Wonsik Kim <wonsik@google.com> DO NOT MERGE omx: check buffer port before using

Bug: 28816827
Change-Id: I3d5bad4a1ef96dec544b05bb31cc6f7109aae0a5
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
719fd3c0625705777f1ef0667005b111733c2e0b 25-May-2016 Wonsik Kim <wonsik@google.com> DO NOT MERGE omx: check buffer port before using

Bug: 28816827
Change-Id: I3d5bad4a1ef96dec544b05bb31cc6f7109aae0a5
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
ac26fe3ae73b102b0d50720072dc83b143adeb22 25-May-2016 Wonsik Kim <wonsik@google.com> DO NOT MERGE omx: check buffer port before using

Bug: 28816827
Change-Id: I3d5bad4a1ef96dec544b05bb31cc6f7109aae0a5
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
41eca4f0ec697529fe8a47f34f43f5ba98a50162 25-May-2016 Wonsik Kim <wonsik@google.com> omx: check buffer port before using

Bug: 28816827
Change-Id: I3d5bad4a1ef96dec544b05bb31cc6f7109aae0a5
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d94d3f972f29c79da5ae22decd32bf122a0bc037 11-May-2016 Lajos Molnar <lajos@google.com> stagefright: update & pass graphic buffer properly to OMX am: e63de4c601
am: 46d737a803

* commit '46d737a80357631ec0e98250be0f23fc084800eb':
stagefright: update & pass graphic buffer properly to OMX

Change-Id: Ib83bc4bf2b721ea6224a2a030c2c595cefc70bf6
d37e1c1070bd777aa6d50afbca4ec7f69bacab07 11-May-2016 Lajos Molnar <lajos@google.com> stagefright: update & pass graphic buffer properly to OMX
am: e63de4c601

* commit 'e63de4c60116261b90bc93b608ccd4bd182f3484':
stagefright: update & pass graphic buffer properly to OMX

Change-Id: Icb837524ce5b9ec1fda7a49006582e5bcbe7bafe
e63de4c60116261b90bc93b608ccd4bd182f3484 09-May-2016 Lajos Molnar <lajos@google.com> stagefright: update & pass graphic buffer properly to OMX

Update graphic buffer must update the handle in the proper buffer.
E.g. if using emptyBuffer later, it must update the backup buffer
and use the backup buffer's metadata mode which may differ from the
codec buffer's mode. Also use proper size for filled graphicbuffer.

Bug: 22775369
Change-Id: I9ec7032ed5db4c0636e2e2a4bad32022d251d66b
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
10dac29441a24144029e8a194d07eb17db40b7e5 10-May-2016 Lajos Molnar <lajos@google.com> Merge "stagefright: IOMX: pass native handle in sp<NativeHandle>" into nyc-dev
am: 038ccfd6ff

* commit '038ccfd6ff5a32d6f559e5b479d6f8e55d0b5133':
stagefright: IOMX: pass native handle in sp<NativeHandle>

Change-Id: I31d255bea906aca9ae23f5f4678d6557bc84052b
038ccfd6ff5a32d6f559e5b479d6f8e55d0b5133 10-May-2016 Lajos Molnar <lajos@google.com> Merge "stagefright: IOMX: pass native handle in sp<NativeHandle>" into nyc-dev
1b40f2804a27b695e9e53fb1699b64cb0dd387f9 10-May-2016 Lajos Molnar <lajos@google.com> stagefright: IOMX: pass native handle in sp<NativeHandle>

This clarifies ownership of the native handle

Bug: 28644266
Bug: 27856976
Change-Id: I7a617513d7ac93dd58d74af9469663418735aaf3
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
b7e75437b160fd8fe239f62f690af6ff0c2a7df6 10-May-2016 Lajos Molnar <lajos@google.com> Merge changes I58b03acd,I7d7eb086 into nyc-dev
am: 0d0a8b48d2

* commit '0d0a8b48d267a1980cfd9507b51d173756835f34':
stagefright: untangle metadata-mode handling
stagefright: add a way to update native handle in OMX buffers

Change-Id: I857573724b0a4f7b38832777b12caa8666ac210b
3e328782f1e1061d08ea0c45b855cc418a2d9ea6 09-May-2016 Lajos Molnar <lajos@google.com> stagefright: untangle metadata-mode handling

- specify requested metadata mode from producers to OMX
- (pass requested metadata in IOMX::storeMetadataInBuffers)
- use correct logic for native handle source
- use native handle source for encoded meta buffers

Bug: 22775369
Change-Id: I58b03acd3e9a5367d5010d7f87b7af5cae23362c
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
7e0bef8aa6bf9db06079b743794ec2712ad84431 09-May-2016 Lajos Molnar <lajos@google.com> stagefright: add a way to update native handle in OMX buffers

Bug: 22775369
Change-Id: I7d7eb0868fef896d1cb0a45bec759a00f0783673
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.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/omx/OMXNodeInstance.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/omx/OMXNodeInstance.cpp
dd81af7ef969981748f35ec839869d34ed0cc768 11-Mar-2016 Lajos Molnar <lajos@google.com> IOMX: add INTERNAL_OPTION_COLOR_ASPECTS to setParamaters

Bug: 25684127
Change-Id: I140a26eb958d0c42f54faf2b20af636857e886f7
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
57fad3c31f46ec98d15bc253c16f9d269aeb8ea7 08-Mar-2016 Lajos Molnar <lajos@google.com> IOMX: add dataspace to createInputSurface

Bug: 25684127
Change-Id: Ibe746d7d077f32b0f2ecfb8494f415a6bf0bd673
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
4e82dc4004ed361057d418c08e2b3b698a75e261 01-Mar-2016 Jeff Tinker <jtinker@google.com> Merge "Fix alternative signaling for native handles" into nyc-dev
a94c49819fd1513f1d60dbfb433017ca64bbd7db 26-Feb-2016 Jeff Tinker <jtinker@google.com> Fix alternative signaling for native handles

bug: 27371660
Change-Id: Icbf64c99cad524c080859c1b4ee031af97880568
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
73dd808754c641fe798273d356ee38368715fa7b 25-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: use MediaImage2

Bug: 25684127
Change-Id: I2f8b672a191ee4e60c9364e826cae34089ef5f9c
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
1c9ba65e447104bfcdbe0cb16a9f3cc5bad2da39 23-Feb-2016 Max Spector <mspector@google.com> Merge "Fixing safteynet logging bug introduced in ag/862848" into mnc-dev am: 93edd483f6 am: 032fcf3034 am: c802d2091a
am: 81b6cc61f0

* commit '81b6cc61f0bef255f725ec9e56659d1caba227c2':
Fixing safteynet logging bug introduced in ag/862848
1a19076c36cbe76a537b5742e96747135b4f0d46 19-Feb-2016 mspector@google.com <mspector@google.com> Fixing safteynet logging bug introduced in ag/862848

We moved the safteynet logging into storeMetaDataInBuffers_l
Bug: 26324358
Change-Id: I2171742b53192ebb71d546bcb8970bb3c68f366f
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
aef47bf801dcbcb88cec8426c03237c6313da1c2 13-Feb-2016 Lajos Molnar <lajos@google.com> stagefright: allow system property to signal native handle use

Bug: 26782004
Change-Id: I0ca38c25e2886ff260aec441e1d49048c38ff47c
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.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/omx/OMXNodeInstance.cpp
298f3c866c5cdb987d15e1e4fc12692fc971ad63 25-Nov-2015 Wei Jia <wjia@google.com> OMXNodeInstance: check pointers before dereferencing them.

Bug: 25884056
Change-Id: I0c3a717db56d99d3cdf069c1c40a93c4d6391f0b
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
91aa4a0aefa43ad53a20b3d4538a6a986c902818 08-Oct-2015 Wei Jia <wjia@google.com> am f106f9e4: am 15e991bd: resolved conflicts for 0b09da7a to lmp-mr1-dev

* commit 'f106f9e4eacc1cb10ccc851a37619ed4b37bbb1b':
DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.
15e991bdf8870c2c9820c2d98e0d30dae2e05a25 08-Oct-2015 Wei Jia <wjia@google.com> resolved conflicts for 0b09da7a to lmp-mr1-dev

Change-Id: Ib6a1aa4cee00e0449da30ae158d71403d6236487
2482595baadd16f20d3992c8c9d6a14061836872 28-Sep-2015 Wei Jia <wjia@google.com> DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.

Bug: 24310423
Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
(cherry picked from commit 8dde7269a5356503d2b283234b6cb46d0c3f214e)
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
4a03d784f7c0e3a9685d182eee92ba6580eaf5a1 28-Sep-2015 Wei Jia <wjia@google.com> DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.

Bug: 24310423
Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
(cherry picked from commit 8dde7269a5356503d2b283234b6cb46d0c3f214e)
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
198446e81eaddf8a57d0ac809569ae26dd5ceaeb 06-Oct-2015 Marco Nelissen <marcone@google.com> am 28dd6059: Merge "Fix benign overflow in OMXNodeInstance"

* commit '28dd605906a0e44361caffc65bce2edb14c661f3':
Fix benign overflow in OMXNodeInstance
e4a595cb4af87725cbe071ebf69ba7118186680f 06-Oct-2015 Marco Nelissen <marcone@google.com> Fix benign overflow in OMXNodeInstance

Change-Id: I7470bddb7ade97143ba70c026e3b7d61dd8d97b0
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
f470bf3f3788062f77a0614ec693583fd85716c6 06-Oct-2015 Wei Jia <wjia@google.com> am 031e841e: am 8656914f: am b90b8291: am cb70fdbe: Merge "OMX: allow only secure codec to remotely call allocateBuffer." into mnc-dev

* commit '031e841e34f2358a71cc63ad8192e0f48a9f63a7':
OMX: allow only secure codec to remotely call allocateBuffer.
8dde7269a5356503d2b283234b6cb46d0c3f214e 28-Sep-2015 Wei Jia <wjia@google.com> OMX: allow only secure codec to remotely call allocateBuffer.

Bug: 24310423
Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
b92add32c22656dedfb82d26ccc168c43c92b8eb 31-Jul-2015 Chad Brubaker <cbrubaker@google.com> Fix benign unsigned integer overflows in loop conditions

This is causing an abort when running with unsigned integer overflow
detection, change the code to no longer do i-- when i = 0.

Change-Id: I0ab786cabb3a3d37fa24a3b8da0c35dd475ca273
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
49605e8ab171a2b1f474645d632d3982f5f7b8e6 01-Jul-2015 Lajos Molnar <lajos@google.com> stagefright: fix deadlock and NPE in GraphicBufferSource

Bug: 22202388
Change-Id: I04f2f783ecc0e0c50adf16a666f6d7ab4221e285
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
5419242328f33f4d126a22ef6296c99353f4dfb4 29-Jun-2015 Chong Zhang <chz@google.com> ignore buffers that's already removed

bug: 22005018
Change-Id: I892a0fe77519d5fb996bcb4cc95e0d10e859000c
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
ec4ed7d541f48d1d0af8f93cd26ec291ca82061b 12-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: relax check of OMX buffer header - again

- move check to after FillBufferDone only.
- add support for NULL graphicBuffer - just in case

Bug: 21773260
Change-Id: Ibf03511f1d04425e29b63fe4e560e0d8ba6ea20e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
1ff26b038c646414c450bae5277b7a726b3322b7 15-Jun-2015 Rachad Alao <rachad@google.com> Revert "stagefright: relax check of OMX buffer header"

This reverts commit 652bc0197341337bb07fc4f87f168167fb3f47dc pending
the complete investigation of b/21837661

Change-Id: I9c2825fd98ff7e9898c319ee66c0e3a3466c2093
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
652bc0197341337bb07fc4f87f168167fb3f47dc 12-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: relax check of OMX buffer header

- move check to after FillBufferDone only.
- add support for NULL graphicBuffer - just in case

Bug: 21773260
Change-Id: I804574c30ce47fd98bf09f5fe8ad00ae454ed1af
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
09fec7c14b3eeba465b1f382f71a88540008a3b5 12-Jun-2015 Andy Hung <hunga@google.com> am 47e94277: am d3061951: am 4bd813f6: am e0e50f2a: am e5ca9a20: am 375e3495: IOMX: Clear buffer id for arm32

* commit '47e94277d1e0b6f581072db8f2b5406eb30dc685':
IOMX: Clear buffer id for arm32
984a54322f7c70bc75e862d91bdd975814872aff 10-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: fix issues with OMX message passing

- added destructor for MessageList so messages are freed
- check if notify has been initialized
- do not call onMessages if there are no messages

Bug: 21659665
Change-Id: Idb4eaa63dc2f8be8b282be79e6234f83a7669481
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
5fb8b2987ab96ad65dc4b046616607ece16d6fb3 10-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: fix legacy support for CameraSource

- allocate big enough buffers for native metadata source even in
CameraSource mode
- don't check range when using native metadata mode (and converting
it to GrallocSource) as OMX buffer will be smaller than input
- log allocated vs. OMX reported sizes in OMXNodeInstance logs

Bug: 21708032
Change-Id: I7eeffc5116079e5b368f84980e8e7524260aaccf
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
26a48f304a8754d655e554178ffb6d7ba4c5aac3 04-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: add support for batching OMX events

Bug: 20503131
Change-Id: I762c419ed1245f8b83fb1f6bf61e5557213ca07b
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
9847fcefb183e1cb09eb48e17a09577392b0e8f4 03-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: rename VideoGrallocMetadata.hHandle to pHandle

This is so that it can be equivalent to the previously named
VideoDecoderOutputMetaData struct.

Bug: 13222807
Change-Id: I38831e19a76f49cc7e8385c079817c538d18f0ff
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
15ab4996019387f27a48b81cb4774c21502bc0e5 01-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: add support for fences in OMX

Pass Fence between Surface and ACodec, and between ACodec and IOMX.

Bug: 12386081
Change-Id: Ifdc566979dec0d91ed8b07c3b69d2cf092accc73
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
054219874873b41f1c815552987c10465c34ba2b 16-May-2015 Lajos Molnar <lajos@google.com> stagefright: rework metadata buffer support

- Add fence to new metadata buffer mode structure, but don't use it
yet, so that we don't have to add another mode soon.
- Change GraphicBuffers to ANativeWindowBuffer in new metadata mode.
This removes internal depencency from vendor codecs.
- Extend new metadata mode from SW encoders to all codecs.
- Fallback from new metadata mode to old mode (so Camera can always
use the new mode even with legacy codecs)

Related-bug: 19614055
Bug: 13222807
Change-Id: I405a21dd6ce8e99808f633bfeab8f14278eb7079
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
cc7cc67349b7a3f498882087aa42ffc05a2daf11 01-Jun-2015 Lajos Molnar <lajos@google.com> stagefright: allow to overallocate OMX codec buffers

Specify allottedSize for useBuffer and allocateBufferWithBackup,
where OMX will see only the allottedSize, even though framework may
allocate and use a bigger buffer.

Bug: 13222807
Change-Id: Ibfa93f6c7b7c8ca0853ef17d4a0758e496eaf921
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
e0e50f2a7bea366c208e694f4c0abd5ec2baeb69 29-May-2015 Andy Hung <hunga@google.com> am e5ca9a20: am 375e3495: IOMX: Clear buffer id for arm32

* commit 'e5ca9a209af40000ad41c461ae1178f479e01a62':
IOMX: Clear buffer id for arm32
375e349556baa6a8ea59e963c33824e9063a0eca 27-May-2015 Andy Hung <hunga@google.com> IOMX: Clear buffer id for arm32

Initial counter needs to be cleared for ease of debugging.

Bug: 20634516
Change-Id: I4131d759b9cc296bbecf25a53433d42b22ef228f
(cherry picked from commit 9113c1e619fd78fe53b548180fdc02300d33303d)
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
9113c1e619fd78fe53b548180fdc02300d33303d 27-May-2015 Andy Hung <hunga@google.com> IOMX: Clear buffer id for arm32

Initial counter needs to be cleared for ease of debugging.

Bug: 20634516
Change-Id: I4131d759b9cc296bbecf25a53433d42b22ef228f
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
389379c4ccc0d09fbb54c510550ff6a895a319a1 27-May-2015 Andy Hung <hunga@google.com> am c796a24d: am 3d2874f2: am c356d596: am dd527c20: am f7198f86: Merge "IOMX: Enable buffer ptr to buffer id translation for arm32" into lmp-dev

* commit 'c796a24d577673044083634304c54f9e5b29f32a':
IOMX: Enable buffer ptr to buffer id translation for arm32
6b09a1e61353b9d61880a110a47e6ffc31034d9e 27-May-2015 Andy Hung <hunga@google.com> am f90bd074: am 06713b48: am 6c9994d3: am 6f4e0b1c: am 566b3576: IOMX: Add buffer range check to emptyBuffer

* commit 'f90bd07424a16343ec66ef99fa4a379b7910e955':
IOMX: Add buffer range check to emptyBuffer
c356d596d9e2c01817adfa2448c5210c575ae729 27-May-2015 Andy Hung <hunga@google.com> am dd527c20: am f7198f86: Merge "IOMX: Enable buffer ptr to buffer id translation for arm32" into lmp-dev

* commit 'dd527c20a3c61864d02637202ed1c5c1f3ff8de8':
IOMX: Enable buffer ptr to buffer id translation for arm32
6c9994d381aa817ba7a4ad8c94ce28240e65be54 27-May-2015 Andy Hung <hunga@google.com> am 6f4e0b1c: am 566b3576: IOMX: Add buffer range check to emptyBuffer

* commit '6f4e0b1c99679d770247bfe748642805cfd3ffb3':
IOMX: Add buffer range check to emptyBuffer
f7198f863f6eb25d586efa1bf28f7d5dc07697e8 27-May-2015 Andy Hung <hunga@google.com> Merge "IOMX: Enable buffer ptr to buffer id translation for arm32" into lmp-dev
0e27e080c255b23b4b0e19cb3bc9519cc162b73f 26-May-2015 Andy Hung <hunga@google.com> DO NOT MERGE - IOMX: Add buffer range check to emptyBuffer

Bug: 20634516
Change-Id: If351dbd573bb4aeb6968bfa33f6d407225bc752c
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
447a5628a4138f4bed11121d56965aff31bc765a 26-May-2015 Andy Hung <hunga@google.com> IOMX: Enable buffer ptr to buffer id translation for arm32

Bug: 20634516
Change-Id: Iac9eac3cb251eccd9bbad5df7421a07edc21da0c
(cherry picked from commit 2d6b6601743c3c6960c6511a2cb774ef902759f4)
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
566b357611eea481772e77f49a1ab446fe75b07b 26-May-2015 Andy Hung <hunga@google.com> IOMX: Add buffer range check to emptyBuffer

Bug: 20634516
Change-Id: If351dbd573bb4aeb6968bfa33f6d407225bc752c
(cherry picked from commit d971df0eb300356b3c995d533289216f43aa60de)
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
2d6b6601743c3c6960c6511a2cb774ef902759f4 26-May-2015 Andy Hung <hunga@google.com> IOMX: Enable buffer ptr to buffer id translation for arm32

Bug: 20634516
Change-Id: Iac9eac3cb251eccd9bbad5df7421a07edc21da0c
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d971df0eb300356b3c995d533289216f43aa60de 26-May-2015 Andy Hung <hunga@google.com> IOMX: Add buffer range check to emptyBuffer

Bug: 20634516
Change-Id: If351dbd573bb4aeb6968bfa33f6d407225bc752c
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.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/omx/OMXNodeInstance.cpp
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/omx/OMXNodeInstance.cpp
ebea5e7d0697c024c1ddf6001dcd33036e9bd95f 05-May-2015 Ronghua Wu <ronghuawu@google.com> Merge "Stagefright: propagate InsufficientResources error" into mnc-dev
fafcc219184223ab584eac3b03ee807e2798207a 01-May-2015 Praveen Chavan <pchavan@codeaurora.org> Stagefright: propagate InsufficientResources error

Propagate OMX_ErrorInsufficientResources when handling
node-allocation failure any other error from the component.

bug: 20132289

Change-Id: I1ed9626dab947227e3d5e983bbbeee89ad7b2d2a
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
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/omx/OMXNodeInstance.cpp
9d19e392f61de3e8cd365afa12d7836bd3721602 20-Feb-2015 Bill Yi <byi@google.com> am 935b4750: am 011734f0: Fix clang build error

* commit '935b47504411b6ac69f708ba698a72b7282aada1':
Fix clang build error
011734f0ce7e8b2e3066f90ef51c323ee7d4dea2 20-Feb-2015 Bill Yi <byi@google.com> Fix clang build error

Change-Id: I294903dcf3ce3aa6a3b2f50364067e701a33d327
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
37b2b389139ed638831e49708c947863eef631ef 27-Jan-2015 Ronghua Wu <ronghuawu@google.com> stagefright: add support for limiting framerate in GraphicBufferSource

Bug: 19014096
Change-Id: I6de781e4d140a247dfd8fd8f12c3ddd7baa39ad4
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
f296e2b262d2a8f7c570eaed454a28cca99eb976 19-Jun-2014 Lajos Molnar <lajos@google.com> stagefright: add runtime debug support

Bug: 18285408
Change-Id: I56346f4652b2c5f7ef5fa3003fd8676051339384
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
30358faf33fb9b638257b017fadb4c5f7352d903 22-Oct-2014 Lajos Molnar <lajos@google.com> stagefright: try to free codec instance if MediaCodec.release hangs

Bug: 18033275
Change-Id: If86cd26566d7b75941976f37829bbec619800778
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
512e979284de984427e5b2f73b9054ae1b5e2b0a 11-Oct-2014 Lajos Molnar <lajos@google.com> stagefright: support passing GraphicBuffer in metadata buffer

Bug: 17935149
Change-Id: I6bb5dd654e498a7153410afc052c2c8f7f35e44d
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
5a446aafff3020d607ad6fb14cc7ae76dd8f7947 30-Jul-2014 Rachad <rachad@google.com> Added Tunneled video playback support to ACodec

Bug:16132368
Change-Id: I88d2d66b8548fc203f4a2c4797196af15e56ff38
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.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/omx/OMXNodeInstance.cpp
8bd4d16aa5636e98522c07ae31236420788aa749 11-Jan-2014 Chong Zhang <chz@google.com> Cap pts gap between adjacent frames to specified value

- In the scenario of cast mirroring, encoding could be suspended
for prolonged periods. Limiting the pts gap to workaround the
problem where encoder's rate control logic produces huge frames
after a long period of suspension.

- Repeat last frame a couple more times to get better quality
on static scenes.

- Fix the timestamp on repeat frames (it was not set)

Bug: 11971963
Change-Id: I1d68ab3d269874bf3921aa429a985c5f63e428c7
(cherry picked from commit 94ee4b708acfa941581160b267afb79192b1d816)
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
dc6ac201032d0f6ad0c8149ae2f009ec38693025 22-Feb-2014 Chong Zhang <chz@google.com> Merge "support for time lapse/slow motion when using SURFACE source"
2c9c8cba8562cc3a27532e4cd348912cc78d8d98 11-Feb-2014 Chong Zhang <chz@google.com> support for time lapse/slow motion when using SURFACE source

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

Change-Id: Ie3bae3f037730e316d7fca12e7a3527973f752ef
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
72cecca17d735db6532c45f0a7e10c47ee6f065a 26-Dec-2013 Chong Zhang <chz@google.com> Change StagefrightRecorder to use MediaCodec

Bug: 12305192
Change-Id: I72d7cb571be5bd348b58ad650f3269d24c15d350
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
94ee4b708acfa941581160b267afb79192b1d816 11-Jan-2014 Chong Zhang <chz@google.com> Cap pts gap between adjacent frames to specified value

- In the scenario of cast mirroring, encoding could be suspended
for prolonged periods. Limiting the pts gap to workaround the
problem where encoder's rate control logic produces huge frames
after a long period of suspension.

- Repeat last frame a couple more times to get better quality
on static scenes.

- Fix the timestamp on repeat frames (it was not set)

Bug: 11971963
Change-Id: I1d68ab3d269874bf3921aa429a985c5f63e428c7
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
ad3b7e8d40bf1c97347f1538d30bba78ca371f67 07-Nov-2013 Andreas Huber <andih@google.com> Properly handle executing->idle in GraphicBufferSource

ACodec has initiated the transition from exectuing->idle and is waiting
for the component to return all buffers so they can be freed.
It's counter productive and with some vendors harmful to submit additional
buffers to the component from this point on.

Change-Id: I332be254a1faf94902c77b5792a373ab447e44d3
related-to-bug: 11573543
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
56ce726019f700a95ce5b45beebceadae4836e30 03-May-2013 Lajos Molnar <lajos@google.com> IOMX: Add prepareForAdaptivePlayback method

prepareForAdaptivePlayback is the fallback mechanism to support
seamless resolution change for devices that do not support dynamic
output buffers. It is up to the codecs to handle this appropriately,
but codecs that do not handle dynamic output buffers would
request enough buffers up to the requested size in this method
to avoid port reconfiguration on resolution changes.

Change-Id: I58d4aa8ef1359ea3472735bbe9140c3132039b3d
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10192531
Related-to-bug: 7093648
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
a61285dcf1da8a2cf40c499ee3a7b9fc4d74ac58 31-Jul-2013 Andreas Huber <andih@google.com> Optionally repeat the previously submitted frame to the encoder

if no new frame has been delivered by surface flinger within the timeout
interval.

Change-Id: I282f1b726dfe5646b178d7858d6f5d4f5a264fde
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d0715867861c216e88a4a7523b6da8a3cb128724 22-Jul-2013 Lajos Molnar <lajos@google.com> IOMX: add updateGraphicBufferInMeta method for metadata mode

This is used to set the handle in the metadata buffer that is
valid in the mediaserver process, as well as to keep a reference
for the graphic buffers in BufferMeta.

Change-Id: I46bb68d8bed894f357eeeb25368360d11b276634
Signed-off-by: Lajos Molnar <lajos@google.com>
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
92cb8f928dc9e237c356c942d10b5c0c1e04b2ae 25-Jul-2013 Andy McFadden <fadden@android.com> Update error message

The color format used for surfaces has two different names. The
one in the error message is the "native" name, which doesn't mean
anything to external developers.

Change-Id: Ic0561f4ad12970b0e0a60bd17b4e3997af1a9f0e
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
e40cda70eec141fa05cbcca1de420fdb22b98be6 17-Jul-2013 Andreas Huber <andih@google.com> Support "suspension" of a video encoder in "surface-input" mode.

i.e. feed no more input frames to the encoder while suspended.

Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
1b4ca5cebd7f42a8f8842e45bfabe19001e9a435 20-May-2013 Andreas Huber <andih@google.com> Avoid a deadlock during EmptyBufferDone

The deadlock happens withen in the case where we use an OMX encoder with a
GraphicBufferSource.

Bug: 8329090
Change-Id: Icec58bb85ff3839ad1a2e3eca02fa9d6d133ca45
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d8754298b576aca4e85a059ea7b7e8f7a9502226 19-Apr-2013 Jamie Gennis <jgennis@google.com> OMXNodeInstance: actually fix OMX_GetExtIndex logging

Bug: 8538872
Change-Id: I228746e8eb502af4bba4054caa4d8569fab35025
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
ce18d7d85a78ac6642624fef1b5831eff4c72d56 10-Apr-2013 Jamie Gennis <jgennis@google.com> OMXNodeInstance: fix OMX_GetExtensionIndex logging

This change fixes the logging of OMX_GetExtensionIndex errors. Under certain
circumstances these errors are not harmful and should not be logged.

Bug: 8538872
Change-Id: I19a13d29ca6263454a9a7a8be205e10363725f31
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
0c37f9d1320bb87fd242f9425c67dacd6ce20112 11-Mar-2013 Andy McFadden <fadden@android.com> GraphicBufferSource fixes

Various fixes:
- Set the maximum number of BQ buffers we're allowed to
acquire equal to the actual number of codec buffers. That
way we keep the codec as full as possible, and never try to
acquire more than we're allowed from the BufferQueue.
- Actually use "end of stream sent" flag.
- Name the BufferQueue (for debug messages).

Bug 8359403

Change-Id: I3b8c1f679bbebf6a89e623e13ca029eda7f657ba
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.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/omx/OMXNodeInstance.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/omx/OMXNodeInstance.cpp
6c6b4d0d2b98a7ceee8b697daaf611f8df3254fb 12-Mar-2012 James Dong <jdong@google.com> Switched to use the header files in /frameworks/native
and deleted the duplicate header files in /frameworks/base

o related-to-bug: 6044887

Change-Id: I17e0692d9a9b5c8796ded36677c833ca8ab36795
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
f1d5aa162c02a16b7195a43a9bcea4d592600ac4 07-Feb-2012 James Dong <jdong@google.com> Move away from MediaDebug and use ADebug instead

Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
5ff1dd576bb93c45b44088a51544a18fc43ebf58 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
3856b090cd04ba5dd4a59a12430ed724d5995909 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
b1d666f5cb555d135eb69e005e88a03330bbb54c 20-Oct-2011 Jamie Gennis <jgennis@google.com> Stagefright: idle OMX after ANW errors

This change fixes an issue in Stagefright where the state of an OMXCodec
object can get out of sync with the state of the OMX component. In
particular, if one of the ANativeWindow functions failed and put the
OMXCodec into the ERROR state, this would cause Stagefright to skip
doing the Executing -> Idle transition. Without this transition the
freeBuffersOnPort call would never be made, and the MediaBuffers would
end up being leaked (which would also leak the Gralloc buffers they
reference).

Bug: 5333695
Change-Id: I85ea0cf92d18e7ef6d35c7d1e2a7b4e2c9745d34
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
2edd41583bb8c2b90c332980e0d1c34ae9ede34e 22-Aug-2011 Chih-Chung Chang <chihchung@google.com> Merge "Remove useAndroidNativeBuffer(2) warning message."
2e17686223bad35101c23083dc79f1d12f3ff429 18-Aug-2011 Chih-Chung Chang <chihchung@google.com> Remove useAndroidNativeBuffer(2) warning message.

Change-Id: I3e9765e7271d80fda302e521501720bf8c13e5c7
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
a0dac9e24ae7520cb7d7f0505bf0936bffbcd047 12-Aug-2011 Jamie Gennis <jgennis@google.com> Stagefright: fix a compiler warning

Change-Id: Ia6b2027dfe80960450156d918bdd7fe1567cafea
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
c5a57efb706ec79032fc09c43b16d11ed0876604 22-Jun-2011 Anu Sundararajan <sanuradha@ti.com> Stagefright: add support for gralloc OMX_UseBuffer.

XXX: This change should go along with a documentation change to
HardwareAPI.h that describes the new extension.

This change adds support for passing a buffer_handle_t to OMX_UseBuffer
during OMXCodec initialization. This new way of passing the
buffer_handle_t's replaces the old OMX_SetParameter-based approach, and
this change deprecates that interface, but still supports it for OMX IL
implementations that do not support the new interface.

Change-Id: If9c1cb3c6c349c54dab094aeb8af13eae9f85271
Signed-off-by: Jamie Gennis <jgennis@google.com>
Signed-off-by: Sarthak Aggarwal <sarthak@ti.com>
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
bbba88cb1bdc34705d1477208990a06904c022e7 11-May-2011 Andreas Huber <andih@google.com> Squashed commit of the following:

commit c80992e419ed567abef451042f09c4958534b90d
Author: Andreas Huber <andih@google.com>
Date: Wed May 11 14:00:07 2011 -0700

Support for the mp3 audio decoder as a software OMX component.

Change-Id: I66e10c4d0be4c3aecdef1c21b15a2c7359ceb807

commit a358d0e1bf2a88897887445f42ccdda0f5f2f528
Author: Andreas Huber <andih@google.com>
Date: Wed May 11 13:11:23 2011 -0700

Support for G.711 alaw and mulaw decoders as software OMX components

Change-Id: Ia5c76c02cb83a9f94ce39a27b2251e5880218f03

commit 79088b9c9a5c8b8c97ea66cb4f90a2b0f0d34553
Author: Andreas Huber <andih@google.com>
Date: Thu May 5 15:43:32 2011 -0700

Instead of using an RGB surface and conversion yuv420->rgb565

convert from OMX_COLOR_FormatYUV420Planar to HAL_PIXEL_FORMAT_YV12 instead.

Change-Id: I8c4fc3c54c963f0d4ba6377f3c4ab4e0013152e5
related-to-bug: 4394005

commit 69469d3bd84425777b11b9fc938c5e0c61af26a7
Author: Andreas Huber <andih@google.com>
Date: Tue May 10 15:46:42 2011 -0700

voip mustn't link against libstagefright.so

Change-Id: I4d0ba9a8b9dc9380b792a1bd04bcda231964862c

commit 2a9a9eeeeeb36ae3a9e680469c3016d509ff08c3
Author: Andreas Huber <andih@google.com>
Date: Tue May 10 14:37:10 2011 -0700

Remove most non-OMX software decoders by default

Change-Id: Ic56514bc1b56b8fa952e8c4a164ea7379ecb69d0

commit a4de62c37b335c318217765403a9fb282b20a216
Author: Andreas Huber <andih@google.com>
Date: Mon May 9 16:50:02 2011 -0700

Conditionally build the old-style software decoders.

Change-Id: I5de609e1d76c92d26d6eb81d1551462258f3f15f

commit 5d8b039f9449dc3dad1e77c42c80cc0b54b0c846
Author: Andreas Huber <andih@google.com>
Date: Mon May 9 16:13:12 2011 -0700

Support for MPEG4 and H.263 video decoders as soft OMX components.

Change-Id: I5e3a4835afab89f98e3aa128d013628f5830eafe

commit b25a1bfbeb0ff6e62e1cc694ce2599c91489c7d0
Author: Andreas Huber <andih@google.com>
Date: Mon May 9 11:49:10 2011 -0700

Boost Soft OMX thread priority, fix timestamp handling in vorbis Soft OMX decoder.

Change-Id: I68d26d4999f06fcc451d69e5303663fab0cba9e8

commit c0574362f8dc3319ce84d981097867062a698527
Author: Andreas Huber <andih@google.com>
Date: Mon May 9 11:28:53 2011 -0700

Support for the AMR decoders (NB and WB) as Soft OMX components.

Change-Id: Ia565f59833fb52653e23f26536e7e41fc329a754

commit 3e5575a8f0e27a490cb7bde77bd9456087837f08
Author: Andreas Huber <andih@google.com>
Date: Wed May 4 13:41:25 2011 -0700

Signal an error if the aac decoder failed to initialize from codec specific data.

Change-Id: I01da7831bdf722edd7d6dc5974486daa2cf2b209
related-to-bug: 4272179

commit f94aeaa9886e772ff4823e671ed237096649f4af
Author: Andreas Huber <andih@google.com>
Date: Tue May 3 13:07:38 2011 -0700

Software OMX nodes don't (yet?) support native_window mode.

Change-Id: I7d9ca9164ef4abf66b573ca21dba12d672f8b12d

commit eefdfabac8dc659e00daa56da69aea705c49cb67
Author: Andreas Huber <andih@google.com>
Date: Tue May 3 12:57:16 2011 -0700

Fixing the OMX tests to refer to appropriate files from test content.

Change-Id: I5b61c3498749bfb876abbd3946a5132356e3f6ff

commit f31b7326aef14b6a1b7946520a9688f092e844d5
Author: Andreas Huber <andih@google.com>
Date: Tue May 3 11:08:38 2011 -0700

Soft OMX components are now dynamiclly loaded/unloaded, not directly linked against.

Change-Id: I1e2ecfbfab67a8869886f738eaf0c7b3c948b6d9

commit b7f0343879e4df06f0a1c9bfece24df557954e2f
Author: Andreas Huber <andih@google.com>
Date: Mon May 2 15:58:36 2011 -0700

Support for the AVC software decoder as an OMX component.

Change-Id: I13c12df435ba4afbd968a9fc659f66b91c818bc2

commit 5bb9e616d6c8e1b13d531fe996b9a9affdfb2977
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 12:05:37 2011 -0700

Fix Vorbis OMX decoder's component role.

Change-Id: I5e871e5e11b3f951c93590210e63fd7987c467b5

commit 089c91f2333062e196c7afd5fb0ca914878aa474
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 12:05:18 2011 -0700

Support vorbis_decoder OMX testing.

Change-Id: I1985be178a12ae3f8768bc72067d9236238be170

commit 56e241fa36fc37219bc536b823bdc2ab82dc1fad
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 12:01:46 2011 -0700

SoftVorbis OMX component now respects the number of valid frames per page.

Change-Id: I82a117a064d9b083fc58a54ad900a987a763ef03

commit fcd618ec520c376fdb78f4cbb44b8d9f5d213e2b
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 10:59:38 2011 -0700

Support for the vorbis audio decoder as a soft OMX component.

Change-Id: Iaeb057e58ca306d3dce205c0445b74d5aefef492

commit d1fcc3203fc8003ad79c6e96b3a1fc4261743f16
Author: Andreas Huber <andih@google.com>
Date: Fri Apr 29 10:07:50 2011 -0700

VPX decoder now properly resizes buffers after a port settings change.

Change-Id: I110749a31b6cba087891d8e5dfe420830bdbf831

commit 35c7168243cb69849d88911144a2c7fdfed5c54e
Author: Andreas Huber <andih@google.com>
Date: Thu Apr 28 13:23:34 2011 -0700

Support for the VPX video decoder as a Software OMX component.

Change-Id: Ic345add2d6d768d4af631160153f2e9b97fcea71

commit 923b2534b4211fc5405377b5190bfa6f2dd27f32
Author: Andreas Huber <andih@google.com>
Date: Thu Apr 28 11:34:40 2011 -0700

Table-based registration of soft omx components.

Change-Id: I7f45f0fa5b3a7950776e69c66349731f7674e937

commit 04a88f3edb2266a463da9c4481b80178be460902
Author: Andreas Huber <andih@google.com>
Date: Thu Apr 28 11:22:31 2011 -0700

Apparently OMX_GetParameter is valid in any state other than OMX_StateInvalid

OMX_SetParameter is still constrained to OMX_StateLoaded or a disabled port.

Change-Id: I1032d7cf4011982d306aa369d4158a82830d26fb

commit 9d70ca68445e7c40f5c9b2d12466e468f514de88
Author: Andreas Huber <andih@google.com>
Date: Wed Apr 27 15:03:18 2011 -0700

Use the new soft OMX aac decoder for HTTP live playback.

Change-Id: Ifbcfb732a9edb855cb46b49f6d0ac942170ee28f

commit 213fe4a10ea93cce08e8622dc3908053f29878a1
Author: Andreas Huber <andih@google.com>
Date: Tue Apr 12 16:39:45 2011 -0700

Foundation for supporting software decoders as OMX components

Change-Id: I7fdab256563b35d1d090617abaea9a26b198d816

Change-Id: I83e9236beed4af985d10333c203f065df9e09a42
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
0c03d5c7c2fa4d17f7f5159e3fddd2adf6bfc923 28-Mar-2011 Andreas Huber <andih@google.com> Ignore OMX codec messages once we're in ERROR state.

Change-Id: I2bdf58ed705a641be1f3aec89fa41cada6acfc96
related-to-bug: 4175573
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
e2ce6458659c6e1bad420357b61dc10cd8bbe2ab 24-Feb-2011 Jamie Gennis <jgennis@google.com> Add an OMX IL API for querying buffer usage flags.

This change defines an OpenMAX IL API for querying from the IL component
the gralloc buffer usage flags that should be used to allocate the
buffers. It also adds the Stagefright plumbing for using the new OMX IL
API.

Change-Id: I046b5e7be70ce61e2a921dcdc6e3aa9324d19ea6
Related-Bug: 3479027
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
43e5eca7048a3b7b3ee0223b7f3cbd837ed10ae5 25-Jan-2011 Andreas Huber <andih@google.com> More instrumentation to track down the hardware decoder not shutting down bug.

Change-Id: I3f31b6fdf5c90b436567bbce578dcbc4666ed7c2
related-to-bug: 3362836
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
e870772a78ffe08b1c14a791e368f1499f1be0f3 21-Oct-2010 James Dong <jdong@google.com> OMX extension to support storing meta data in video input buffers during recording

bug - 3042125

Change-Id: I7543809fa4ff61d48da35eec6c2bd5eaa7e8cead
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
83750eaf5a3f38c243a9e7eb81d4b2421e3a0d88 31-Aug-2010 Jamie Gennis <jgennis@google.com> Add the new Stagefright ANativeWindow OMX codec API.

This change defines the two OMX_SetParameter calls that enable OMX codecs to
interact with ANativeWindows. It also adds the plumbing to the IOMX, OMX, and
OMXNodeInstance classes to use these new APIs.

This is try 2 for this change, after reverting the first one because it broke
the build.

Change-Id: I94249b72bdb5d5719360f03d7935fcca4ece5028
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
9f2d258645826c999a93a4206df157fec2e3b0f2 01-Sep-2010 Jamie Gennis <jgennis@google.com> Revert "Merge "Add the new Stagefright ANativeWindow OMX codec API.""

This reverts commit 8a643b411e1802977f742709113ce01b06a18e12, reversing
changes made to 73ea9beaf8eb3d0027e78cbc0ac5e626c3f8deb4.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
559dc605bfe2deb73ad718e0d5c5dc55e27c45df 31-Aug-2010 Jamie Gennis <jgennis@google.com> Add the new Stagefright ANativeWindow OMX codec API.

This change defines the two OMX_SetParameter calls that enable OMX codecs to
interact with ANativeWindows. It also adds the plumbing to the IOMX, OMX, and
OMXNodeInstance classes to use these new APIs.

Change-Id: Ibfbf893dc3513db0b3d3221bec5708c77287cddc
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
03b268eac37ca2589bfff0bf58daf79d29cc14f4 19-Mar-2010 Andreas Huber <andih@google.com> Various fixes to enable recording on passion and nexus1.

Change-Id: I75a461c9882e2449082ad754ee7b231c1ceec039
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
2a3847ee1cbdaa8a65eee397a0173bb02211c459 16-Mar-2010 Andreas Huber <andih@google.com> Properly handle errors during the codec configuration phase, attempt to revert to next available (likely software-) codec if configuration fails.

Change-Id: Id1c699711e30139c9cc29df972254b5ba026e6fb
related-to-bug: 2517098
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
0d681df3b0ded2c1e335b6b5785439da4ce2c238 08-Feb-2010 Andreas Huber <andih@google.com> During shutdown, don't loop forever on a state transition to OMX_StateInvalid.

related-to-bug: 2420917
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
570a3cb7582daa030cb38eedc5eb6a06f86ecc7f 21-Jan-2010 Andreas Huber <andih@google.com> Fix no-copy-overhead OMXCodec implementation to actually work.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
134ee6a324c35f39e3576172e4eae4c6de6eb9dc 16-Dec-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 144b1c40e9cf08a584c50e1bef7ba3f287e81a4f
Author: Andreas Huber <andih@google.com>
Date: Wed Dec 16 09:28:23 2009 -0800

This H264 file shows a certain problem even better.

commit 3245f1f3b7471975aeeb824a756c987abd610f55
Author: Andreas Huber <andih@google.com>
Date: Wed Dec 16 09:20:08 2009 -0800

Using only the QA testfiles now.

commit 074817eb3816c5dd70858a3594e3b92d799d873b
Author: Andreas Huber <andih@google.com>
Date: Tue Dec 15 16:17:39 2009 -0800

Yay, roles are back again now that the API is in place.

commit 6d847e4932cc38301ae27cb7283b7f1553a95457
Author: Andreas Huber <andih@google.com>
Date: Tue Dec 15 13:01:20 2009 -0800

Added commandline option for specifying the random seed for reproducable tests.

commit 62ab37b26336eaa67e49791c41c996acb6acee3f
Author: Andreas Huber <andih@google.com>
Date: Mon Dec 14 10:53:27 2009 -0800

When issuing a seek it is important that only the first MediaSource::read call has the seek option.

commit e77c46644b2fb6862bafa3569f7d304252074f1e
Author: Andreas Huber <andih@google.com>
Date: Mon Dec 7 16:39:07 2009 -0800

Make sure the tests are actually built, sp<OMXCodec> becomes sp<MediaSource>

commit 6df56915bd55a9445b3c6f953d3cc251d81579b8
Author: Andreas Huber <andih@google.com>
Date: Thu Dec 3 14:25:36 2009 -0800

Temporarily disable support for querying the roles of OMX components.

commit 31bb26930df9e3658dea684cedb4b0f1a06a4a88
Author: Andreas Huber <andih@google.com>
Date: Tue Dec 1 13:36:52 2009 -0800

Disregard EOS events, slightly change the way the EOS flag on output buffers is handled.

commit 4c382fbc9aebee8197d5988d04378062809e7c48
Author: Andreas Huber <andih@google.com>
Date: Tue Dec 1 09:37:24 2009 -0800

New random seek test for the codec tests. Fixed "sticky" end-of-output-buffers flag behaviour in OMXCodec.

commit c762eac3e44309592b61a168d66e091cf609fa03
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 3 14:13:43 2009 -0800

Fix a typo.

commit 50540a59b65c7d476b0193c7494cd75895e6ca6d
Author: Andreas Huber <andih@google.com>
Date: Tue Nov 3 09:48:35 2009 -0800

Some more fine tuning of the unit tests, make MPEG4Extractor less verbose.

commit 1157a7e52a0636706caa235abe16d2ff8a0b8140
Author: Andreas Huber <andih@google.com>
Date: Wed Oct 28 12:01:01 2009 -0700

Changes to the IOMX::listNodes API, this now returns the component's roles as well, unit tests now test all components in all supported roles by default.

commit 30fbf2d8c6cb927689f7ba75eb550a81e9df488a
Author: Andreas Huber <andih@google.com>
Date: Mon Oct 26 09:45:26 2009 -0700

Initial check-in of unit tests for OMX components.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
f0fb96c352f30b812a4903a1d783a715e1e817bd 04-Dec-2009 Andreas Huber <andih@google.com> Enable proper cleanup of OMX nodes managed through stagefright.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
e3ec3cec3a2e27033249ff82964d2cbd441d9873 03-Dec-2009 Andreas Huber <andih@google.com> Squashed commit of the following:

commit 543e192bf2ae13f573dc4c4e53b239ed4ea00e81
Author: Andreas Huber <andih@google.com>
Date: Thu Dec 3 11:33:57 2009 -0800

stagefright now acts as the OMX Master, vendors supply their own plugins through libstagefrighthw. In OpenCore-enabled builds we now sit on top of PVMaster...

commit 3cbfdbd9cecadbb77b63125c62883bf1065884fe
Author: Andreas Huber <andih@google.com>
Date: Wed Dec 2 12:39:07 2009 -0800

More OMX infrastructure, stagefright is now taking over the OMX Master, multiplexing all contributing OMX implementations under a common interface.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
fa70cad40b01627ac1c22e04cdd548ece9c2654f 06-Nov-2009 Andreas Huber <andih@google.com> Handle OMX_StateInvalid in emergency shutdown properly (by ignoring it and hoping for the best) instead of asserting.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
d6703ab22c85b43fdb2deb78a37e51465c902a5f 27-Oct-2009 Andreas Huber <andih@google.com> When freeing an OMX node, attempt to transition it from its current state all the way to "Loaded" in order to properly free any allocated buffers.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
47bed1a7755ed58fa5d4c0d35b20468deb83bd60 22-Oct-2009 Andreas Huber <andih@google.com> Make stagefright a little less verbose. Fix heap corruption for real.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
2d6d6e9a3d569eda4555c4eb68cec452be958bb1 22-Oct-2009 Andreas Huber <andih@google.com> Still don't know why the heap gets corrupted, but not deleting the OMXNodeInstance appears to prevent this from happening.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp
318ad9c1d9d6515026dfc2c021359d27decaa7a1 15-Oct-2009 Andreas Huber <andih@google.com> Reimplement the OMX backend for stagefright.

Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup.

Changed APIs to conform to the rest of the system.
/frameworks/av/media/libstagefright/omx/OMXNodeInstance.cpp