1/* 2 * Copyright 2016, 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 ANDROID_HARDWARE_MEDIA_OMX_V1_0_WOMXPRODUCERLISTENER_H 18#define ANDROID_HARDWARE_MEDIA_OMX_V1_0_WOMXPRODUCERLISTENER_H 19 20#include <hidl/MQDescriptor.h> 21#include <hidl/Status.h> 22 23#include <binder/IBinder.h> 24#include <gui/IProducerListener.h> 25 26#include <android/hardware/graphics/bufferqueue/1.0/IProducerListener.h> 27 28namespace android { 29namespace hardware { 30namespace media { 31namespace omx { 32namespace V1_0 { 33namespace implementation { 34 35using ::android::hidl::base::V1_0::IBase; 36using ::android::hardware::hidl_array; 37using ::android::hardware::hidl_memory; 38using ::android::hardware::hidl_string; 39using ::android::hardware::hidl_vec; 40using ::android::hardware::Return; 41using ::android::hardware::Void; 42using ::android::sp; 43 44typedef ::android::hardware::graphics::bufferqueue::V1_0::IProducerListener 45 HProducerListener; 46typedef ::android::IProducerListener 47 BProducerListener; 48using ::android::BnProducerListener; 49 50struct TWProducerListener : public HProducerListener { 51 sp<BProducerListener> mBase; 52 TWProducerListener(sp<BProducerListener> const& base); 53 Return<void> onBufferReleased() override; 54 Return<bool> needsReleaseNotify() override; 55}; 56 57class LWProducerListener : public BnProducerListener { 58public: 59 sp<HProducerListener> mBase; 60 LWProducerListener(sp<HProducerListener> const& base); 61 void onBufferReleased() override; 62 bool needsReleaseNotify() override; 63}; 64 65} // namespace implementation 66} // namespace V1_0 67} // namespace omx 68} // namespace media 69} // namespace hardware 70} // namespace android 71 72#endif // ANDROID_HARDWARE_MEDIA_OMX_V1_0_WOMXPRODUCERLISTENER_H 73