IGraphicBufferProducer.h revision 466a192d2088f9238d34597d1aa28da41367c1ca
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
35eafabcdc1639fb96062d9e3c39b0ae27b0238ae1Mathias Agopianclass SurfaceTextureClient;
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
42466a192d2088f9238d34597d1aa28da41367c1caAndy McFadden * indirectly, through SurfaceTextureClient.
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.
87f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall    virtual status_t dequeueBuffer(int *slot, sp<Fence>& fence,
88f78575400977f644cf0b12beb2fa5fc278b6ed4cJesse Hall            uint32_t w, uint32_t h, uint32_t format, uint32_t usage) = 0;
898ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
908ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // queueBuffer indicates that the client has finished filling in the
918ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // contents of the buffer associated with slot and transfers ownership of
928ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // that slot back to the server. It is not valid to call queueBuffer on a
938ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // slot that is not owned by the client or one for which a buffer associated
941d01a12e7150be569557b64da9b8663c62c13594Eino-Ville Talvala    // via requestBuffer. In addition, a timestamp must be provided by the
951d01a12e7150be569557b64da9b8663c62c13594Eino-Ville Talvala    // client for this buffer. The timestamp is measured in nanoseconds, and
961d01a12e7150be569557b64da9b8663c62c13594Eino-Ville Talvala    // must be monotonically increasing. Its other properties (zero point, etc)
971d01a12e7150be569557b64da9b8663c62c13594Eino-Ville Talvala    // are client-dependent, and should be documented by the client.
9897c602c5af5f3ffd69009bf496d86347b71a2b4cMathias Agopian    //
99c10d9d90b2088a3304076e0dc4bf05cdbb5d45abMathias Agopian    // outWidth, outHeight and outTransform are filled with the default width
100c10d9d90b2088a3304076e0dc4bf05cdbb5d45abMathias Agopian    // and height of the window and current transform applied to buffers,
10197c602c5af5f3ffd69009bf496d86347b71a2b4cMathias Agopian    // respectively.
102f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian
103c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall    struct QueueBufferInput : public Flattenable {
104c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        inline QueueBufferInput(const Parcel& parcel);
105f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline QueueBufferInput(int64_t timestamp,
106c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                const Rect& crop, int scalingMode, uint32_t transform,
107c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                sp<Fence> fence)
108f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        : timestamp(timestamp), crop(crop), scalingMode(scalingMode),
109c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall          transform(transform), fence(fence) { }
110f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline void deflate(int64_t* outTimestamp, Rect* outCrop,
111c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                int* outScalingMode, uint32_t* outTransform,
112c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                sp<Fence>* outFence) const {
113f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outTimestamp = timestamp;
114f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outCrop = crop;
115f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outScalingMode = scalingMode;
116f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outTransform = transform;
117c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall            *outFence = fence;
118f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        }
119c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall
120c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        // Flattenable interface
121c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        virtual size_t getFlattenedSize() const;
122c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        virtual size_t getFdCount() const;
123c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        virtual status_t flatten(void* buffer, size_t size,
124c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                int fds[], size_t count) const;
125c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        virtual status_t unflatten(void const* buffer, size_t size,
126c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall                int fds[], size_t count);
127c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall
128f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    private:
129f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        int64_t timestamp;
130f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        Rect crop;
131f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        int scalingMode;
132f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        uint32_t transform;
133c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall        sp<Fence> fence;
134f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    };
135f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian
136f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    // QueueBufferOutput must be a POD structure
137f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    struct QueueBufferOutput {
138f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline QueueBufferOutput() { }
139f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline void deflate(uint32_t* outWidth,
1402488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian                uint32_t* outHeight,
1412488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian                uint32_t* outTransformHint,
1422488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian                uint32_t* outNumPendingBuffers) const {
143f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outWidth = width;
144f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outHeight = height;
145f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            *outTransformHint = transformHint;
1462488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian            *outNumPendingBuffers = numPendingBuffers;
147f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        }
148f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        inline void inflate(uint32_t inWidth, uint32_t inHeight,
1492488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian                uint32_t inTransformHint, uint32_t inNumPendingBuffers) {
150f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            width = inWidth;
151f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            height = inHeight;
152f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            transformHint = inTransformHint;
1532488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian            numPendingBuffers = inNumPendingBuffers;
154f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        }
155f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    private:
156f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        uint32_t width;
157f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        uint32_t height;
158f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian        uint32_t transformHint;
1592488b20aec097accb20a853d9876bb0a5dc04636Mathias Agopian        uint32_t numPendingBuffers;
160f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    };
161f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian
162f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian    virtual status_t queueBuffer(int slot,
163f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246Mathias Agopian            const QueueBufferInput& input, QueueBufferOutput* output) = 0;
1648ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
1658ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // cancelBuffer indicates that the client does not wish to fill in the
1668ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // buffer associated with slot and transfers ownership of the slot back to
1678ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis    // the server.
168c777b0b3b9b0ea5d8e378fccde6935765e28e329Jesse Hall    virtual void cancelBuffer(int slot, sp<Fence> fence) = 0;
1698ba32fade11abb73f3fd47ea0953c9528eb5b91fJamie Gennis
170eafabcdc1639fb96062d9e3c39b0ae27b0238ae1Mathias Agopian    // query retrieves some information for this surface
171eafabcdc1639fb96062d9e3c39b0ae27b0238ae1Mathias Agopian    // 'what' tokens allowed are that of android_natives.h
172eafabcdc1639fb96062d9e3c39b0ae27b0238ae1Mathias Agopian    virtual int query(int what, int* value) = 0;
1738072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian
1748072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian    // setSynchronousMode set whether dequeueBuffer is synchronous or
1758072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian    // asynchronous. In synchronous mode, dequeueBuffer blocks until
1768072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian    // a buffer is available, the currently bound buffer can be dequeued and
1778072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian    // queued buffers will be retired in order.
1788072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian    // The default mode is asynchronous.
1798072711307aa98ee5ee6f7369860ae38c3e19656Mathias Agopian    virtual status_t setSynchronousMode(bool enabled) = 0;
180fe0a87b54654a1392650e7f1862df473287d8332Jamie Gennis
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.
19124202f5676c32edeef6544cf36e06b9fc970dbdeMathias Agopian    virtual status_t connect(int api, 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