Monado OpenXR Runtime
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 * @addtogroup drv_wmr
21 * @{
22 */
23
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29//! Create and return the data source as a @ref xrt_fs ready for data streaming.
30struct xrt_fs *
31wmr_source_create(struct xrt_frame_context *xfctx, struct xrt_prober_device *dev_holo, struct wmr_hmd_config cfg);
32
33//! @todo IMU data should be generated from within the data source, but right
34//! now we need this function because it is being generated from wmr_hmd
35//! @todo Should this method receive raw or calibrated samples? Currently
36//! receiving raw because Basalt can calibrate them, but other systems can't.
37void
38wmr_source_push_imu_packet(struct xrt_fs *xfs, timepoint_ns t, struct xrt_vec3 accel, struct xrt_vec3 gyro);
39
40/*!
41 * @}
42 */
43
44#ifdef __cplusplus
45}
46#endif
int64_t timepoint_ns
Integer timestamp type.
Definition: u_time.h:70
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:297
void wmr_source_push_imu_packet(struct xrt_fs *xfs, timepoint_ns t, struct xrt_vec3 accel, struct xrt_vec3 gyro)
Definition: wmr_source.c:370
Definition: wmr_config.h:166
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:85
A 3 element vector with single floats.
Definition: xrt_defines.h:271
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.