summaryrefslogtreecommitdiffstats
path: root/media/libmedia/IOMX.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-6.0.1_r74' into HEADJessica Wagantall2016-11-091-29/+37
|\ | | | | | | | | | | | | | | CYNGNOS-3303 Android 6.0.1 release 74 Change-Id: I0a14578751f4ecb8d13def26b9ffe5dcba4afd72
| * Check mprotect resultMarco Nelissen2016-09-271-24/+28
| | | | | | | | | | | | | | | | | | mprotect can theoretically fail, which could then let one exploit a vulnerable codec if one exists on the device. Bug: 31350239 Change-Id: I7b99c190619f0fb2eb93119596e6da0d2deb8ba5 (cherry picked from commit 866c800c0624bb13eee44973cc8a2ecd0012de6e)
| * IOMX: work against metadata buffer spoofingLajos Molnar2016-09-271-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 (cherry picked from commit f8a4cb410115045278f534e54b41ac78d6bf6c07)
* | Merge tag 'android-6.0.1_r46' into HEADJessica Wagantall2016-06-071-30/+71
|\ \ | |/ | | | | | | | | Android 6.0.1 release 46 Change-Id: I4fcabf5775aebd2cb8dc0e352d1b1460d3214573
| * Fix OMX_IndexParamConsumerUsageBits size checkMarco Nelissen2016-04-211-3/+4
| | | | | | | | | | Bug: 27207275 Change-Id: I9a7c9fb22a0e84a490ff09c151bd2f88141fdbc0
| * Fix size check for OMX_IndexParamConsumerUsageBitsMarco Nelissen2016-04-211-2/+6
| | | | | | | | | | | | | | | | since it doesn't follow the OMX convention. And remove support for the kClientNeedsFrameBuffer flag. Bug: 27207275 Change-Id: Ia2c119e2456ebf9e2f4e1de5104ef9032a212255
| * DO NOT MERGE Verify OMX buffer sizes prior to accessMarco Nelissen2016-04-211-30/+66
| | | | | | | | | | Bug: 27207275 Change-Id: I4412825d1ee233d993af0a67708bea54304ff62d
| * Clear allocation to avoid info leakMarco Nelissen2016-02-261-27/+32
| | | | | | | | | | Bug: 26914474 Change-Id: Ie1a86e86d78058d041149fe599a4996e7f8185cf
| * Fixing safteynet logging bug introduced in ag/862848mspector@google.com2016-02-261-4/+0
| | | | | | | | | | | | We moved the safteynet logging into storeMetaDataInBuffers_l Bug: 26324358 Change-Id: I2171742b53192ebb71d546bcb8970bb3c68f366f
| * 3 uninitialized variables in IOMX.cppmspector@google.com2016-02-261-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | Uninitialized MetadataBufferType pointer in case: SET_INPUT_SURFACE STORE_META_DATA_IN_BUFFERS CREATE_INPUT_SURFACE Fix: initialize them to kMetadataBufferTypeInvalid Bug: 26324358 Change-Id: Ib3bcac9bedc98bc65efa39f67cdbffbd90b374c9
| * IOMX.cpp uninitialized pointer in BnOMX::onTransactmspector@google.com2016-02-261-3/+5
| | | | | | | | | | | | | | | | | | This can lead to local code execution in media server. Fix initializes the pointer and checks the error conditions before returning Bug: 26403627 Change-Id: I7fa90682060148448dba01d6acbe3471d1ddb500
* | Merge tag 'android-6.0.1_r24' into HEADJessica Wagantall2016-04-051-33/+49
|\ \ | | | | | | | | | | | | Ticket: CYNGNOS-2213 Android 6.0.1 release 24
| * | Clear allocation to avoid info leakMarco Nelissen2016-03-011-27/+32
| | | | | | | | | | | | | | | Bug: 26914474 Change-Id: Ie1a86e86d78058d041149fe599a4996e7f8185cf
| * | Fixing safteynet logging bug introduced in ag/862848mspector@google.com2016-03-011-4/+0
| | | | | | | | | | | | | | | | | | We moved the safteynet logging into storeMetaDataInBuffers_l Bug: 26324358 Change-Id: I2171742b53192ebb71d546bcb8970bb3c68f366f
| * | 3 uninitialized variables in IOMX.cppmspector@google.com2016-03-011-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uninitialized MetadataBufferType pointer in case: SET_INPUT_SURFACE STORE_META_DATA_IN_BUFFERS CREATE_INPUT_SURFACE Fix: initialize them to kMetadataBufferTypeInvalid Bug: 26324358 Change-Id: Ib3bcac9bedc98bc65efa39f67cdbffbd90b374c9
| * | IOMX.cpp uninitialized pointer in BnOMX::onTransactmspector@google.com2016-03-011-3/+5
| |/ | | | | | | | | | | | | | | | | This can lead to local code execution in media server. Fix initializes the pointer and checks the error conditions before returning Bug: 26403627 Change-Id: I7fa90682060148448dba01d6acbe3471d1ddb500
* | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-051-0/+6
|\ \ | |/ | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * OMX: allow only secure codec to remotely call allocateBuffer.Wei Jia2015-10-021-0/+6
| | | | | | | | | | Bug: 24310423 Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
* | Stagefright: Enable custom allocation mode.Shivaprasad Hongal2015-10-061-0/+3
|/ | | | | | Enable custom allocation mode Change-Id: Idf3f6c0eb9d17d361d2e5b6c36b1fe7586236565
* stagefright: add support for batching OMX eventsLajos Molnar2015-06-051-18/+40
| | | | | Bug: 20503131 Change-Id: I762c419ed1245f8b83fb1f6bf61e5557213ca07b
* stagefright: add support for fences in OMXLajos Molnar2015-06-021-9/+23
| | | | | | | Pass Fence between Surface and ACodec, and between ACodec and IOMX. Bug: 12386081 Change-Id: Ifdc566979dec0d91ed8b07c3b69d2cf092accc73
* stagefright: rework metadata buffer supportLajos Molnar2015-06-011-9/+32
| | | | | | | | | | | | | | - 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
* stagefright: allow to overallocate OMX codec buffersLajos Molnar2015-06-011-4/+8
| | | | | | | | | 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
* stagefright: rename usePersistentInputSurface to setInputSurfaceChong Zhang2015-05-131-7/+5
| | | | | | | | and clear persistent surface pointer when MediaRecorder is reset bug: 21045118 bug: 21045402 Change-Id: Ifd0d6deeb969f2252123929541b30b518cecbf9a
* MediaCodec: implement persistent input surface APIsChong Zhang2015-05-011-0/+83
| | | | | | | Bug: 19127604 Bug: 19489395 Change-Id: Idaf1cc9008016f66903e93907a676f54e342e1a3
* Update calls to IInterface::asBinder()Marco Nelissen2014-11-141-4/+4
| | | | | | to use the new static version. Change-Id: I89a5988a0ac694ffc04d88cf939e8455bf925d4c
* Added Tunneled video playback support to ACodecRachad2014-08-081-0/+38
| | | | | Bug:16132368 Change-Id: I88d2d66b8548fc203f4a2c4797196af15e56ff38
* Update OMX messages for 64 bitAndy Hung2014-05-141-64/+68
| | | | | | | | | 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>
* When passing a size_t via binder, use 64-bits unconditionallyGlenn Kasten2014-02-131-8/+8
| | | | | | | | | 64-bits is almost always over-kill. But it's easier and cleaner to change the binder code to be accurate, than to rename all the the API parameter types to be 32-bit. Bug: 12381724 Change-Id: Ib8f198d814a2027760ef24e9e3feacee21a973b1
* IOMX: Add prepareForAdaptivePlayback methodLajos Molnar2013-10-031-0/+34
| | | | | | | | | | | | | 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
* IOMX: add updateGraphicBufferInMeta method for metadata modeLajos Molnar2013-08-061-0/+33
| | | | | | | | | 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>
* Support "suspension" of a video encoder in "surface-input" mode.Andreas Huber2013-07-171-0/+29
| | | | | | i.e. feed no more input frames to the encoder while suspended. Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
* Implement Surface input to MediaCodec.Andy McFadden2013-03-041-20/+93
| | | | | | | | | Also, renamed a CHECK_INTERFACE macro that was clashing with the Binder version. Bug 7991062 Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0
* fix libgui header locationMathias Agopian2012-02-271-2/+0
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* Slighly improve the API to discover if the OMX stack is running in the localAndreas Huber2012-01-311-2/+5
| | | | | | process. Change-Id: Idd3c2f0d4a9542af01a3fdfd3b0bfab90e083505
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-1/+1
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Stagefright: idle OMX after ANW errorsJamie Gennis2011-10-191-0/+26
| | | | | | | | | | | | | | 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
* Fix missing AOSP copyright headers for a bunch of media framework filesJames Dong2011-03-171-0/+16
| | | | | | bug - 4119349 Change-Id: If5924e16a5f596d5d73d9beb66eaf5ac9a6f0e50
* Add an OMX IL API for querying buffer usage flags.Jamie Gennis2011-02-281-0/+29
| | | | | | | | | | 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
* Make parameter blocks read/writable even for SET_PARAMETER/SET_CONFIG requests.Andreas Huber2011-01-191-58/+20
| | | | | | Refactor the logic a little. Change-Id: Idd7a26678d846c96b0b11f096305e7467381bda3
* Remove all traces of legacy renderer support in stagefright.Andreas Huber2010-11-161-128/+0
| | | | Change-Id: I17b8e0dbf53fca37c96830c41131b4bc0c24ca6d
* OMX extension to support storing meta data in video input buffers during ↵James Dong2010-10-211-0/+28
| | | | | | | | recording bug - 3042125 Change-Id: I7543809fa4ff61d48da35eec6c2bd5eaa7e8cead
* Add the new Stagefright ANativeWindow OMX codec API.Jamie Gennis2010-09-031-0/+73
| | | | | | | | | | | 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
* Revert "Merge "Add the new Stagefright ANativeWindow OMX codec API.""Jamie Gennis2010-09-011-73/+0
| | | | | This reverts commit 8a643b411e1802977f742709113ce01b06a18e12, reversing changes made to 73ea9beaf8eb3d0027e78cbc0ac5e626c3f8deb4.
* Add the new Stagefright ANativeWindow OMX codec API.Jamie Gennis2010-09-011-0/+73
| | | | | | | | 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
* don't hardcode "mSurface" throughout our source codeMathias Agopian2010-04-121-1/+1
| | | | | | | this is used in a few places to get access to the android.view.Surface native surface. use a macro instead. Also rename the field to mNativeSurface. Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
* split libsurfaceflinger_client and libcamera_client out of libuiMathias Agopian2010-02-111-2/+2
|
* Fix no-copy-overhead OMXCodec implementation to actually work.Andreas Huber2010-01-201-3/+7
|
* Avoid unnecessary buffer copying if at all possible, detect if running in ↵Andreas Huber2010-01-191-3/+21
| | | | the mediaserver process.
* Squashed commit of the following:Andreas Huber2009-12-171-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.