blob: 62cfac0ab80802c442a9af0e930da89afdc2f97b [file] [log] [blame]
Haoxiang Li6bdb8112019-12-23 16:10:31 -08001/*
2 * Copyright 2020 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.automotive.sv@1.0;
18
19import ISurroundViewStream;
20
21/**
22 * Common interface for surround view session extended by surround view 2d and 3d
23 * session.
24 */
25interface ISurroundViewSession {
26 /**
27 * Requests to start receiving surround view frames.
28 *
29 * For surround view 3d, setViews() must be set before calling startStream().
30 *
31 * @param stream Stream to receiving callbacks for the session.
32 * @return svResult Returns OK if successful, returns VIEW_NOT_SET if setViews() is not
33 * called for surround view 3d, appropriate error results otherwise.
34 */
35 startStream(ISurroundViewStream stream) generates (SvResult svResult);
36
37 /**
38 * Requests to stop stream.
39 *
40 * Frames may continue to arrive after call returns. Each must be returned until
41 * the closure of the stream is signaled by the ISurroundViewStream.
42 */
43 stopStream();
44
45 /**
46 * Signal from client that a frame, which was delivered by the stream, has been consumed.
47 *
48 * @param svFramesDesc Descriptor to signal done with frame.
49 */
50 oneway doneWithFrames(SvFramesDesc svFramesDesc);
51};