The open source OpenXR runtime
at main 46 lines 1.1 kB view raw
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