diff options
author | Dan Stoza <stoza@google.com> | 2014-03-18 17:55:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-18 17:55:05 +0000 |
commit | b5ea3014b8be9eaa16da0144bd81af6fa514d8e2 (patch) | |
tree | 32f343096a8be778e31a4e15456fbd830b0383ea /services/camera/libcameraservice/device3 | |
parent | 0fab43120972dfbf4d6f0ec19ab470131b6c8b09 (diff) | |
parent | 8aa0f0619ea867e8fb240cf27913d4f8ae767385 (diff) | |
download | frameworks_av-b5ea3014b8be9eaa16da0144bd81af6fa514d8e2.zip frameworks_av-b5ea3014b8be9eaa16da0144bd81af6fa514d8e2.tar.gz frameworks_av-b5ea3014b8be9eaa16da0144bd81af6fa514d8e2.tar.bz2 |
Merge "Remove deprecated BufferQueue constructor"
Diffstat (limited to 'services/camera/libcameraservice/device3')
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3InputStream.cpp | 8 | ||||
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3ZslStream.cpp | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3InputStream.cpp b/services/camera/libcameraservice/device3/Camera3InputStream.cpp index e1c492b..dd7fb6c 100644 --- a/services/camera/libcameraservice/device3/Camera3InputStream.cpp +++ b/services/camera/libcameraservice/device3/Camera3InputStream.cpp @@ -203,10 +203,12 @@ status_t Camera3InputStream::configureQueueLocked() { mFrameCount = 0; if (mConsumer.get() == 0) { - sp<BufferQueue> bq = new BufferQueue(); + sp<IGraphicBufferProducer> producer; + sp<IGraphicBufferConsumer> consumer; + BufferQueue::createBufferQueue(&producer, &consumer); int minUndequeuedBuffers = 0; - res = bq->query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBuffers); + res = producer->query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBuffers); if (res != OK || minUndequeuedBuffers < 0) { ALOGE("%s: Stream %d: Could not query min undequeued buffers (error %d, bufCount %d)", __FUNCTION__, mId, res, minUndequeuedBuffers); @@ -226,7 +228,7 @@ status_t Camera3InputStream::configureQueueLocked() { camera3_stream::max_buffers : minBufs; // TODO: somehow set the total buffer count when producer connects? - mConsumer = new BufferItemConsumer(bq, camera3_stream::usage, + mConsumer = new BufferItemConsumer(consumer, camera3_stream::usage, mTotalBufferCount); mConsumer->setName(String8::format("Camera3-InputStream-%d", mId)); } diff --git a/services/camera/libcameraservice/device3/Camera3ZslStream.cpp b/services/camera/libcameraservice/device3/Camera3ZslStream.cpp index e509350..04deac5 100644 --- a/services/camera/libcameraservice/device3/Camera3ZslStream.cpp +++ b/services/camera/libcameraservice/device3/Camera3ZslStream.cpp @@ -115,9 +115,11 @@ Camera3ZslStream::Camera3ZslStream(int id, uint32_t width, uint32_t height, HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED), mDepth(bufferCount) { - sp<BufferQueue> bq = new BufferQueue(); - mProducer = new RingBufferConsumer(bq, GRALLOC_USAGE_HW_CAMERA_ZSL, bufferCount); - mConsumer = new Surface(bq); + sp<IGraphicBufferProducer> producer; + sp<IGraphicBufferConsumer> consumer; + BufferQueue::createBufferQueue(&producer, &consumer); + mProducer = new RingBufferConsumer(consumer, GRALLOC_USAGE_HW_CAMERA_ZSL, bufferCount); + mConsumer = new Surface(producer); } Camera3ZslStream::~Camera3ZslStream() { |