diff options
author | Daniel Levin <dendy@ti.com> | 2012-10-16 19:17:54 +0300 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-22 16:11:53 +0200 |
commit | ad76a7189cf1777b873f9f3a45705dac67e5e589 (patch) | |
tree | 14b8f73c6ae9e527b811f107ceebee3e296cd23a /test/VTC | |
parent | e1fbcc3c33dddd8392895a2ac694d0eeb2d68d8f (diff) | |
download | hardware_ti_omap4-ad76a7189cf1777b873f9f3a45705dac67e5e589.zip hardware_ti_omap4-ad76a7189cf1777b873f9f3a45705dac67e5e589.tar.gz hardware_ti_omap4-ad76a7189cf1777b873f9f3a45705dac67e5e589.tar.bz2 |
Camera: Fix the camera_test code for new ANW API
Source compatibility with JB MR0 ANW API is preserved by using the
ANDROID_API_JB_MR1_OR_LATER conditional build.
Change-Id: Ic67af4cf31a058e3cbddafb44b5c33fd8ab9d348
Signed-off-by: Daniel Levin <dendy@ti.com>
Diffstat (limited to 'test/VTC')
-rw-r--r-- | test/VTC/IOMXDecoder.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/VTC/IOMXDecoder.cpp b/test/VTC/IOMXDecoder.cpp index 723bca9..cd1ab2a 100644 --- a/test/VTC/IOMXDecoder.cpp +++ b/test/VTC/IOMXDecoder.cpp @@ -721,7 +721,11 @@ status_t OMXDecoder::FillBufferDone(OMX_BUFFERHEADERTYPE* pBufferHdr) { if (mDebugFlags & FPS_DECODER) PrintDecoderFPS(); ANativeWindowBuffer* buf; +#ifdef ANDROID_API_JB_MR1_OR_LATER + err = mNativeWindow->dequeueBuffer_DEPRECATED(mNativeWindow.get(), &buf); +#else err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf); +#endif if (err != 0) { VTC_LOGE("dequeueBuffer failed w/ error 0x%08x", err); return -1; @@ -983,7 +987,11 @@ status_t OMXDecoder::allocateOutputBuffersFromNativeWindow() { // Dequeue buffers and send them to OMX for (i = 0; i < nBufferCnt; i++) { ANativeWindowBuffer* buf; +#ifdef ANDROID_API_JB_MR1_OR_LATER + err = mNativeWindow->dequeueBuffer_DEPRECATED(mNativeWindow.get(), &buf); +#else err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf); +#endif if (err != 0) { VTC_LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err); break; |