From e3635355e4cae5af7550b49888c6a0e3530b8aea Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Fri, 10 Jul 2015 18:59:06 -0700 Subject: MediaCodec: consider usage bits when changing surface. The new surface cannot add usage bits not already present (as already existing buffers may become unusable for the surface). Bug: 22414343 Change-Id: Id8169c79cd0994be134a16782dd04687e46ca1dd --- include/media/stagefright/ACodec.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h index a4b24d7..2ca3f1c 100644 --- a/include/media/stagefright/ACodec.h +++ b/include/media/stagefright/ACodec.h @@ -215,6 +215,7 @@ private: sp mDealer[2]; sp mNativeWindow; + int mNativeWindowUsageBits; sp mInputFormat; sp mOutputFormat; sp mBaseOutputFormat; @@ -266,7 +267,8 @@ private: status_t freeBuffer(OMX_U32 portIndex, size_t i); status_t handleSetSurface(const sp &surface); - status_t setupNativeWindowSizeFormatAndUsage(ANativeWindow *nativeWindow /* nonnull */); + status_t setupNativeWindowSizeFormatAndUsage( + ANativeWindow *nativeWindow /* nonnull */, int *finalUsage /* nonnull */); status_t configureOutputBuffersFromNativeWindow( OMX_U32 *nBufferCount, OMX_U32 *nBufferSize, -- cgit v1.1