blob: 767eb7314cc34934b85db4f42b6f8ac857d2a4cb [file] [log] [blame]
Pawin Vongmasa6c9e7842018-11-14 17:16:10 -08001/*
2 * Copyright (C) 2018 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.media.c2@1.0;
18
Pawin Vongmasa6c9e7842018-11-14 17:16:10 -080019import IConfigurable;
20
21/**
22 * An `IInputSink` is a receiver of work items.
23 *
24 * An @ref IComponent instance can present itself as an `IInputSink` via a thin
25 * wrapper.
26 *
27 * @sa IInputSurface, IComponent.
28 */
29interface IInputSink {
30 /**
31 * Feeds work to the sink.
32 *
33 * @param workBundle `WorkBundle` object containing a list of `Work` objects
34 * to queue to the component.
35 * @return status Status of the call, which may be
36 * - `OK` - Works in @p workBundle were successfully queued.
37 * - `BAD_INDEX` - Some component id in some `Worklet` is not valid.
38 * - `CANNOT_DO` - Tunneling has not been set up for this sink, but some
39 * `Work` object contains tunneling information.
40 * - `NO_MEMORY` - Not enough memory to queue @p workBundle.
41 * - `TIMED_OUT` - The operation cannot be finished in a timely manner.
42 * - `CORRUPTED` - Some unknown error occurred.
43 */
44 queue(WorkBundle workBundle) generates (Status status);
45
46 /**
47 * Returns the @ref IConfigurable instance associated to this sink.
48 *
49 * @return configurable `IConfigurable` instance. This must not be null.
50 */
51 getConfigurable() generates (IConfigurable configurable);
52};
53