1 /* 2 * Copyright (C) 2023 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 17 package android.companion.virtualcamera; 18 19 import android.companion.virtualcamera.VirtualCameraConfiguration; 20 21 /** 22 * AIDL Interface to communicate with the VirtualCamera HAL 23 * @hide 24 */ 25 interface IVirtualCameraService { 26 27 /** 28 * Registers a new camera with the virtual camera hal. 29 * @return true if the camera was successfully registered 30 */ registerCamera(in IBinder token, in VirtualCameraConfiguration configuration, int deviceId)31 boolean registerCamera(in IBinder token, in VirtualCameraConfiguration configuration, 32 int deviceId); 33 34 /** 35 * Unregisters the camera from the virtual camera hal. After this call the virtual camera won't 36 * be visible to the camera framework anymore. 37 */ unregisterCamera(in IBinder token)38 void unregisterCamera(in IBinder token); 39 40 /** 41 * Returns the camera id for a given binder token. Note that this id corresponds to the id of 42 * the camera device in the camera framework. 43 */ getCameraId(in IBinder token)44 @utf8InCpp String getCameraId(in IBinder token); 45 } 46