title: Android Camera onPreviewFrame frame rate not consistent
body: <p>I am trying to encode a 30 frames per second video using MediaCodec through the Camera's PreviewCall back(onPreviewFrame). The video that I encoded always plays very fast(this is not desired). 
  So, I tried to check the number of frames that is coming into my camera's preview by setting up a int frameCount variable to remember its count. What I am expecting is 30 frames per second because I setup my camera's preview to have 30 fps preview(as shown below). The result that I get back is not the same.
  I called the onPreviewFrame callback for 10 second, the number of frameCount I get back is only about 100 frames. This is bad because I am expecting 300 frames. Is my camera parameters setup correctly? Is this a limitation of Android's Camera preview call back? And if this is a limitation on the Android Camera's preview call back, then is there any other camera callback that can return the camera's image data(nv21,yuv, yv12) in 30 frames per second?</p>
  
  <p>thanks for reading and taking your time to helpout. i would appreciate any comments and opinions.</p>
  
  <p>Here is an example an encoded video using Camera's onPreviewFrame:</p>
  
  <p><a href="http://www.youtube.com/watch?v=I1Eg2bvrHLM&amp;feature=youtu.be" rel="noreferrer">http://www.youtube.com/watch?v=I1Eg2bvrHLM&amp;feature=youtu.be</a></p>
  
  <pre><code>                Camera.Parameters parameters = mCamera.getParameters();
                  parameters.setPreviewFormat(ImageFormat.NV21);
                  parameters.setPictureSize(previewWidth,previewHeight);
                  parameters.setPreviewSize(previewWidth, previewHeight);
  //              parameters.setPreviewFpsRange(30000,30000);
  
                  parameters.setPreviewFrameRate(30);
                  mCamera.setParameters(parameters);
  
                  mCamera.setPreviewCallback(previewCallback);
                  mCamera.setPreviewDisplay(holder);
  </code></pre>