Monado OpenXR Runtime
Loading...
Searching...
No Matches
wmr_source.h
Go to the documentation of this file.
1// Copyright 2021, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Interface for WMR data sources
6 * @author Mateo de Mayo <mateo.demayo@collabora.com>
7 * @ingroup drv_wmr
8 */
9
10#pragma once
11
12#include "wmr_config.h"
13#include "xrt/xrt_frameserver.h"
14#include "xrt/xrt_prober.h"
15#include "xrt/xrt_tracking.h"
16
17/*!
18 * WMR video/IMU data sources
19 *
20 * The objective of this class is to aggregate all the data sources (frames, IMU,
21 * etc.) of a WMR device into a single @ref xrt_fs.
22 *
23 * @addtogroup drv_wmr
24 * @{
25 */
26
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32//! Create and return the data source as a @ref xrt_fs ready for data streaming.
33struct xrt_fs *
34wmr_source_create(struct xrt_frame_context *xfctx, struct xrt_prober_device *dev_holo, struct wmr_hmd_config cfg);
35
36//! @todo Should this method receive raw or calibrated samples? Currently
37//! receiving raw because Basalt can calibrate them, but other systems can't.
38void
40 struct xrt_fs *xfs, uint32_t imu_id, timepoint_ns t, struct xrt_vec3 accel, struct xrt_vec3 gyro);
41
42/*!
43 * @}
44 */
45
46#ifdef __cplusplus
47}
48#endif
int64_t timepoint_ns
Integer timestamp type.
Definition u_time.h:77
struct xrt_fs * wmr_source_create(struct xrt_frame_context *xfctx, struct xrt_prober_device *dev_holo, struct wmr_hmd_config cfg)
Create and return the data source as a xrt_fs ready for data streaming.
Definition wmr_source.c:308
void wmr_source_push_imu_packet(struct xrt_fs *xfs, uint32_t imu_id, timepoint_ns t, struct xrt_vec3 accel, struct xrt_vec3 gyro)
Definition wmr_source.c:396
Definition wmr_config.h:154
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
A probed device, may or may not be opened.
Definition xrt_prober.h:89
A 3 element vector with single floats.
Definition xrt_defines.h:299
WMR and MS HoloLens configuration structures.
Frameserver interface for video drivers.
Common interface to probe for devices.
Header defining the tracking system integration in Monado.