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 29 namespace android { 30 namespace hardware { 31 namespace graphics { 32 namespace bufferqueue { 33 namespace V1_0 { 34 namespace utils { 35 36 using ::android::hidl::base::V1_0::IBase; 37 using ::android::hardware::hidl_array; 38 using ::android::hardware::hidl_memory; 39 using ::android::hardware::hidl_string; 40 using ::android::hardware::hidl_vec; 41 using ::android::hardware::Return; 42 using ::android::hardware::Void; 43 using ::android::sp; 44 45 typedef ::android::hardware::graphics::bufferqueue::V1_0::IProducerListener 46 HProducerListener; 47 48 typedef ::android::IProducerListener 49 BProducerListener; 50 51 struct B2HProducerListener : public HProducerListener { 52 sp<BProducerListener> mBase; 53 explicit 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