• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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.car.evs;
18 
19 import android.car.evs.CarEvsBufferDescriptor;
20 import android.car.evs.CarEvsStatus;
21 import android.car.evs.ICarEvsStatusListener;
22 import android.car.evs.ICarEvsStreamCallback;
23 import android.os.IBinder;
24 
25 /**
26  * @hide
27  */
28 interface ICarEvsService {
29 
30     /**
31      * Registers a listener to receive changes in CarEvsManager's status.
32      */
registerStatusListener(in ICarEvsStatusListener listener)33     void registerStatusListener(in ICarEvsStatusListener listener);
34 
35     /**
36      * Unregisters a service listener.
37      */
unregisterStatusListener(in ICarEvsStatusListener listener)38     void unregisterStatusListener(in ICarEvsStatusListener listener);
39 
40     /**
41      * Requests to start a video stream.
42      */
startVideoStream(int serviceType, in IBinder token, in ICarEvsStreamCallback callback)43     int startVideoStream(int serviceType, in IBinder token, in ICarEvsStreamCallback callback);
44 
45     /**
46      * Requests to stop an active video stream.
47      */
stopVideoStream(in ICarEvsStreamCallback callback)48     void stopVideoStream(in ICarEvsStreamCallback callback);
49 
50     /**
51      * Returns the buffer when its usages are done.
52      */
returnFrameBuffer(in CarEvsBufferDescriptor buffer)53     void returnFrameBuffer(in CarEvsBufferDescriptor buffer);
54 
55     /**
56      * Returns a current status of CarEvsService.
57      */
getCurrentStatus()58     CarEvsStatus getCurrentStatus();
59 
60     /**
61      * Returns a generated session token.
62      */
generateSessionToken()63     IBinder generateSessionToken();
64 
65     /**
66      * Requests to start a camera previewing activity for a given service type.
67      */
startActivity(int type)68     int startActivity(int type);
69 
70     /**
71      * Requests to stop a camera previewing activity, which was launched via startActivity().
72      */
stopActivity()73     void stopActivity();
74 
75     /**
76      * Returns whether or not a given service type is supported.
77      */
isSupported(int type)78     boolean isSupported(int type);
79 }
80