blob: 20fd1ecb4ba3fba312d2c4e75fbdf0f395cb074c [file] [log] [blame]
Winson Chiu47eaa192019-10-24 01:14:51 +00001/*
2 * Copyright 2019 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#ifndef OMX_2_IGRAPHICBUFFERSOURCE_H_
18#define OMX_2_IGRAPHICBUFFERSOURCE_H_
19
20#include <android/BnGraphicBufferSource.h>
21#include <media/stagefright/omx/OmxGraphicBufferSource.h>
22
23namespace android {
24
25using BnStatus = ::android::binder::Status;
26
27struct Omx2IGraphicBufferSource : public BnGraphicBufferSource {
28 sp<OmxGraphicBufferSource> mBase;
29 sp<IOMXBufferSource> mOMXBufferSource;
30 Omx2IGraphicBufferSource(sp<OmxGraphicBufferSource> const& base);
31 BnStatus configure(const sp<IOMXNode>& omxNode, int32_t dataSpace) override;
32 BnStatus setSuspend(bool suspend, int64_t timeUs) override;
33 BnStatus setRepeatPreviousFrameDelayUs(int64_t repeatAfterUs) override;
34 BnStatus setMaxFps(float maxFps) override;
35 BnStatus setTimeLapseConfig(double fps, double captureFps) override;
36 BnStatus setStartTimeUs(int64_t startTimeUs) override;
37 BnStatus setStopTimeUs(int64_t stopTimeUs) override;
38 BnStatus getStopTimeOffsetUs(int64_t *stopTimeOffsetUs) override;
39 BnStatus setColorAspects(int32_t aspects) override;
40 BnStatus setTimeOffsetUs(int64_t timeOffsetsUs) override;
41 BnStatus signalEndOfInputStream() override;
42};
43
44} // namespace android
45
46#endif // OMX_2_IGRAPHICBUFFERSOURCE_H_
47