Home | History | Annotate | Download | only in testingcamera

Lines Matching refs:CAMERA

24 import android.hardware.Camera;
25 import android.hardware.Camera.Parameters;
26 import android.hardware.Camera.ErrorCallback;
67 * A simple test application for the camera API.
69 * The goal of this application is to allow all camera API features to be
73 implements SurfaceHolder.Callback, Camera.PreviewCallback,
74 Camera.ErrorCallback {
114 /** Camera state */
116 private Camera mCamera;
117 private Camera.Parameters mParams;
118 private List<Camera.Size> mPreviewSizes;
128 private List<Camera.Size> mSnapshotSizes;
132 private List<Camera.Size> mVideoRecordSizes;
276 int numCameras = Camera.getNumberOfCameras();
280 cameraNames[i + 1] = "Camera " + i;
312 log("onPause: Not releasing camera");
319 log("onPause: Releasing camera");
515 if (focusMode == Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE ||
516 focusMode == Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO) {
548 private Camera.AutoFocusCallback mAutofocusCallback =
549 new Camera.AutoFocusCallback() {
551 public void onAutoFocus(boolean success, Camera camera) {
556 private Camera.AutoFocusMoveCallback mAutofocusMoveCallback =
557 new Camera.AutoFocusMoveCallback() {
559 public void onAutoFocusMoving(boolean start, Camera camera) {
640 Camera.Size s = mVideoRecordSizes.get(i);
717 private Camera.ShutterCallback mShutterCb = new Camera.ShutterCallback() {
724 private Camera.PictureCallback mRawCb = new Camera.PictureCallback() {
726 public void onPictureTaken(byte[] data, Camera camera) {
731 private Camera.PictureCallback mPostviewCb = new Camera.PictureCallback() {
733 public void onPictureTaken(byte[] data, Camera camera) {
738 private Camera.PictureCallback mJpegCb = new Camera.PictureCallback() {
740 public void onPictureTaken(byte[] data, Camera camera) {
822 log("Setting up camera " + mCameraId);
826 log("Opening camera " + mCameraId);
829 mCamera = Camera.open(mCameraId);
831 logE("Exception opening camera: " + e.getMessage());
845 log("Configuring camera");
907 log("Closing old camera");
947 // this camera has no flash
963 private void updatePreviewSizes(Camera.Parameters params) {
968 for (Camera.Size previewSize: mPreviewSizes) {
1013 private void updatePreviewFormats(Camera.Parameters params) {
1035 private void updateSnapshotSizes(Camera.Parameters params) {
1041 for (Camera.Size snapshotSize : mSnapshotSizes) {
1118 List<Camera.Size> videoSizes = mParams.getSupportedVideoSizes();
1125 mVideoRecordSizes = new ArrayList<Camera.Size>();
1130 for (Camera.Size s : videoSizes) {
1245 public void onPreviewFrame(byte[] data, Camera camera) {
1269 public void onError(int error, Camera camera) {
1272 case Camera.CAMERA_ERROR_SERVER_DIED:
1275 case Camera.CAMERA_ERROR_UNKNOWN:
1282 logE("Camera error received: " + errorName + " (" + error + ")" );
1283 logE("Shutting down camera");
1384 mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
1386 Camera.Size videoRecordSize = mVideoRecordSizes.get(mVideoRecordSize);