1 /*
2  * Copyright (C) 2024 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.media;
18 
19 import android.hardware.graphics.common.Dataspace;
20 import android.media.AidlColorAspects;
21 import android.media.IAidlNode;
22 
23 /**
24  * Binder interface for configuring/controlling a Codec2 AIDL encoder instance
25  * on behalf of a Surface which will produce input buffers.
26  *
27  * In order to support Persistent InputSurface and/or MediaRecorder.
28  */
29 interface IAidlGraphicBufferSource {
configure(IAidlNode node, Dataspace dataSpace)30     void configure(IAidlNode node, Dataspace dataSpace);
setSuspend(boolean suspend, long suspendTimeUs)31     void setSuspend(boolean suspend, long suspendTimeUs);
setRepeatPreviousFrameDelayUs(long repeatAfterUs)32     void setRepeatPreviousFrameDelayUs(long repeatAfterUs);
setMaxFps(float maxFps)33     void setMaxFps(float maxFps);
setTimeLapseConfig(double fps, double captureFps)34     void setTimeLapseConfig(double fps, double captureFps);
setStartTimeUs(long startTimeUs)35     void setStartTimeUs(long startTimeUs);
setStopTimeUs(long stopTimeUs)36     void setStopTimeUs(long stopTimeUs);
getStopTimeOffsetUs()37     long getStopTimeOffsetUs();
setColorAspects(in AidlColorAspects aspects)38     void setColorAspects(in AidlColorAspects aspects);
setTimeOffsetUs(long timeOffsetsUs)39     void setTimeOffsetUs(long timeOffsetsUs);
signalEndOfInputStream()40     void signalEndOfInputStream();
41 }
42