OSDN Git Service

BufferQueue: Increase max slots from 32 to 64
authorDan Stoza <stoza@google.com>
Wed, 9 Apr 2014 23:10:53 +0000 (16:10 -0700)
committerDan Stoza <stoza@google.com>
Fri, 11 Apr 2014 22:13:02 +0000 (15:13 -0700)
Increases NUM_BUFFER_SLOTS from 32 to 64 and changes the mask
returned by IGBC::getReleasedBuffers from 32 to 64 bits.

Bug: 13174352
Change-Id: I1c41256ffbc30abcf9f7b0b5fcf53da40462da28

media/libstagefright/omx/GraphicBufferSource.cpp

index 1be76b3..0b4a616 100644 (file)
@@ -27,6 +27,8 @@
 #include <media/hardware/MetadataBufferType.h>
 #include <ui/GraphicBuffer.h>
 
+#include <inttypes.h>
+
 namespace android {
 
 static const bool EXTRA_CHECK = true;
@@ -761,13 +763,13 @@ void GraphicBufferSource::onFrameAvailable() {
 void GraphicBufferSource::onBuffersReleased() {
     Mutex::Autolock lock(mMutex);
 
-    uint32_t slotMask;
+    uint64_t slotMask;
     if (mConsumer->getReleasedBuffers(&slotMask) != NO_ERROR) {
         ALOGW("onBuffersReleased: unable to get released buffer set");
-        slotMask = 0xffffffff;
+        slotMask = 0xffffffffffffffffULL;
     }
 
-    ALOGV("onBuffersReleased: 0x%08x", slotMask);
+    ALOGV("onBuffersReleased: 0x%016" PRIx64, slotMask);
 
     for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) {
         if ((slotMask & 0x01) != 0) {