16e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa/*
26e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * Copyright 2016, The Android Open Source Project
36e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa *
46e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * Licensed under the Apache License, Version 2.0 (the "License");
56e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * you may not use this file except in compliance with the License.
66e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * You may obtain a copy of the License at
76e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa *
86e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa *      http://www.apache.org/licenses/LICENSE-2.0
96e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa *
106e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * Unless required by applicable law or agreed to in writing, software
116e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * distributed under the License is distributed on an "AS IS" BASIS,
126e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * See the License for the specific language governing permissions and
146e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa * limitations under the License.
156e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa */
166e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
176e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#ifndef ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V1_0_B2HPRODUCERLISTENER_H
186e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#define ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V1_0_B2HPRODUCERLISTENER_H
196e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
206e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#include <hidl/MQDescriptor.h>
216e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#include <hidl/Status.h>
226e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
236e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#include <binder/IBinder.h>
246e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#include <gui/IProducerListener.h>
256e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
266e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#include <android/hidl/base/1.0/IBase.h>
276e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#include <android/hardware/graphics/bufferqueue/1.0/IProducerListener.h>
286e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
296e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasanamespace android {
306e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasanamespace hardware {
316e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasanamespace graphics {
326e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasanamespace bufferqueue {
336e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasanamespace V1_0 {
346e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasanamespace utils {
356e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
366e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasausing ::android::hidl::base::V1_0::IBase;
376e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasausing ::android::hardware::hidl_array;
386e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasausing ::android::hardware::hidl_memory;
396e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasausing ::android::hardware::hidl_string;
406e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasausing ::android::hardware::hidl_vec;
416e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasausing ::android::hardware::Return;
426e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasausing ::android::hardware::Void;
436e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasausing ::android::sp;
446e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
456e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasatypedef ::android::hardware::graphics::bufferqueue::V1_0::IProducerListener
466e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa        HProducerListener;
476e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
486e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasatypedef ::android::IProducerListener
496e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa        BProducerListener;
506e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
516e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasastruct B2HProducerListener : public HProducerListener {
526e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa    sp<BProducerListener> mBase;
536e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa    B2HProducerListener(sp<BProducerListener> const& base);
546e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa    Return<void> onBufferReleased() override;
556e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa    Return<bool> needsReleaseNotify() override;
566e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa};
576e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
586e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa}  // namespace utils
596e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa}  // namespace V1_0
606e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa}  // namespace omx
616e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa}  // namespace media
626e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa}  // namespace hardware
636e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa}  // namespace android
646e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
656e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa#endif  // ANDROID_HARDWARE_GRAPHICS_BUFFERQUEUE_V1_0_B2HPRODUCERLISTENER_H
666e1193af40c870c50013affec37c8429986b3c7bPawin Vongmasa
67