cameraview
cameraview copied to clipboard
Added preview callback
Callback to get preview byte data
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.
- If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
- If you signed the CLA as a corporation, please let us know the company's name.
I signed it!
Camera1 on device HTC Butterfly 4.3 API 18 not call
mCamera.setPreviewCallback(new Camera.PreviewCallback() {
@Override
public void onPreviewFrame(byte[] data, Camera camera) {
Timber.e("onPreviewFrame");
final Camera.Parameters parameters = camera.getParameters();
final int width = parameters.getPreviewSize().width;
final int height = parameters.getPreviewSize().height;
mCallback.onPreviewFrame(data, parameters.getPreviewFormat(), width, height);
}
});
I fix it
@Override public void onSurfaceChanged() { if (mCamera != null) { setUpPreview(); adjustCameraParameters(); mCamera.setPreviewCallback(Camera1.this); } }
Any progress on this? I'm trying to get ML Kit to work but the example code uses Camera 1 API and lags terribly and this here seems like the perfect match but is not yet included 😭.