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
12#include "rift/rift_interface.h"
13
15
16
17#define RIFT_SENSOR_CLOCK_FREQ (40000000)
18// @todo Remove when clang-format is updated in CI
19// clang-format off
20#define RIFT_SENSOR_CLOCK_TO_NS(x) ((timepoint_ns)(x) * 1000 / 40)
21// clang-format on
22#define RIFT_SENSOR_WIDTH 1280
23#define RIFT_SENSOR_HEIGHT 960
24#define RIFT_SENSOR_FRAME_SIZE (RIFT_SENSOR_WIDTH * RIFT_SENSOR_HEIGHT)
25
26struct rift_sensor;
28
29int
30rift_sensor_context_create(struct rift_sensor_context **out_context, struct xrt_frame_context *xfctx);
31
32int
33rift_sensor_enable_exposure_sync(struct rift_sensor_context *context, struct rift_sensor *sensor, uint8_t radio_id[5]);
34
35int
36rift_sensor_context_start(struct rift_sensor_context *context);
37
38ssize_t
39rift_sensor_context_get_sensors(struct rift_sensor_context *context, struct rift_sensor ***out_sensors);
40
41struct xrt_fs *
42rift_sensor_get_frame_server(struct rift_sensor *sensor);
43
44enum rift_variant
45rift_sensor_get_variant(struct rift_sensor *sensor);
46
47void
48rift_sensor_get_calibration(struct rift_sensor *sensor, struct t_camera_calibration *out_calibration);
49
50void
51rift_sensor_setup_frame_timestamp_callback(struct rift_sensor *sensor, struct rift_hmd *hmd);
Interface to Oculus Rift driver code.
A rift HMD device.
Definition rift_internal.h:825
Definition rift_sensor_internal.h:20
Definition rift_sensor_internal.h:33
Essential calibration data for a single camera, or single lens/sensor of a stereo camera.
Definition t_tracking.h:236
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.