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_GRAPHICS_BUFFERQUEUE_V1_0_B2HPRODUCERLISTENER_H 18#define ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V1_0_B2HPRODUCERLISTENER_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/hidl/base/1.0/IBase.h> 27#include <android/hardware/graphics/bufferqueue/1.0/IProducerListener.h> 28 29namespace android { 30namespace hardware { 31namespace graphics { 32namespace bufferqueue { 33namespace V1_0 { 34namespace utils { 35 36using ::android::hidl::base::V1_0::IBase; 37using ::android::hardware::hidl_array; 38using ::android::hardware::hidl_memory; 39using ::android::hardware::hidl_string; 40using ::android::hardware::hidl_vec; 41using ::android::hardware::Return; 42using ::android::hardware::Void; 43using ::android::sp; 44 45typedef ::android::hardware::graphics::bufferqueue::V1_0::IProducerListener 46 HProducerListener; 47 48typedef ::android::IProducerListener 49 BProducerListener; 50 51struct B2HProducerListener : public HProducerListener { 52 sp<BProducerListener> mBase; 53 B2HProducerListener(sp<BProducerListener> const& base); 54 Return<void> onBufferReleased() override; 55 Return<bool> needsReleaseNotify() override; 56}; 57 58} // namespace utils 59} // namespace V1_0 60} // namespace omx 61} // namespace media 62} // namespace hardware 63} // namespace android 64 65#endif // ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V1_0_B2HPRODUCERLISTENER_H 66 67