Monado OpenXR Runtime
|
WMR camera and IMU data source. More...
#include "wmr_source.h"
#include "wmr_camera.h"
#include "wmr_config.h"
#include "wmr_protocol.h"
#include "math/m_api.h"
#include "math/m_clock_tracking.h"
#include "math/m_filter_fifo.h"
#include "util/u_debug.h"
#include "util/u_sink.h"
#include "util/u_var.h"
#include "util/u_trace_marker.h"
#include "xrt/xrt_tracking.h"
#include "xrt/xrt_frameserver.h"
#include <assert.h>
#include <stdio.h>
Data Structures | |
struct | wmr_source |
Handles all the data sources from the WMR driver. More... | |
Macros | |
#define | WMR_SOURCE_STR "WMR Source" |
#define | WMR_TRACE(w, ...) U_LOG_IFL_T(w->log_level, __VA_ARGS__) |
#define | WMR_DEBUG(w, ...) U_LOG_IFL_D(w->log_level, __VA_ARGS__) |
#define | WMR_INFO(w, ...) U_LOG_IFL_I(w->log_level, __VA_ARGS__) |
#define | WMR_WARN(w, ...) U_LOG_IFL_W(w->log_level, __VA_ARGS__) |
#define | WMR_ERROR(w, ...) U_LOG_IFL_E(w->log_level, __VA_ARGS__) |
#define | WMR_ASSERT(predicate, ...) |
#define | WMR_ASSERT_(predicate) WMR_ASSERT(predicate, "Assertion failed " #predicate) |
#define | DEFINE_RECEIVE_CAM(cam_id) |
Functions | |
static void | receive_cam0 (struct xrt_frame_sink *sink, struct xrt_frame *xf) |
static void | receive_cam1 (struct xrt_frame_sink *sink, struct xrt_frame *xf) |
static void | receive_cam2 (struct xrt_frame_sink *sink, struct xrt_frame *xf) |
static void | receive_cam3 (struct xrt_frame_sink *sink, struct xrt_frame *xf) |
static void | receive_imu_sample (struct xrt_imu_sink *sink, struct xrt_imu_sample *s) |
static struct wmr_source * | wmr_source_from_xfs (struct xrt_fs *xfs) |
static bool | wmr_source_enumerate_modes (struct xrt_fs *xfs, struct xrt_fs_mode **out_modes, uint32_t *out_count) |
static bool | wmr_source_configure_capture (struct xrt_fs *xfs, struct xrt_fs_capture_parameters *cp) |
static bool | wmr_source_stream_stop (struct xrt_fs *xfs) |
static bool | wmr_source_is_running (struct xrt_fs *xfs) |
static bool | wmr_source_stream_start (struct xrt_fs *xfs, struct xrt_frame_sink *xs, enum xrt_fs_capture_type capture_type, uint32_t descriptor_index) |
static bool | wmr_source_slam_stream_start (struct xrt_fs *xfs, struct xrt_slam_sinks *sinks) |
static void | wmr_source_node_break_apart (struct xrt_frame_node *node) |
static void | wmr_source_node_destroy (struct xrt_frame_node *node) |
struct xrt_fs * | wmr_source_create (struct xrt_frame_context *xfctx, struct xrt_prober_device *dev_holo, struct wmr_hmd_config cfg) |
Create and open the frame server for IMU/camera streaming. More... | |
void | wmr_source_push_imu_packet (struct xrt_fs *xfs, timepoint_ns t, struct xrt_vec3 accel, struct xrt_vec3 gyro) |
Variables | |
void(* | receive_cam [4])(struct xrt_frame_sink *, struct xrt_frame *) |
Define a function for each WMR_MAX_CAMERAS and reference it in this array. More... | |
WMR camera and IMU data source.
#define DEFINE_RECEIVE_CAM | ( | cam_id | ) |
#define WMR_ASSERT | ( | predicate, | |
... | |||
) |
|
static |
<
References container_of, wmr_source::hw2mono, wmr_source::imu_sink, wmr_source::last_imu_ns, m_clock_offset_a2b(), and os_monotonic_get_ns().
void(* receive_cam[4])(struct xrt_frame_sink *, struct xrt_frame *) | ( | struct xrt_frame_sink * | , |
struct xrt_frame * | |||
) |
Define a function for each WMR_MAX_CAMERAS and reference it in this array.