IGraphicBufferProducer.h revision 7cdd786fa80cf03551291ae8feca7b77583be1c5
18ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis/*
28ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * Copyright (C) 2010 The Android Open Source Project
38ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis *
48ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * Licensed under the Apache License, Version 2.0 (the "License");
58ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * you may not use this file except in compliance with the License.
68ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * You may obtain a copy of the License at
78ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis *
88ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis *      http://www.apache.org/licenses/LICENSE-2.0
98ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis *
108ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * Unless required by applicable law or agreed to in writing, software
118ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * distributed under the License is distributed on an "AS IS" BASIS,
128ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * See the License for the specific language governing permissions and
148ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis * limitations under the License.
158ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis */
168ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
172adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden#ifndef ANDROID_GUI_IGRAPHICBUFFERPRODUCER_H
182adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden#define ANDROID_GUI_IGRAPHICBUFFERPRODUCER_H
198ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
208ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis#include <stdint.h>
218ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis#include <sys/types.h>
228ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
238ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis#include <utils/Errors.h>
248ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis#include <utils/RefBase.h>
258ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
268ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis#include <binder/IInterface.h>
278ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
28f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall#include <ui/Fence.h>
298ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis#include <ui/GraphicBuffer.h>
308ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis#include <ui/Rect.h>
318ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
328ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennisnamespace android {
338ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis// ----------------------------------------------------------------------------
348ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
35e3c697fb929c856b59fa56a8e05a2a7eba187c3dMathias Agopianclass Surface;
36eafabcdc1639fb96062d9e3c39b0ae27b0238ae1Mathias Agopian
370273adbf0bc202eda2ca579ae0773464ea9c701fAndy McFadden/*
38466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * This class defines the Binder IPC interface for the producer side of
39466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * a queue of graphics buffers.  It's used to send graphics data from one
40466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * component to another.  For example, a class that decodes video for
41466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * playback might use this to provide frames.  This is typically done
42e3c697fb929c856b59fa56a8e05a2a7eba187c3dMathias Agopian * indirectly, through Surface.
430273adbf0bc202eda2ca579ae0773464ea9c701fAndy McFadden *
44466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * The underlying mechanism is a BufferQueue, which implements
45466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * BnGraphicBufferProducer.  In normal operation, the producer calls
46466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * dequeueBuffer() to get an empty buffer, fills it with data, then
47466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * calls queueBuffer() to make it available to the consumer.
480273adbf0bc202eda2ca579ae0773464ea9c701fAndy McFadden *
492adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden * This class was previously called ISurfaceTexture.
500273adbf0bc202eda2ca579ae0773464ea9c701fAndy McFadden */
512adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFaddenclass IGraphicBufferProducer : public IInterface
528ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis{
538ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennispublic:
542adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    DECLARE_META_INTERFACE(GraphicBufferProducer);
558ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
568072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian    enum {
578072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian        BUFFER_NEEDS_REALLOCATION = 0x1,
588072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian        RELEASE_ALL_BUFFERS       = 0x2,
598072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian    };
60a5c75c01620179ce00812354778a29a80d76e71fMathias Agopian
618ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // requestBuffer requests a new buffer for the given index. The server (i.e.
622adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // the IGraphicBufferProducer implementation) assigns the newly created
632adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // buffer to the given slot index, and the client is expected to mirror the
648ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // slot->buffer mapping so that it's not necessary to transfer a
658ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // GraphicBuffer for every dequeue operation.
667b305fffc39d0fe0926e7fd2d7f6a524fbce62b7Jamie Gennis    virtual status_t requestBuffer(int slot, sp<GraphicBuffer>* buf) = 0;
678ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
688ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // setBufferCount sets the number of buffer slots available. Calling this
698ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // will also cause all buffer slots to be emptied. The caller should empty
708ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // its mirrored copy of the buffer slots when calling this method.
718ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    virtual status_t setBufferCount(int bufferCount) = 0;
728ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
738ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // dequeueBuffer requests a new buffer slot for the client to use. Ownership
748ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // of the slot is transfered to the client, meaning that the server will not
758ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // use the contents of the buffer associated with that slot. The slot index
768ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // returned may or may not contain a buffer. If the slot is empty the client
778ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // should call requestBuffer to assign a new buffer to that slot. The client
788ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // is expected to either call cancelBuffer on the dequeued slot or to fill
798ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // in the contents of its associated buffer contents and call queueBuffer.
80a5c75c01620179ce00812354778a29a80d76e71fMathias Agopian    // If dequeueBuffer return BUFFER_NEEDS_REALLOCATION, the client is
81a5c75c01620179ce00812354778a29a80d76e71fMathias Agopian    // expected to call requestBuffer immediately.
82f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall    //
83f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall    // The fence parameter will be updated to hold the fence associated with
84f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall    // the buffer. The contents of the buffer must not be overwritten until the
85f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall    // fence signals. If the fence is NULL, the buffer may be written
86f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall    // immediately.
877cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian    //
887cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian    // The async parameter sets whether we're in asynchrnous mode for this
897cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian    // deququeBuffer() call.
907cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian    virtual status_t dequeueBuffer(int *slot, sp<Fence>* fence, bool async,
91f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall            uint32_t w, uint32_t h, uint32_t format, uint32_t usage) = 0;
928ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
938ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // queueBuffer indicates that the client has finished filling in the
948ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // contents of the buffer associated with slot and transfers ownership of
958ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // that slot back to the server. It is not valid to call queueBuffer on a
968ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // slot that is not owned by the client or one for which a buffer associated
971d01a12e7150be569557b64da9b8663c62c13594Eino-Ville Talvala    // via requestBuffer. In addition, a timestamp must be provided by the
981d01a12e7150be569557b64da9b8663c62c13594Eino-Ville Talvala    // client for this buffer. The timestamp is measured in nanoseconds, and
991d01a12e7150be569557b64da9b8663c62c13594Eino-Ville Talvala    // must be monotonically increasing. Its other properties (zero point, etc)
1001d01a12e7150be569557b64da9b8663c62c13594Eino-Ville Talvala    // are client-dependent, and should be documented by the client.
10197c602c5af5f3ffd69009bf496d86347b71a2b4cMathias Agopian    //
1027cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian    // The async parameter sets whether we're queuing a buffer in asynchronous mode.
1037cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian    //
104c10d9d90b2088a3304076e0dc4bf05cdbb5d45abMathias Agopian    // outWidth, outHeight and outTransform are filled with the default width
105c10d9d90b2088a3304076e0dc4bf05cdbb5d45abMathias Agopian    // and height of the window and current transform applied to buffers,
10697c602c5af5f3ffd69009bf496d86347b71a2b4cMathias Agopian    // respectively.
107f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian
108c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall    struct QueueBufferInput : public Flattenable {
109c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        inline QueueBufferInput(const Parcel& parcel);
110f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline QueueBufferInput(int64_t timestamp,
1117cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian                const Rect& crop, int scalingMode, uint32_t transform, bool async,
1127cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian                const sp<Fence>& fence)
113f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        : timestamp(timestamp), crop(crop), scalingMode(scalingMode),
1147cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian          transform(transform), async(async), fence(fence) { }
115f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline void deflate(int64_t* outTimestamp, Rect* outCrop,
1167cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian                int* outScalingMode, uint32_t* outTransform, bool* outAsync,
117c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                sp<Fence>* outFence) const {
118f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outTimestamp = timestamp;
119f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outCrop = crop;
120f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outScalingMode = scalingMode;
121f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outTransform = transform;
1227cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian            *outAsync = bool(async);
123c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall            *outFence = fence;
124f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        }
125c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall
126c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        // Flattenable interface
127c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        virtual size_t getFlattenedSize() const;
128c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        virtual size_t getFdCount() const;
129c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        virtual status_t flatten(void* buffer, size_t size,
130c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                int fds[], size_t count) const;
131c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        virtual status_t unflatten(void const* buffer, size_t size,
132c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                int fds[], size_t count);
133c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall
134f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    private:
135f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        int64_t timestamp;
136f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        Rect crop;
137f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        int scalingMode;
138f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        uint32_t transform;
1397cdd786fa80cf03551291ae8feca7b77583be1c5Mathias Agopian        int async;
140c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        sp<Fence> fence;
141f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    };
142f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian
143f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    // QueueBufferOutput must be a POD structure
144f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    struct QueueBufferOutput {
145f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline QueueBufferOutput() { }
146f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline void deflate(uint32_t* outWidth,
1472488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian                uint32_t* outHeight,
1482488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian                uint32_t* outTransformHint,
1492488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian                uint32_t* outNumPendingBuffers) const {
150f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outWidth = width;
151f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outHeight = height;
152f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outTransformHint = transformHint;
1532488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian            *outNumPendingBuffers = numPendingBuffers;
154f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        }
155f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline void inflate(uint32_t inWidth, uint32_t inHeight,
1562488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian                uint32_t inTransformHint, uint32_t inNumPendingBuffers) {
157f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            width = inWidth;
158f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            height = inHeight;
159f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            transformHint = inTransformHint;
1602488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian            numPendingBuffers = inNumPendingBuffers;
161f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        }
162f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    private:
163f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        uint32_t width;
164f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        uint32_t height;
165f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        uint32_t transformHint;
1662488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian        uint32_t numPendingBuffers;
167f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    };
168f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian
169f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    virtual status_t queueBuffer(int slot,
170f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            const QueueBufferInput& input, QueueBufferOutput* output) = 0;
1718ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
1728ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // cancelBuffer indicates that the client does not wish to fill in the
1738ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // buffer associated with slot and transfers ownership of the slot back to
1748ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // the server.
1754c00cc11141da7d159eb2323b186ed344115c0f1Jesse Hall    virtual void cancelBuffer(int slot, const sp<Fence>& fence) = 0;
1768ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
177eafabcdc1639fb96062d9e3c39b0ae27b0238ae1Mathias Agopian    // query retrieves some information for this surface
178eafabcdc1639fb96062d9e3c39b0ae27b0238ae1Mathias Agopian    // 'what' tokens allowed are that of android_natives.h
179eafabcdc1639fb96062d9e3c39b0ae27b0238ae1Mathias Agopian    virtual int query(int what, int* value) = 0;
1808072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian
1812adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // connect attempts to connect a client API to the IGraphicBufferProducer.
1822adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // This must be called before any other IGraphicBufferProducer methods are
1832adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // called except for getAllocator.
184fe0a87b54654a1392650e7f1862df473287d8332Jamie Gennis    //
185fe0a87b54654a1392650e7f1862df473287d8332Jamie Gennis    // This method will fail if the connect was previously called on the
1862adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // IGraphicBufferProducer and no corresponding disconnect call was made.
1875bfc24515bb5c8ea7975f72d538df37753733a2fMathias Agopian    //
1885bfc24515bb5c8ea7975f72d538df37753733a2fMathias Agopian    // outWidth, outHeight and outTransform are filled with the default width
1895bfc24515bb5c8ea7975f72d538df37753733a2fMathias Agopian    // and height of the window and current transform applied to buffers,
1905bfc24515bb5c8ea7975f72d538df37753733a2fMathias Agopian    // respectively.
191595264f1af12e25dce57d7c5b1d52ed86ac0d0c9Mathias Agopian    virtual status_t connect(int api, bool producerControlledByApp, QueueBufferOutput* output) = 0;
192fe0a87b54654a1392650e7f1862df473287d8332Jamie Gennis
1932adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // disconnect attempts to disconnect a client API from the
1942adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // IGraphicBufferProducer.  Calling this method will cause any subsequent
1952adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // calls to other IGraphicBufferProducer methods to fail except for
1962adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // getAllocator and connect.  Successfully calling connect after this will
1972adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // allow the other methods to succeed again.
198fe0a87b54654a1392650e7f1862df473287d8332Jamie Gennis    //
1992adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden    // This method will fail if the the IGraphicBufferProducer is not currently
200fe0a87b54654a1392650e7f1862df473287d8332Jamie Gennis    // connected to the specified client API.
201fe0a87b54654a1392650e7f1862df473287d8332Jamie Gennis    virtual status_t disconnect(int api) = 0;
2028ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis};
2038ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
2048ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis// ----------------------------------------------------------------------------
2058ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
2062adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFaddenclass BnGraphicBufferProducer : public BnInterface<IGraphicBufferProducer>
2078ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis{
2088ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennispublic:
2098ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    virtual status_t    onTransact( uint32_t code,
2108ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis                                    const Parcel& data,
2118ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis                                    Parcel* reply,
2128ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis                                    uint32_t flags = 0);
2138ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis};
2148ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
2158ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis// ----------------------------------------------------------------------------
2168ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis}; // namespace android
2178ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
2182adaf04fab35cf47c824d74d901b54094e01ccd3Andy McFadden#endif // ANDROID_GUI_IGRAPHICBUFFERPRODUCER_H
219