summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-07-10 18:59:06 -0700
committerLajos Molnar <lajos@google.com>2015-07-13 16:33:41 -0700
commite3635355e4cae5af7550b49888c6a0e3530b8aea (patch)
treee0abd9257076174e3a61a9f751dcbb0a472137bc /include
parent4b33e0838fdb1b5e545449add02005916b512c99 (diff)
downloadframeworks_av-e3635355e4cae5af7550b49888c6a0e3530b8aea.zip
frameworks_av-e3635355e4cae5af7550b49888c6a0e3530b8aea.tar.gz
frameworks_av-e3635355e4cae5af7550b49888c6a0e3530b8aea.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/ACodec.h4
1 files changed, 3 insertions, 1 deletions
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<MemoryDealer> mDealer[2];
sp<ANativeWindow> mNativeWindow;
+ int mNativeWindowUsageBits;
sp<AMessage> mInputFormat;
sp<AMessage> mOutputFormat;
sp<AMessage> mBaseOutputFormat;
@@ -266,7 +267,8 @@ private:
status_t freeBuffer(OMX_U32 portIndex, size_t i);
status_t handleSetSurface(const sp<Surface> &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,