Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I get frames on lollipop now, I used BufferQueue like this in camera_wrapper.cpp :

class CameraHandler: public CameraListener 
{
    sp<IGraphicBufferConsumer> consumer; 
    sp<IGraphicBufferProducer> producer;  
    ...
};


....

BufferQueue::createBufferQueue(&handler->producer, &handler->consumer);  

handler->consumer->consumerConnect(handler->listener, true);  
bufferStatus = handler->camera->setPreviewTarget(handler->producer);

I get frames on lollipop now, I used use BufferQueue like this in camera_wrapper.cpp :

class CameraHandler: public CameraListener 
{
    sp<IGraphicBufferConsumer> consumer; 
    sp<IGraphicBufferProducer> producer;  
    ...
};


....

BufferQueue::createBufferQueue(&handler->producer, &handler->consumer);  

handler->consumer->consumerConnect(handler->listener, true);  
bufferStatus = handler->camera->setPreviewTarget(handler->producer);