Camera2: Use more buffers for video encoding.

To avoid starvation, set the number of simultaneously available buffers
to the encoder to 8.

Bug: 6243944
Change-Id: I6d0e9f3c0426d62d374c0ae0d427bf5189141adf
diff --git a/services/camera/libcameraservice/Camera2Client.h b/services/camera/libcameraservice/Camera2Client.h
index d7836ca..83fe94e 100644
--- a/services/camera/libcameraservice/Camera2Client.h
+++ b/services/camera/libcameraservice/Camera2Client.h
@@ -238,8 +238,9 @@
     sp<Camera2Heap> mRecordingHeap;
 
     // TODO: This needs to be queried from somewhere, or the BufferQueue needs
-    // to be passed all the way to stagefright
-    static const size_t kRecordingHeapCount = 4;
+    // to be passed all the way to stagefright. Right now, set to a large number
+    // to avoid starvation of the video encoders.
+    static const size_t kRecordingHeapCount = 8;
     size_t mRecordingHeapHead, mRecordingHeapFree;
     // Handle new recording image buffers
     void onRecordingFrameAvailable();