Monado OpenXR Runtime
Loading...
Searching...
No Matches
b_timing_source.h
Go to the documentation of this file.
1// Copyright 2026, Beyley Cardellio
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Base timing source code
6 *
7 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
8 * @ingroup base
9 */
10
11#pragma once
12
13#include "xrt/xrt_frame.h"
14
16
17#include "os/os_threading.h"
18
19
20#define B_TIMING_SOURCE_MAX_SINKS 4
21
23{
24 struct t_timing_event_source base;
25 struct xrt_frame_node node;
26
27 struct os_mutex mutex;
28
29 bool running;
30
31 struct t_timing_event_sink *sinks[B_TIMING_SOURCE_MAX_SINKS];
32};
33
34int
35b_timing_source_init(struct xrt_frame_context *xfctx, struct b_timing_source **out_bts);
36
37void
38b_timing_source_push_event(struct b_timing_source *bts, const struct t_timing_event *event);
Wrapper around OS threading native functions.
Definition b_timing_source.h:23
A wrapper around a native mutex.
Definition os_threading.h:69
A time sync sink is a component that receives timing events from a stable timing source,...
Definition t_time_sync.h:69
A time sync source is a component that generates timing events for an t_timing_event_sink to consume.
Definition t_time_sync.h:102
Definition t_time_sync.h:49
Object used to track all sinks and frame producers in a graph.
Definition xrt_frame.h:108
A interface object used for destroying a frame graph.
Definition xrt_frame.h:87
Header defining interfaces for time synchronization in Monado.
Data frame header.