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 "
tracking/t_camera_models.h
"
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
24
struct
rift_sensor
;
25
struct
rift_sensor_context
;
26
27
enum
rift_sensor_variant
28
{
29
RIFT_SENSOR_VARIANT_DK2,
30
RIFT_SENSOR_VARIANT_CV1,
31
};
32
33
void
34
rift_sensor_context_destroy(
struct
rift_sensor_context
*context);
35
36
int
37
rift_sensor_context_create(
struct
rift_sensor_context
**out_context,
struct
xrt_frame_context
*xfctx);
38
39
int
40
rift_sensor_context_enable_exposure_sync(
struct
rift_sensor_context
*context, uint8_t radio_id[5]);
41
42
int
43
rift_sensor_context_start(
struct
rift_sensor_context
*context);
44
45
ssize_t
46
rift_sensor_context_get_sensors(
struct
rift_sensor_context
*context,
struct
rift_sensor
***out_sensors);
47
48
struct
xrt_fs
*
49
rift_sensor_get_frame_server(
struct
rift_sensor
*sensor);
rift_sensor_context
Definition
rift_sensor_internal.h:18
rift_sensor
Definition
rift_sensor_internal.h:31
xrt_frame_context
Object used to track all sinks and frame producers in a graph.
Definition
xrt_frame.h:108
xrt_fs
Frameserver that generates frames.
Definition
xrt_frameserver.h:70
t_camera_models.h
Simple, untemplated, C, float-only, camera (un)projection functions for various camera models.
drivers
rift_sensor
rift_sensor_interface.h
Generated by
1.9.8