ICameraDeviceUser.aidl revision a7677722304670dc07feef242156b97e6bb51bcd
1/* 2 * Copyright (C) 2013 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 android.hardware.camera2; 18 19import android.hardware.camera2.CaptureRequest; 20import android.hardware.camera2.impl.CameraMetadataNative; 21import android.hardware.camera2.params.OutputConfiguration; 22import android.hardware.camera2.utils.LongParcelable; 23import android.view.Surface; 24 25/** @hide */ 26interface ICameraDeviceUser 27{ 28 /** 29 * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceUser.h and 30 * frameworks/base/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java 31 */ 32 void disconnect(); 33 34 // ints here are status_t 35 36 // non-negative value is the requestId. negative value is status_t 37 int submitRequest(in CaptureRequest request, boolean streaming, 38 out LongParcelable lastFrameNumber); 39 40 int submitRequestList(in List<CaptureRequest> requestList, boolean streaming, 41 out LongParcelable lastFrameNumber); 42 43 int cancelRequest(int requestId, out LongParcelable lastFrameNumber); 44 45 /** 46 * Begin the device configuration. 47 * 48 * <p> 49 * beginConfigure must be called before any call to deleteStream, createStream, 50 * or endConfigure. It is not valid to call this when the device is not idle. 51 * <p> 52 */ 53 int beginConfigure(); 54 55 /** 56 * End the device configuration. 57 * 58 * <p> 59 * endConfigure must be called after stream configuration is complete (i.e. after 60 * a call to beginConfigure and subsequent createStream/deleteStream calls). This 61 * must be called before any requests can be submitted. 62 * <p> 63 */ 64 int endConfigure(boolean isConstrainedHighSpeed); 65 66 int deleteStream(int streamId); 67 68 // non-negative value is the stream ID. negative value is status_t 69 int createStream(in OutputConfiguration outputConfiguration); 70 71 /** 72 * Create an input stream 73 * 74 * <p>Create an input stream of width, height, and format</p> 75 * 76 * @param width Width of the input buffers 77 * @param height Height of the input buffers 78 * @param format Format of the input buffers. One of HAL_PIXEL_FORMAT_*. 79 * 80 * @return stream ID if it's a non-negative value. status_t if it's a negative value. 81 */ 82 int createInputStream(int width, int height, int format); 83 84 /** 85 * Get the surface of the input stream. 86 * 87 * <p>It's valid to call this method only after a stream configuration is completed 88 * successfully and the stream configuration includes a input stream.</p> 89 * 90 * @param surface An output argument for the surface of the input stream buffer queue. 91 */ 92 int getInputSurface(out Surface surface); 93 94 int createDefaultRequest(int templateId, out CameraMetadataNative request); 95 96 int getCameraInfo(out CameraMetadataNative info); 97 98 int waitUntilIdle(); 99 100 int flush(out LongParcelable lastFrameNumber); 101 102 int prepare(int streamId); 103} 104