Monado OpenXR Runtime
Loading...
Searching...
No Matches
rift_sensor_interface.h
Go to the documentation of this file.
1// Copyright 2025-2026, Beyley Cardellio
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Interface to Oculus Rift sensor probing/initialization
6 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
7 * @ingroup drv_rift_sensor
8 */
9
10#pragma once
11
13
14
15#define RIFT_SENSOR_CLOCK_FREQ (40000000)
16// @todo Remove when clang-format is updated in CI
17// clang-format off
18#define RIFT_SENSOR_CLOCK_TO_NS(x) ((timepoint_ns)(x) * 1000 / 40)
19// clang-format on
20#define RIFT_SENSOR_WIDTH 1280
21#define RIFT_SENSOR_HEIGHT 960
22#define RIFT_SENSOR_FRAME_SIZE (RIFT_SENSOR_WIDTH * RIFT_SENSOR_HEIGHT)
23
24struct rift_sensor;
26
27enum rift_sensor_variant
28{
29 RIFT_SENSOR_VARIANT_DK2,
30 RIFT_SENSOR_VARIANT_CV1,
31};
32
33void
34rift_sensor_context_destroy(struct rift_sensor_context *context);
35
36int
37rift_sensor_context_create(struct rift_sensor_context **out_context, struct xrt_frame_context *xfctx);
38
39int
40rift_sensor_context_enable_exposure_sync(struct rift_sensor_context *context, uint8_t radio_id[5]);
41
42int
43rift_sensor_context_start(struct rift_sensor_context *context);
44
45ssize_t
46rift_sensor_context_get_sensors(struct rift_sensor_context *context, struct rift_sensor ***out_sensors);
47
48struct xrt_fs *
49rift_sensor_get_frame_server(struct rift_sensor *sensor);
Definition rift_sensor_internal.h:18
Definition rift_sensor_internal.h:31
Object used to track all sinks and frame producers in a graph.
Definition xrt_frame.h:108
Frameserver that generates frames.
Definition xrt_frameserver.h:70
Simple, untemplated, C, float-only, camera (un)projection functions for various camera models.