summaryrefslogtreecommitdiffstats
path: root/cmds/screenrecord/FrameOutput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/screenrecord/FrameOutput.cpp')
-rw-r--r--cmds/screenrecord/FrameOutput.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmds/screenrecord/FrameOutput.cpp b/cmds/screenrecord/FrameOutput.cpp
index b5cf2f9..06b1f70 100644
--- a/cmds/screenrecord/FrameOutput.cpp
+++ b/cmds/screenrecord/FrameOutput.cpp
@@ -67,8 +67,10 @@ status_t FrameOutput::createInputSurface(int width, int height,
return UNKNOWN_ERROR;
}
- mBufferQueue = new BufferQueue(/*new GraphicBufferAlloc()*/);
- mGlConsumer = new GLConsumer(mBufferQueue, mExtTextureName,
+ sp<IGraphicBufferProducer> producer;
+ sp<IGraphicBufferConsumer> consumer;
+ BufferQueue::createBufferQueue(&producer, &consumer);
+ mGlConsumer = new GLConsumer(consumer, mExtTextureName,
GL_TEXTURE_EXTERNAL_OES);
mGlConsumer->setName(String8("virtual display"));
mGlConsumer->setDefaultBufferSize(width, height);
@@ -79,7 +81,7 @@ status_t FrameOutput::createInputSurface(int width, int height,
mPixelBuf = new uint8_t[width * height * kGlBytesPerPixel];
- *pBufferProducer = mBufferQueue;
+ *pBufferProducer = producer;
ALOGD("FrameOutput::createInputSurface OK");
return NO_ERROR;