mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-26 10:05:08 +03:00
android: Remove internal thread
Now that libcamera creates threads internally and doesn't rely on an application-provided event loop, remove the thread from the Android Camera HAL layer. The CameraProxy class becomes meaningless, remove it and communicate directly from the CameraHalManager to the CameraDevice. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
8a8502ec0e
commit
da3f50ee9c
10 changed files with 189 additions and 315 deletions
|
@ -7,8 +7,8 @@
|
|||
|
||||
#include <hardware/camera_common.h>
|
||||
|
||||
#include "camera_device.h"
|
||||
#include "camera_hal_manager.h"
|
||||
#include "camera_proxy.h"
|
||||
#include "log.h"
|
||||
|
||||
using namespace libcamera;
|
||||
|
@ -71,14 +71,14 @@ static int hal_dev_open(const hw_module_t *module, const char *name,
|
|||
LOG(HAL, Debug) << "Open camera " << name;
|
||||
|
||||
int id = atoi(name);
|
||||
CameraProxy *proxy = cameraManager.open(id, module);
|
||||
if (!proxy) {
|
||||
CameraDevice *camera = cameraManager.open(id, module);
|
||||
if (!camera) {
|
||||
LOG(HAL, Error)
|
||||
<< "Failed to open camera module '" << id << "'";
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
*device = &proxy->camera3Device()->common;
|
||||
*device = &camera->camera3Device()->common;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue