blob: 01f2396805c855542ee3100ba68d74c8d74af02c [file] [log] [blame]
Igor Murashkin70725502013-06-25 20:27:06 +00001/*
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
Eino-Ville Talvala2f1a2e42013-07-25 17:12:05 -070017package android.hardware.camera2;
Igor Murashkin70725502013-06-25 20:27:06 +000018
Yin-Chia Yeh981e0562015-03-12 13:39:26 -070019import android.hardware.camera2.params.OutputConfiguration;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070020import android.hardware.camera2.impl.CameraMetadataNative;
Eino-Ville Talvala2f1a2e42013-07-25 17:12:05 -070021import android.hardware.camera2.CaptureRequest;
Igor Murashkin70725502013-06-25 20:27:06 +000022
Igor Murashkin9c595172014-05-12 13:56:20 -070023import android.hardware.camera2.utils.LongParcelable;
Jianing Weid2c3a822014-03-27 18:27:43 -070024
Igor Murashkin70725502013-06-25 20:27:06 +000025/** @hide */
26interface ICameraDeviceUser
27{
28 /**
Ruben Brunkfeb50af2014-05-09 19:58:49 -070029 * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceUser.h and
30 * frameworks/base/core/java/android/hardware/camera2/legacy/CameraDeviceUserShim.java
Igor Murashkin70725502013-06-25 20:27:06 +000031 */
32 void disconnect();
33
34 // ints here are status_t
35
36 // non-negative value is the requestId. negative value is status_t
Jianing Weid2c3a822014-03-27 18:27:43 -070037 int submitRequest(in CaptureRequest request, boolean streaming,
38 out LongParcelable lastFrameNumber);
Igor Murashkin70725502013-06-25 20:27:06 +000039
Jianing Weid2c3a822014-03-27 18:27:43 -070040 int submitRequestList(in List<CaptureRequest> requestList, boolean streaming,
41 out LongParcelable lastFrameNumber);
42
43 int cancelRequest(int requestId, out LongParcelable lastFrameNumber);
Igor Murashkin70725502013-06-25 20:27:06 +000044
Ruben Brunkfeb50af2014-05-09 19:58:49 -070045 /**
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();
65
Igor Murashkin70725502013-06-25 20:27:06 +000066 int deleteStream(int streamId);
67
68 // non-negative value is the stream ID. negative value is status_t
Yin-Chia Yeh981e0562015-03-12 13:39:26 -070069 int createStream(in OutputConfiguration outputConfiguration);
Igor Murashkin70725502013-06-25 20:27:06 +000070
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070071 int createDefaultRequest(int templateId, out CameraMetadataNative request);
Igor Murashkind7bf1772013-07-12 18:01:31 -070072
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070073 int getCameraInfo(out CameraMetadataNative info);
Zhijun He7f4d3142013-07-23 07:54:38 -070074
75 int waitUntilIdle();
Eino-Ville Talvala8ebd52b2013-08-13 12:09:44 -070076
Jianing Weid2c3a822014-03-27 18:27:43 -070077 int flush(out LongParcelable lastFrameNumber);
Igor Murashkin70725502013-06-25 20:27:06 +000078}