1/* 2 * Copyright 2017, 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 BWGRAPHIC_BUFFER_SOURCE_H_ 18#define BWGRAPHIC_BUFFER_SOURCE_H_ 19 20#include <binder/Binder.h> 21#include <binder/Status.h> 22#include <android/BnGraphicBufferSource.h> 23#include <android/BnOMXBufferSource.h> 24#include <IOMX.h> 25 26#include "GraphicBufferSource.h" 27#include "IOmxNodeWrapper.h" 28 29namespace android { 30 31using ::android::binder::Status; 32using ::android::BnGraphicBufferSource; 33using ::android::GraphicBufferSource; 34using ::android::IOMXNode; 35using ::android::sp; 36 37struct BWGraphicBufferSource : public BnGraphicBufferSource { 38 struct BWOMXBufferSource; 39 struct BWOmxNodeWrapper; 40 41 sp<GraphicBufferSource> mBase; 42 sp<IOMXBufferSource> mOMXBufferSource; 43 44 BWGraphicBufferSource(sp<GraphicBufferSource> const &base); 45 46 Status configure( 47 const sp<IOMXNode>& omxNode, int32_t dataSpace) override; 48 Status setSuspend(bool suspend, int64_t timeUs) override; 49 Status setRepeatPreviousFrameDelayUs( 50 int64_t repeatAfterUs) override; 51 Status setMaxFps(float maxFps) override; 52 Status setTimeLapseConfig( 53 double fps, double captureFps) override; 54 Status setStartTimeUs(int64_t startTimeUs) override; 55 Status setStopTimeUs(int64_t stopTimeUs) override; 56 Status setColorAspects(int32_t aspects) override; 57 Status setTimeOffsetUs(int64_t timeOffsetsUs) override; 58 Status signalEndOfInputStream() override; 59}; 60 61} // namespace android 62 63#endif // ANDROID_HARDWARE_MEDIA_OMX_V1_0_WGRAPHICBUFFERSOURCE_H 64