CameraActions.java revision cef46862d6937bc98bf1a6b087c5daa22b5239f3
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 // Focus, Zoom 40 public static final int AUTO_FOCUS = 301; 41 public static final int CANCEL_AUTO_FOCUS = 302; 42 public static final int SET_AUTO_FOCUS_MOVE_CALLBACK = 303; 43 public static final int SET_ZOOM_CHANGE_LISTENER = 304; 44 // Face detection 45 public static final int SET_FACE_DETECTION_LISTENER = 461; 46 public static final int START_FACE_DETECTION = 462; 47 public static final int STOP_FACE_DETECTION = 463; 48 public static final int SET_ERROR_CALLBACK = 464; 49 // Presentation 50 public static final int ENABLE_SHUTTER_SOUND = 501; 51 public static final int SET_DISPLAY_ORIENTATION = 502; 52 // Capture 53 public static final int CAPTURE_PHOTO = 601; 54} 55