summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/OMX.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-6.0.1_r74' into HEADJessica Wagantall2016-11-091-4/+4
|\ | | | | | | | | | | | | | | CYNGNOS-3303 Android 6.0.1 release 74 Change-Id: I0a14578751f4ecb8d13def26b9ffe5dcba4afd72
| * IOMX: work against metadata buffer spoofingLajos Molnar2016-09-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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_r43' into HEADJessica Wagantall2016-05-031-1/+6
|\ \ | |/ | | | | | | | | | | Ticket: CYNGNOS-2373 Android 6.0.1 release 43 (MOB30J) Change-Id: Ie0ab546349bd8a7eed51c839fba28b809e433fd4
| * Add VPX output buffer size checkMarco Nelissen2016-03-251-1/+6
| | | | | | | | | | | | | | and handle dead observers more gracefully Bug: 27597103 Change-Id: Id7acb25d5ef69b197da15ec200a9e4f9e7b03518
* | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-051-0/+5
|\ \ | |/ | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * OMX: allow only secure codec to remotely call allocateBuffer.Wei Jia2015-10-021-0/+5
| | | | | | | | | | Bug: 24310423 Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
* | libstagefright/omx: Fix CallbackDispatcher dereference in callback.Shivaprasad Hongal2015-10-061-2/+16
|/ | | | | | findDispatcher can return NULL. Check for NULL. Change-Id: I07edc427b706dfdeec6a6f90f13d00c8941e77f2
* stagefright: add support for output frame rendered callbackLajos Molnar2015-06-091-2/+26
| | | | | | | | | | | - Added FRAME_RENDERED event in OMX, used by tunneled video decoders to signal rendered event timing - Track buffers sent for rendering in ACodec and in SoftwareRenderer, and determine when they have rendered - Propagate render times to MediaCodec Bug: 20503131 Change-Id: Idf0a8714d5368b237c2285dd39fa82db847c232f
* stagefright: add support for batching OMX eventsLajos Molnar2015-06-051-11/+16
| | | | | Bug: 20503131 Change-Id: I762c419ed1245f8b83fb1f6bf61e5557213ca07b
* stagefright: add support for fences in OMXLajos Molnar2015-06-021-6/+9
| | | | | | | Pass Fence between Surface and ACodec, and between ACodec and IOMX. Bug: 12386081 Change-Id: Ifdc566979dec0d91ed8b07c3b69d2cf092accc73
* stagefright: rework metadata buffer supportLajos Molnar2015-06-011-6/+6
| | | | | | | | | | | | | | - 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/+4
| | | | | | | | | 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-3/+2
| | | | | | | | and clear persistent surface pointer when MediaRecorder is reset bug: 21045118 bug: 21045402 Change-Id: Ifd0d6deeb969f2252123929541b30b518cecbf9a
* Merge "Stagefright: propagate InsufficientResources error" into mnc-devRonghua Wu2015-05-051-2/+3
|\
| * Stagefright: propagate InsufficientResources errorPraveen Chavan2015-05-051-2/+3
| | | | | | | | | | | | | | | | | | Propagate OMX_ErrorInsufficientResources when handling node-allocation failure any other error from the component. bug: 20132289 Change-Id: I1ed9626dab947227e3d5e983bbbeee89ad7b2d2a
* | MediaCodec: implement persistent input surface APIsChong Zhang2015-05-011-0/+15
|/ | | | | | | 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
* stagefright: add runtime debug supportLajos Molnar2014-11-121-1/+1
| | | | | Bug: 18285408 Change-Id: I56346f4652b2c5f7ef5fa3003fd8676051339384
* Added Tunneled video playback support to ACodecRachad2014-08-081-0/+7
| | | | | Bug:16132368 Change-Id: I88d2d66b8548fc203f4a2c4797196af15e56ff38
* stagefright: add error log when create omx component failedZhijun He2014-07-171-1/+1
| | | | | Bug: 16343447 Change-Id: I6854b9b837a141a77ab318953dc002ec5ad5d31d
* Update OMX messages for 64 bitAndy Hung2014-05-141-5/+7
| | | | | | | | | 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>
* Remove legacy omx_message variablesAndy Hung2014-05-061-2/+0
| | | | | | | | | | Remove platform_private and data_ptr from omx_message. These were used for legacy deferred buffer creation. See OMXCodec quirks: kDefersOutputBufferAllocation and kRequiresAllocateBufferOnOutputPorts. Change-Id: I94da56bc64f3b46ee1276e93d67b36c1662e2eaf Signed-off-by: Andy Hung <hunga@google.com>
* media: 64 bit compile issuesMark Salyzyn2014-04-151-1/+3
| | | | | | | | - change internal sized types to use stdint.h - printf & scanf formats - size_t or unsigned int for iterators Change-Id: Id993a70d8bf54c667c5d652b34179a2c727ed446
* warnings be gone.Andreas Huber2014-04-111-2/+2
| | | | | | | | (cherry picked from commit 84333e0475bc911adc16417f4ca327c975cf6c36) Modified by Mark Salyzyn <salyzyn@google.com> to keep merge conflicts or errors downstream to a minimum. Change-Id: Ic3b272f9cbf3155001aabd2f79728f1bc31de613
* Make frameworks/av 64-bit compatibleKévin PETIT2014-02-111-1/+1
| | | | | | | | | | | | Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
* IOMX: Add prepareForAdaptivePlayback methodLajos Molnar2013-10-031-0/+7
| | | | | | | | | | | | | 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/+7
| | | | | | | | | 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/+9
| | | | | | i.e. feed no more input frames to the encoder while suspended. Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
* Implement Surface input to MediaCodec.Andy McFadden2013-03-041-0/+14
| | | | | | | | | Also, renamed a CHECK_INTERFACE macro that was clashing with the Binder version. Bug 7991062 Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0
* Synchronize access to OMX class member variablesHaynes Mathew George2012-07-201-7/+10
| | | | | | - Protect access to mLiveNodes KeyedVector member variable in freeNode function Change-Id: Ic86844aabc2bc897ffb7fc91cd1f54254f5e29fe
* Fix assertion triggered when mediaserver dies at roughly the sameAndreas Huber2012-05-011-1/+5
| | | | | | | time that a client attempts to explicitly free an OMX node. Change-Id: I767e6af402801357da20b328611cc7cddeed0260 related-to-bug: 6012750
* Move away from MediaDebug and use ADebug insteadJames Dong2012-02-101-2/+2
| | | | Change-Id: I963a3b6f79a7292891973cbeeaf3378b38629f08
* Slighly improve the API to discover if the OMX stack is running in the localAndreas Huber2012-01-311-1/+1
| | | | | | process. Change-Id: Idd3c2f0d4a9542af01a3fdfd3b0bfab90e083505
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-5/+5
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Stagefright: idle OMX after ANW errorsJamie Gennis2011-10-191-0/+6
| | | | | | | | | | | | | | 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
* Various improvements to nuplayer playbackAndreas Huber2011-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | - Drastically cut down the number of times we supply the AudioSink with data by estimating the time until the sink would run out of data and then scheduling a refill in advance of that. - Use a dedicated looper for video decoders since they are currently taking too long to return from OMX_FillThisBuffer (bug 5325201) - Revise thread priorities for the OMX dispatcher and software codecs, instead of running them at ANDROID_PRIORITY_AUDIO, they now only run at ANDROID_PRIORITY_FOREGROUND - Since threads created by pthread_create inherit all of the parent threads attributes including thread priority, briefly reset thread priority to ANDROID_PRIORITY_FOREGROUND before instantiating OMX components and then restore it. Change-Id: If9332a3a20dad5485333d68c11de0d2d5d3fffc3
* Bug 5031179 possible fix for assert in joinGlenn Kasten2011-07-141-2/+7
| | | | Change-Id: Id3a24c152579b8fdcfb9d66a11aa11579406a7ec
* OMX CallbackDispatcher uses C++ Thread not pthreadGlenn Kasten2011-07-121-28/+35
| | | | | | This permits leveraging future improvements to Thread. Change-Id: I45e25a309e7edd1d4f0dacc5ec987329afa497d9
* Remove unneeded #include <sys/resource.h>Glenn Kasten2011-06-151-1/+0
| | | | | | Suggested in code review for previous change. Change-Id: Ic3225b240367dc6c9bf56fb4498fb8a0f9f806ec
* Bug 4608375Glenn Kasten2011-06-141-1/+1
| | | | | | Update priority and policy together for audio threads Change-Id: Ib3b07b32586c222c4aacbf23414ae8b05db502be
* Add an OMX IL API for querying buffer usage flags.Jamie Gennis2011-02-281-0/+5
| | | | | | | | | | 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
* Avoid deadlock in OMX::freeNode by making sure OMXCodecObserver does not ↵James Dong2011-01-101-3/+9
| | | | | | | | hold the last reference of OMXCodec object bug - 3336424 Change-Id: I4c79b66a900c527e3ae6a833f76d5da1b75c5a89
* Remove all traces of legacy renderer support in stagefright.Andreas Huber2010-11-161-109/+0
| | | | Change-Id: I17b8e0dbf53fca37c96830c41131b4bc0c24ca6d
* OMX extension to support storing meta data in video input buffers during ↵James Dong2010-10-211-0/+5
| | | | | | | | recording bug - 3042125 Change-Id: I7543809fa4ff61d48da35eec6c2bd5eaa7e8cead
* am 7bc600cb: am f98197a7: Make sure the message dispatcher stays around ↵Andreas Huber2010-09-171-3/+5
|\ | | | | | | | | | | | | | | | | until after OMX_FreeHandle is finished in case it posts some more messages during shutdown. Clear the source as soon as possible in OMXCodec\'s destructor. Merge commit '7bc600cb08394e60eef984843976d4f79e5d94e8' * commit '7bc600cb08394e60eef984843976d4f79e5d94e8': Make sure the message dispatcher stays around until after OMX_FreeHandle is finished in case it posts some more messages during shutdown. Clear the source as soon as possible in OMXCodec's destructor.
| * Make sure the message dispatcher stays around until after OMX_FreeHandle is ↵Andreas Huber2010-09-171-3/+5
| | | | | | | | | | | | finished in case it posts some more messages during shutdown. Clear the source as soon as possible in OMXCodec's destructor. Change-Id: I9c896cf07dea0c3201b6f074dbaf27e6d85cd784
* | Add the new Stagefright ANativeWindow OMX codec API.Jamie Gennis2010-09-031-1/+12
| | | | | | | | | | | | | | | | | | | | | | 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-12/+1
| | | | | | | | | | This reverts commit 8a643b411e1802977f742709113ce01b06a18e12, reversing changes made to 73ea9beaf8eb3d0027e78cbc0ac5e626c3f8deb4.
* | Add the new Stagefright ANativeWindow OMX codec API.Jamie Gennis2010-09-011-1/+12
| | | | | | | | | | | | | | | | 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
* | Squashed commit of the following:Andreas Huber2010-08-231-0/+5
|/ | | | | | | | | | | | | | | | | | | | | | commit 35cc68814a9537c31fde146e171e7b0bbdfe211e Author: Andreas Huber <andih@google.com> Date: Mon Aug 16 08:48:42 2010 -0700 Only enable support for yuv to yuv conversion on passion, where it's available, use the slower yuv->rgb565 path everywhere else. commit d8ac5a8814103e60d11d2acf61997fc31a1dc58d Author: Andreas Huber <andih@google.com> Date: Fri Aug 13 13:56:44 2010 -0700 The software renderer takes over all rendering, converting from yuv to yuv if possible and rgb565 otherwise. commit 684972074b74318bdcb826ed9b5b0864d2d2e273 Author: Andreas Huber <andih@google.com> Date: Fri Aug 13 09:34:35 2010 -0700 A first shot at supporting the new rendering APIs. Change-Id: Iea9b32856da46950501f1a700f616b5feac710fd