title: Is there any way to get byte data from android camera2 for each frame?
body: <p>As per old camera api by following the below code.</p>
  
  <pre><code>mCameraInstance.camera.addCallbackBuffer(imageBuffer);&lt;br&gt;
  mCameraInstance.camera.setPreviewCallbackWithBuffer(new Camera.PreviewCallback() {
     @Override
     public void onPreviewFrame(byte[] data, Camera camera) {
        processData(data);
        if (mCameraInstance != null)
              mCameraInstance.camera.addCallbackBuffer(imageBuffer);
        }
     });
  </code></pre>
  
  <p>I can get byte data each sec for every frame by using the above code. Is there any way to achieve this functionality in android camera2api.
  Is there any way to achieve the similar funtionality in android 2</p>