CameraActions.java revision 25ee73acd2dbd6f60deef5306994fbf3a7997936
1/* 2 * Copyright (C) 2014 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"), 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.android.ex.camera2.portability; 18 19class CameraActions { 20 // Camera initialization/finalization 21 public static final int OPEN_CAMERA = 1; 22 public static final int RELEASE = 2; 23 public static final int RECONNECT = 3; 24 public static final int UNLOCK = 4; 25 public static final int LOCK = 5; 26 // Preview 27 public static final int SET_PREVIEW_TEXTURE_ASYNC = 101; 28 public static final int START_PREVIEW_ASYNC = 102; 29 public static final int STOP_PREVIEW = 103; 30 public static final int SET_PREVIEW_CALLBACK_WITH_BUFFER = 104; 31 public static final int ADD_CALLBACK_BUFFER = 105; 32 public static final int SET_PREVIEW_DISPLAY_ASYNC = 106; 33 public static final int SET_PREVIEW_CALLBACK = 107; 34 public static final int SET_ONE_SHOT_PREVIEW_CALLBACK = 108; 35 // Parameters 36 public static final int SET_PARAMETERS = 201; 37 public static final int GET_PARAMETERS = 202; 38 public static final int REFRESH_PARAMETERS = 203; 39 public static final int APPLY_SETTINGS = 204; 40 // Focus, Zoom 41 public static final int AUTO_FOCUS = 301; 42 public static final int CANCEL_AUTO_FOCUS = 302; 43 public static final int SET_AUTO_FOCUS_MOVE_CALLBACK = 303; 44 public static final int SET_ZOOM_CHANGE_LISTENER = 304; 45 // Face detection 46 public static final int SET_FACE_DETECTION_LISTENER = 461; 47 public static final int START_FACE_DETECTION = 462; 48 public static final int STOP_FACE_DETECTION = 463; 49 public static final int SET_ERROR_CALLBACK = 464; 50 // Presentation 51 public static final int ENABLE_SHUTTER_SOUND = 501; 52 public static final int SET_DISPLAY_ORIENTATION = 502; 53 public static final int SET_JPEG_ORIENTATION = 503; 54 // Capture 55 public static final int CAPTURE_PHOTO = 601; 56} 57