android: camera_stream: Create allocator unconditionally
Originally buffer allocation was only required for Internal streams which are not backed by a frame buffer provided by the Android framework. Now that mapped streams can be generated without the corresponding source stream being part of the Android's provided stream list, also buffers of type Mapped can be required to allocate buffers on demand. Create CameraStream::allocator_ and the associated mutex unconditionally for all types of stream. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
fec64fb75a
commit
1261ff9e93
1 changed files with 2 additions and 4 deletions
|
@ -128,10 +128,8 @@ int CameraStream::configure()
|
|||
worker_->start();
|
||||
}
|
||||
|
||||
if (type_ == Type::Internal) {
|
||||
allocator_ = std::make_unique<PlatformFrameBufferAllocator>(cameraDevice_);
|
||||
mutex_ = std::make_unique<Mutex>();
|
||||
}
|
||||
allocator_ = std::make_unique<PlatformFrameBufferAllocator>(cameraDevice_);
|
||||
mutex_ = std::make_unique<Mutex>();
|
||||
|
||||
camera3Stream_->max_buffers = configuration().bufferCount;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue