Add helper class for dealing with gralloc.

The helper class deals with choosing the correct locking/unlocking,
and conversion to correct yuv buffer format.

BUG: 29335262
TEST: With some follow up CLs to implement data capture, manually
tested by adjusting gralloc implementation:
  * Jpeg
  * YUV
    * Packed planar
    * Packed semiplanar
    * cstep 4 semiplanar
    * packed planar with extra y padding
    * packed planar with extra y & c padding
    * packed semiplanar with extra y & c padding
Did not test gralloc with less padding than camera, as the test
camera being used has 0 padding to begin with.

Change-Id: Icc5e9b8955cf6e983072b269fd60aefbfd79f883
diff --git a/modules/camera/3_4/V4L2Camera.h b/modules/camera/3_4/V4L2Camera.h
index c9a7a71..bb6aac8 100644
--- a/modules/camera/3_4/V4L2Camera.h
+++ b/modules/camera/3_4/V4L2Camera.h
@@ -29,6 +29,7 @@
 #include "ArrayVector.h"
 #include "Camera.h"
 #include "Common.h"
+#include "V4L2Gralloc.h"
 
 namespace v4l2_camera_hal {
 // V4L2Camera is a specific V4L2-supported camera device. The Camera object
@@ -75,6 +76,8 @@
   const std::string mDevicePath;
   // The opened device fd.
   ScopedFd mDeviceFd;
+  // Gralloc helper.
+  V4L2Gralloc mGralloc;
   // Lock protecting use of the device.
   android::Mutex mDeviceLock;
   // Wrapper around ioctl.
@@ -86,6 +89,7 @@
   uint32_t mOutStreamFormat;
   uint32_t mOutStreamWidth;
   uint32_t mOutStreamHeight;
+  uint32_t mOutStreamBytesPerLine;
   uint32_t mOutStreamMaxBuffers;
 
   bool mTemplatesInitialized;