@Override public void setCallback(VideoCaptureAndroid captureAndroid, int numCaptureBuffers, int bufSize, Camera camera) { // According to Doc addCallbackBuffer belongs to API level 8. // But it seems like it works on Android 2.1 as well. // At least SE X10 and Milestone byte[] buffer = null; for (int i = 0; i < numCaptureBuffers; i++) { buffer = new byte[bufSize]; camera.addCallbackBuffer(buffer); } camera.setPreviewCallbackWithBuffer(captureAndroid); ownsBuffers = true; }
@Override public void setCallback(VideoCaptureAndroid captureAndroid, int numCaptureBuffers, int bufSize, Camera camera) { camera.setPreviewCallback(captureAndroid); }
@Override public void setCallback(VideoCaptureAndroid captureAndroid, int numCaptureBuffers, int bufSize, Camera camera) { // TODO Auto-generated method stub }
/** * Set the callback for video camera. depending on android version it may use the VideoCaptureAndroid as preview call back or use some buffer callback * @param captureAndroid the VideoCaptureAndroid instance * @param numCaptureBuffers number of capture buffers avail * @param bufSize buffer size * @param camera camera to use */ public abstract void setCallback(VideoCaptureAndroid captureAndroid, int numCaptureBuffers, int bufSize, Camera camera);