mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-23 23:21:46 +00:00
6bb2972443
Add API for gain control on headset cameras, and use it to set a mid-range default exposure gain
51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
// Copyright 2021 Jan Schmidt <jan@centricular.com>
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
/*!
|
|
* @file
|
|
* @brief Interface to read WMR cameras
|
|
* @author Jan Schmidt <jan@centricular.com>
|
|
* @ingroup drv_wmr
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "xrt/xrt_config_have.h"
|
|
#include "util/u_logging.h"
|
|
#include "xrt/xrt_prober.h"
|
|
|
|
#include "wmr_config.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct wmr_camera;
|
|
|
|
#ifdef XRT_HAVE_LIBUSB
|
|
struct wmr_camera *
|
|
wmr_camera_open(struct xrt_prober_device *dev_holo, enum u_logging_level ll);
|
|
void
|
|
wmr_camera_free(struct wmr_camera *cam);
|
|
|
|
bool
|
|
wmr_camera_start(struct wmr_camera *cam, struct wmr_camera_config *cam_configs, int n_configs);
|
|
bool
|
|
wmr_camera_stop(struct wmr_camera *cam);
|
|
int
|
|
wmr_camera_set_gain(struct wmr_camera *cam, uint8_t camera_id, uint8_t exposure);
|
|
|
|
#else
|
|
|
|
/* Stubs to disable camera functions without libusb */
|
|
#define wmr_camera_open(dev_holo, ll) NULL
|
|
#define wmr_camera_free(cam)
|
|
#define wmr_camera_start(cam, cam_configs, n_configs) false
|
|
#define wmr_camera_stop(cam) false
|
|
#define wmr_camera_set_gain(cam, camera_id, exposure) -1
|
|
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|