summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/SurfaceMediaSource.h
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2013-05-15 12:59:19 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-05-23 22:18:58 +0000
commitd030447b617105b31bf3013e5e4b39d422b53b77 (patch)
tree3fd684f2a58933a94692c3d23da22087d3da29ea /include/media/stagefright/SurfaceMediaSource.h
parent599d83e4f2197968d77d3d106630179c88c8a6d7 (diff)
downloadframeworks_av-d030447b617105b31bf3013e5e4b39d422b53b77.zip
frameworks_av-d030447b617105b31bf3013e5e4b39d422b53b77.tar.gz
frameworks_av-d030447b617105b31bf3013e5e4b39d422b53b77.tar.bz2
stagefright: BufferProducer updates
Update BufferQueue and ConsumerBase users to new BufferQueue API, to allow BufferQueue slots to be reused. Buffer consumers generally now need to track the unique frameNumber belonging to each frame acquired if they are using BufferQueue directly. Otherwise, they can simply track the graphicBuffer. Change-Id: I30ee3158cf40fb10bbd085241646d5f1128ee480 Signed-off-by: Lajos Molnar <lajos@google.com> Related-to-bug: 7093648
Diffstat (limited to 'include/media/stagefright/SurfaceMediaSource.h')
-rw-r--r--include/media/stagefright/SurfaceMediaSource.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/media/stagefright/SurfaceMediaSource.h b/include/media/stagefright/SurfaceMediaSource.h
index 5f21da9..7d40379 100644
--- a/include/media/stagefright/SurfaceMediaSource.h
+++ b/include/media/stagefright/SurfaceMediaSource.h
@@ -146,9 +146,13 @@ private:
// this consumer
sp<BufferQueue> mBufferQueue;
- // mBufferSlot caches GraphicBuffers from the buffer queue
- sp<GraphicBuffer> mBufferSlot[BufferQueue::NUM_BUFFER_SLOTS];
+ struct SlotData {
+ sp<GraphicBuffer> mGraphicBuffer;
+ uint64_t mFrameNumber;
+ };
+ // mSlots caches GraphicBuffers and frameNumbers from the buffer queue
+ SlotData mSlots[BufferQueue::NUM_BUFFER_SLOTS];
// The permenent width and height of SMS buffers
int mWidth;