summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* MediaCodec: resume codec if state is FLUSHED in async modeChong Zhang2014-11-261-0/+2
| | | | | | bug: 18513091 Change-Id: I192625c61834584f711de76db788c2c0332ae774
* Merge "MediaCodec: Prevent stop() in the UNINITIALIZED state" into lmp-mr1-devAndy Hung2014-11-111-2/+5
|\
| * MediaCodec: Prevent stop() in the UNINITIALIZED stateAndy Hung2014-11-041-2/+5
| | | | | | | | | | | | | | | | Return INVALID_OPERATION instead. This is a corner case when the decoder is still allocated, occurring after codec error. Bug: 18121124 Change-Id: If87e44dd40db48f63f965b765205f1e733663efd
* | Pass resolution to Crypto plugin on format changeJeff Tinker2014-11-031-0/+10
|/ | | | | Change-Id: I56cd557ce3525fe625db8c312d2557d3c8b51101 related-to-bug: 16034599
* Stagefright: MediaCodec: shutdown allocated codec on errorPraveen Chavan2014-10-211-2/+6
| | | | | | | | | | | | If MediaCodec sees a fatal error and transitions to UNINITIALIZED state, The codec may still be alive (with an exception of 'mediaserver-died' error). Handle Shutdown of the codec during release(). Bug: 17784012 Bug: 18033275 Change-Id: I891e036499d9b440a57f77fb735a5ba4da9a6e43
* MediaCodec: fix onError and onInputBufferAvailableLajos Molnar2014-10-091-9/+15
| | | | | | | | - don't call onInputBufferAvailable if we created an input surface - keep component name alive if an error occurs Bug: 17934966 Change-Id: I396c6e6cfd9fa589a1a95c6169492089255e6993
* send available codec buffer count with codec notificationChong Zhang2014-10-021-2/+15
| | | | | Bug: 14679336 Change-Id: Id927c96a9a14dd6ecd72540f0037d5841aa32154
* stagefright: return encrypted input buffer for secure codecsLajos Molnar2014-09-231-1/+6
| | | | | Bug: 17630446 Change-Id: I8a9352bcd00a3f4eb6fd2797d6809a8c1edc8482
* MediaCodec: Fix deallocated pointer reference when calling reset()Andy Hung2014-09-221-3/+3
| | | | | | | | The name pointer argument in MediaCodec::init() was being implicitly deallocated. Bug: 17499622 Change-Id: If9409f95674e52d1478f969f77693c4d27ff1ff2
* fix failure in MediaCodecTest#testExceptionChong Zhang2014-09-101-1/+14
| | | | | | | reset codec after failed configure() Bug: 17418876 Change-Id: I21ff8a0751dae6a164678015142e11d481403bed
* MediaCodec: set state to UNINITIALIZED when receiving fatal error.Wei Jia2014-08-291-2/+4
| | | | | | | NuPlayerDecoder: release MediaCodec when handling an error. Bug: 16661923 Change-Id: I1b6fd7ee5cc1136b3f289135e5360cd3d98f9799
* MediaCodec: handle errors during flushing.Wei Jia2014-08-221-6/+10
| | | | | | Bug: 17068327 Bug: 13133027 Change-Id: I06caf79b90ebf55d6d7561cb82516c0b6c66f0e4
* Merge "handle error during flush in MediaPlayer.reset()" into lmp-devMarco Nelissen2014-08-191-3/+8
|\
| * handle error during flush in MediaPlayer.reset()Marco Nelissen2014-08-201-3/+8
| | | | | | | | | | | | | | | | | | If there was an error during the flush phase of a reset, then the reset would never complete. We now make sure the MediaCodec moves to the right state in this case, and that NuPlayer cleans up and resumes the rest of the reset after a failed flush. Bug: 16955082 Change-Id: Ied61136871a9fcdffcc80647fa2bba64a926ac2a
* | stagefright: Fix race condition between MediaCodec and SoftwareRendererRonghua Wu2014-08-151-29/+9
|/ | | | | | | | | | | * Set the buffer's format info when it's returned from OMX component. * Move frame format meta from SoftwareRenderer's ctor to the render call. I.e. each frame sent to the renderer carries the format info. * Reset renderer with the new format instead of re-creating SoftwareRenderer when incoming frame's format is changed. Bug: 13842676 Change-Id: Ibab46f109200bcbdeab13a4cc1bcd0870f2a99fb
* Merge "Clarify and implement MediaCodec status codes" into lmp-devAndy Hung2014-08-071-36/+78
|\
| * Clarify and implement MediaCodec status codesAndy Hung2014-08-071-36/+78
| | | | | | | | | | | | | | | | | | | | | | Clarify MediaCodec status codes in MediaError.h When appropriate, return OMX error codes for status. Optionally return a status code from CreateByType() and CreateByComponentName(). Bug: 12034929 Bug: 13976475 Change-Id: I7463dd08d101074f730481b26127a69c9186c97e
* | stagefright: rework media codec list and infosLajos Molnar2014-08-071-8/+8
|/ | | | | | | | This is in preparation of serving the codec list and codec infos from the mediaserver Bug: 11990470 Change-Id: Ib8e2708679c9ce461a4ba179974a740cdcdf2731
* stagefright: MediaCodec async operations.Lajos Molnar2014-07-301-17/+33
| | | | | | | | | | In async mode: - codec must be restarted after flush - dequeueIn/OutputBuffers fail - getIn/OutputBuffers fail Bug: 11990118 Change-Id: If2d6a76ab499ee9ed4a11486fb537acbc52e66f6
* stagefright: add flexible YUV supportLajos Molnar2014-07-251-0/+12
| | | | | Bug: 10706245 Change-Id: Icd246f22edfc67ed5240d59f5a5bde3e5f749465
* update battery stats for video/audioChong Zhang2014-07-221-6/+109
| | | | | | Bug: 12979595 Change-Id: Iafd93046a4fd9f22bcd66084deace746a7ca5d3c
* stagefright: add MediaCodec.reset()Lajos Molnar2014-07-151-0/+43
| | | | | Bug: 12034929 Change-Id: I326f1356df89474aa088c1c87f8505b33654139d
* MediaCodec: change onError cb to return CodecExceptionChong Zhang2014-07-111-4/+8
| | | | | Bug: 11990118 Change-Id: I3278aecb20df88c42fa2709a66e6166eb3cbe56f
* MediaCodec async callbacksChong Zhang2014-07-111-91/+173
| | | | | | Bug: 11990118 Change-Id: I6fe4b407d9c85cddec8d958620d5d356735273cf
* stagefright: add indexed buffer and format getters to MediaCodecLajos Molnar2014-07-111-5/+60
| | | | | | | | | | These are designed to be called from the same thread as the one calling dequeue?Buffer, and use a mutex to avoid switching context. All other calls of MediaCodec are designed to be blocking and synchronous. Bug: 14297827 Change-Id: If341c6e4407ca6f10f5e0d47008dddc0e20b0a50
* stagefright: update MediaCodec to use CodecBase instead of ACodecLajos Molnar2014-07-071-17/+18
| | | | | | | MediaCodec still creates an ACodec instance in init() Bug: 11784825 Change-Id: Ifba1e1582c788056c0e59afdf68cd3a504ab3679
* libstagefright: 64-bit compile warningsMark Salyzyn2014-06-261-1/+1
| | | | Change-Id: I3d1146714fa23be3d4e696599b6f70cac1f9d28b
* ACodec: remove PTS log spamLajos Molnar2014-05-151-1/+1
| | | | | | Bug: 14976517 Bug: 11784827 Change-Id: Ibc1bbd80e7aac30b0f8f1e9ca2be1bb3e5e2ebbb
* Update OMX messages for 64 bitAndy Hung2014-05-141-2/+2
| | | | | | | | | 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>
* MediaCodec: add renderAndReleaseOutputBuffer() method with timestampLajos Molnar2014-05-081-1/+28
| | | | | Bug: 11784827 Change-Id: Ia1dcbd6c1d1a4380db04b750c0eb3fa0bd58d7b4
* MediaCodec: move to UNINITIALIZED state on codec errorLajos Molnar2014-03-311-0/+2
| | | | | | | | | ACodec moves to Uninitialized state after receiving codec error. Make MediaCodec also move to the same state, so stop() and release() will work correctly. Bug: 13675112 Change-Id: I1c7e8b274f68345fc0e6a55c70dff6c7a4fb2e72
* MediaCodec: add getInputFormat() methodLajos Molnar2014-03-101-3/+25
| | | | | | | | | | | | | | | | | | | Additional input-port format item: int32: "adaptive-playback" video decoders only whether codec is configured for adaptive playback. In this case, if codec has max-width/height limits, those limits are also exposed (int32: "max-width", "max-height") Also, getInput/OutputFormat() is now callable in CONFIGURED and STARTING states, although output format may be missing CSD fields until INFO_OUTPUT_FORMAT_CHANGED message. Includes missing OMX support for MP3 software decoder. Bug: 11785204 Change-Id: I90c7e34ba81c7b81c43641599f3f496e838958c6
* warnings be gone.Andreas Huber2014-02-111-1/+1
| | | | Change-Id: Ie3bae3f037730e316d7fca12e7a3527973f752ef
* correct one logic error in decide whether should render or notJianzheng Zhou2014-02-031-1/+1
| | | | | Change-Id: Ie41663f6fd5a7d983279f14a2228cb57231771bf Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
* am 065789f2: Merge "Restore NuPlayer error and EOS handling" into klp-devLajos Molnar2013-11-041-1/+2
|\ | | | | | | | | * commit '065789f24890b0a9f3614dc175e6f7664af1f2ce': Restore NuPlayer error and EOS handling
| * Restore NuPlayer error and EOS handlingLajos Molnar2013-10-301-1/+2
| | | | | | | | | | | | | | | | This was erroneously removed by commit a73c954 Change-Id: I4742339139e770f0181c99d427875897fd60b68e Signed-off-by: Lajos Molnar <lajos@google.com> Bug: 11413439
* | am 6c63fe0f: am ab70649e: Merge "MediaCodec: Pass the crop rect to ↵Lajos Molnar2013-09-251-0/+6
|\ \ | |/ |/| | | | | | | | | SoftwareRenderer" * commit '6c63fe0fdb33e5e7eb8c89f2420262b072cdd83f': MediaCodec: Pass the crop rect to SoftwareRenderer
| * MediaCodec: Pass the crop rect to SoftwareRendererMartin Storsjo2013-09-251-0/+6
| | | | | | | | Change-Id: I434411516eb5fafe9d7aeac9882bbc7f1a8415d8
| * Don't render buffers that have size 0Marco Nelissen2013-05-101-1/+1
| | | | | | | | | | | | b/8857451 Change-Id: I12a31a2f85af76602db9e6f0ec80632954b3f7ed
| * Support MediaCodec::getOutputFormat for encodersAndreas Huber2013-04-301-2/+76
| | | | | | | | | | | | | | codec specific data is provided as part of the MediaFormat if available. Change-Id: I5a79c936e2411fe66ebc694791071faefc33941e related-to-bug: 8616651
| * 3rd time's the charm, right? Fix another instance where MediaCodec wouldAndreas Huber2013-04-191-26/+28
| | | | | | | | | | | | | | | | not return from a stop() or release() call if mediaserver dies at just the right moment. Change-Id: I7728f8df82d62602d4d272f8023aa88678dd7d95 related-to-bug: 8397711
| * Make sure MediaCodec::stop() and MediaCodec::release() still returnAndreas Huber2013-04-181-1/+23
| | | | | | | | | | | | | | | | instead of blocking indefinitely if the mediaserver died while the call is pending. Change-Id: If2789b7fe99634d947ce4a3bb69c04baff5f8b10 related-to-bug: 8397711
| * Correct MediaCodec + Surface behaviorAndy McFadden2013-03-051-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Implement Surface input to MediaCodec.Andy McFadden2013-03-041-0/+101
| | | | | | | | | | | | | | | | | | Also, renamed a CHECK_INTERFACE macro that was clashing with the Binder version. Bug 7991062 Change-Id: If5e6ed0a06d9f67975497676e4b05abe3aa3d6c0
| * Refactoring: Rename SurfaceTextureClient to SurfaceMathias Agopian2013-02-151-3/+3
| | | | | | | | Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
| * Allow for dynamic reconfiguration of the video bitrate usedAndreas Huber2013-02-071-0/+31
| | | | | | | | | | | | to encode video while running as a wfd source. Change-Id: I44f7b2350c88fc5807047c61bfe594ef8fa79275
| * MediaCodec: Add a method for getting the component nameMartin Storsjo2012-11-191-4/+40
| | | | | | | | | | | | | | | | | | If the codec was chosen based on mime type, the caller does not know what component actually was chosen. This allows getting essential information (such as supported color formats, for a video encoder) for this component. Change-Id: Ie471f40f8104b37d27ced3dba5a54facc6504b1b
| * Better power savings with wifi display code.Andreas Huber2012-10-031-0/+43
| | | | | | | | | | | | | | | | No more polling the encoder for work to do, the encoder instead notifies if there's activity. Change-Id: Ia707211b4f5c5a6e6b70d750233d204a2d6bb778 related-to-bug: 7248248
| * Support IDR requests in wifi display, MediaCodec and ACodec.Andreas Huber2012-09-131-0/+12
| | | | | | | | Change-Id: I596cf8dd61b63465437f78413186fad2be287244
* | Better workaround for slow decoders.Marco Nelissen2013-09-041-4/+19
| | | | | | | | | | | | | | | | | | | | This is more in the spirit of the original code. Now it checks whether a codec instantiated by name is a video codec, and enables the extra looper if so. b/10528409 Change-Id: Ia253c04c1283d4ecf66f213ef4bf523279ad7cca