diff options
| author | James Dong <jdong@google.com> | 2011-08-17 11:14:49 -0700 | 
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-17 11:14:49 -0700 | 
| commit | 1e7d2ba8b79e548286a649ca91402a2d41f59fa0 (patch) | |
| tree | 6ca2fd4af4bb0f273dae9475a53c1431fcfdc490 /media | |
| parent | 8a976a863cf921f97feff8be63f11775a1d8b76f (diff) | |
| parent | 64b944106c697933a453a1ffd8bcddb137fdbc4c (diff) | |
| download | frameworks_av-1e7d2ba8b79e548286a649ca91402a2d41f59fa0.zip frameworks_av-1e7d2ba8b79e548286a649ca91402a2d41f59fa0.tar.gz frameworks_av-1e7d2ba8b79e548286a649ca91402a2d41f59fa0.tar.bz2  | |
Merge "Don't time out prematurely for video encoding waiting for output buffers"
Diffstat (limited to 'media')
| -rwxr-xr-x | media/libstagefright/OMXCodec.cpp | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 644c413..27dfeab 100755 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -3199,9 +3199,16 @@ void OMXCodec::setState(State newState) {  }  status_t OMXCodec::waitForBufferFilled_l() { + +    if (mIsEncoder) { +        // For timelapse video recording, the timelapse video recording may +        // not send an input frame for a _long_ time. Do not use timeout +        // for video encoding. +        return mBufferFilled.wait(mLock); +    }      status_t err = mBufferFilled.waitRelative(mLock, kBufferFilledEventTimeOutUs);      if (err != OK) { -        LOGE("Timed out waiting for buffers from video encoder: %d/%d", +        CODEC_LOGE("Timed out waiting for output buffers: %d/%d",              countBuffersWeOwn(mPortBuffers[kPortIndexInput]),              countBuffersWeOwn(mPortBuffers[kPortIndexOutput]));      }  | 
