Monado OpenXR Runtime
Loading...
Searching...
No Matches
b_frame_source.c File Reference

Base frame source. More...

#include "util/u_misc.h"
#include "os/os_threading.h"
#include "b_frame_source.h"
Include dependency graph for b_frame_source.c:

Data Structures

struct  b_frame_source
 

Macros

#define B_FRAME_SOURCE_MAX_SINKS   4
 

Functions

static struct b_frame_source * from_source (struct xrt_frame_source *xfsrc)
 
static xrt_result_t b_frame_source_add_sink (struct xrt_frame_source *xfsrc, struct xrt_frame_sink *xs)
 
static void b_frame_source_remove_sink (struct xrt_frame_source *xfsrc, struct xrt_frame_sink *xs)
 
static struct b_frame_source * from_sink (struct xrt_frame_sink *xs)
 
static void b_frame_source_push_frame (struct xrt_frame_sink *xs, struct xrt_frame *xf)
 The lock is held while pushing, sinks are not reference counted so this is what stops remove_sink from returning while a push to the sink is in flight.
 
static struct b_frame_source * from_node (struct xrt_frame_node *node)
 
static void b_frame_source_break_apart (struct xrt_frame_node *node)
 
static void b_frame_source_destroy (struct xrt_frame_node *node)
 
xrt_result_t b_frame_source_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink **out_sink, struct xrt_frame_source **out_source)
 Creates a xrt_frame_source, frames pushed to out_sink are pushed to all sinks added to out_source.
 

Detailed Description

Base frame source.

Author
Jakob Bornecrantz tborn.nosp@m.ecra.nosp@m.ntz@n.nosp@m.vidi.nosp@m.a.com

Function Documentation

◆ b_frame_source_push_frame()

static void b_frame_source_push_frame ( struct xrt_frame_sink *  xs,
struct xrt_frame *  xf 
)
static

The lock is held while pushing, sinks are not reference counted so this is what stops remove_sink from returning while a push to the sink is in flight.

References ARRAY_SIZE.

Referenced by b_frame_source_create().