Monado OpenXR Runtime
u_sink.h File Reference

xrt_frame_sink converters and other helpers. More...

#include "os/os_threading.h"
#include "xrt/xrt_frame.h"
#include "xrt/xrt_tracking.h"
Include dependency graph for u_sink.h:

Go to the source code of this file.

Data Structures

struct  u_sink_quirk_params
 
struct  u_sink_debug
 Allows more safely to debug sink inputs and outputs. More...
 

Functions

void u_sink_stereo_sbs_to_slam_sbs_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream_left, struct xrt_frame_sink *downstream_right, struct xrt_frame_sink **out_xfs)
 Splits Stereo SBS frames into two independent frames. More...
 
bool u_sink_combiner_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_left_xfs, struct xrt_frame_sink **out_right_xfs)
 Combines stereo frames. More...
 
bool u_sink_force_genlock_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream_left, struct xrt_frame_sink *downstream_right, struct xrt_frame_sink **out_left_xfs, struct xrt_frame_sink **out_right_xfs)
 Enforces left-right push order on frames and forces them to be within a reasonable amount of time from each other. More...
 
static void u_sink_debug_init (struct u_sink_debug *usd)
 
static bool u_sink_debug_is_active (struct u_sink_debug *usd)
 
static void u_sink_debug_push_frame (struct u_sink_debug *usd, struct xrt_frame *xf)
 
static void u_sink_debug_set_sink (struct u_sink_debug *usd, struct xrt_frame_sink *xfs)
 
static void u_sink_debug_destroy (struct u_sink_debug *usd)
 

Detailed Description

Function Documentation

◆ u_sink_combiner_create()

bool u_sink_combiner_create ( struct xrt_frame_context xfctx,
struct xrt_frame_sink downstream,
struct xrt_frame_sink **  out_left_xfs,
struct xrt_frame_sink **  out_right_xfs 
)

Combines stereo frames.

Opposite of u_sink_stereo_sbs_to_slam_sbs_create

References u_sink_combiner::left, xrt_frame_sink::push_frame, u_sink_combiner::right, u_sink_force_genlock_create(), and U_TYPED_CALLOC.

◆ u_sink_force_genlock_create()

bool u_sink_force_genlock_create ( struct xrt_frame_context xfctx,
struct xrt_frame_sink downstream_left,
struct xrt_frame_sink downstream_right,
struct xrt_frame_sink **  out_left_xfs,
struct xrt_frame_sink **  out_right_xfs 
)

Enforces left-right push order on frames and forces them to be within a reasonable amount of time from each other.

References u_sink_force_genlock::left, xrt_frame_sink::push_frame, and U_TYPED_CALLOC.

Referenced by u_sink_combiner_create().

◆ u_sink_stereo_sbs_to_slam_sbs_create()

void u_sink_stereo_sbs_to_slam_sbs_create ( struct xrt_frame_context xfctx,
struct xrt_frame_sink downstream_left,
struct xrt_frame_sink downstream_right,
struct xrt_frame_sink **  out_xfs 
)

Splits Stereo SBS frames into two independent frames.

References xrt_frame_sink::push_frame, and U_TYPED_CALLOC.