Monado OpenXR Runtime
Loading...
Searching...
No Matches
b_sink_bridge Struct Reference
Collaboration diagram for b_sink_bridge:

Public Member Functions

xrt_result_t b_sink_bridge_attach (struct b_sink_bridge *bsb, struct xrt_frame_context *recv_xfctx)
 Attach the receiving side to recv_xfctx.
 
struct xrt_frame_sink * b_sink_bridge_get_frame_sink (struct b_sink_bridge *bsb, uint32_t index)
 Sink for the producer to push frames for frame source index into.
 
struct t_timing_event_sink * b_sink_bridge_get_timing_sink (struct b_sink_bridge *bsb, uint32_t index)
 Sink for the producer to push timing events for timing event source index into.
 
struct xrt_frame_source * b_sink_bridge_get_frame_source (struct b_sink_bridge *bsb, uint32_t index)
 Receiving side frame source index, adding sinks to it fails when the bridge isn't attached.
 
struct t_timing_event_source * b_sink_bridge_get_timing_source (struct b_sink_bridge *bsb, uint32_t index)
 Receiving side timing event source index, adding sinks to it fails when the bridge isn't attached.
 

Data Fields

struct xrt_reference ref
 One for the send node, plus one while the receive node is in a context.
 
struct xrt_frame_node send_node
 
struct xrt_frame_node recv_node
 
struct os_rwlock lock
 Read locked while pushing, sinks are not reference counted so this is what makes sure nothing is pushed to them after remove_sink has returned or the receiving context has been broken apart.
 
bool sending
 Cleared when the send node is broken apart.
 
bool receiving
 Set on attach, cleared when the receive node is broken apart.
 
bool recv_in_context
 Set on attach, cleared when the receive node is destroyed.
 
struct b_sink_bridge_frame frames [XRT_TRACKING_MAX_FRAME_SOURCES]
 
struct b_sink_bridge_timing timings [XRT_TRACKING_MAX_FRAME_SOURCES]
 

Member Function Documentation

◆ b_sink_bridge_attach()

xrt_result_t b_sink_bridge_attach ( struct b_sink_bridge *  bsb,
struct xrt_frame_context *  recv_xfctx 
)

Attach the receiving side to recv_xfctx.

Fails if it is already attached to a context that hasn't been destroyed yet.

References lock, receiving, recv_in_context, ref, XRT_ERROR_INVALID_ARGUMENT, and XRT_SUCCESS.

◆ b_sink_bridge_get_frame_sink()

struct xrt_frame_sink * b_sink_bridge_get_frame_sink ( struct b_sink_bridge *  bsb,
uint32_t  index 
)

Sink for the producer to push frames for frame source index into.

References ARRAY_SIZE, and b_sink_bridge_frame::sink.

◆ b_sink_bridge_get_frame_source()

struct xrt_frame_source * b_sink_bridge_get_frame_source ( struct b_sink_bridge *  bsb,
uint32_t  index 
)

Receiving side frame source index, adding sinks to it fails when the bridge isn't attached.

References ARRAY_SIZE, and b_sink_bridge_frame::source.

◆ b_sink_bridge_get_timing_sink()

struct t_timing_event_sink * b_sink_bridge_get_timing_sink ( struct b_sink_bridge *  bsb,
uint32_t  index 
)

Sink for the producer to push timing events for timing event source index into.

References ARRAY_SIZE, and b_sink_bridge_timing::sink.

◆ b_sink_bridge_get_timing_source()

struct t_timing_event_source * b_sink_bridge_get_timing_source ( struct b_sink_bridge *  bsb,
uint32_t  index 
)

Receiving side timing event source index, adding sinks to it fails when the bridge isn't attached.

References ARRAY_SIZE, and b_sink_bridge_timing::source.

Field Documentation

◆ lock

struct os_rwlock b_sink_bridge::lock

Read locked while pushing, sinks are not reference counted so this is what makes sure nothing is pushed to them after remove_sink has returned or the receiving context has been broken apart.

Referenced by b_sink_bridge_attach(), and b_sink_bridge_create().

◆ receiving

bool b_sink_bridge::receiving

Set on attach, cleared when the receive node is broken apart.

Referenced by b_sink_bridge_attach().

◆ recv_in_context

bool b_sink_bridge::recv_in_context

Set on attach, cleared when the receive node is destroyed.

Referenced by b_sink_bridge_attach().

◆ ref

struct xrt_reference b_sink_bridge::ref

One for the send node, plus one while the receive node is in a context.

Referenced by b_sink_bridge_attach(), and b_sink_bridge_create().

◆ sending

bool b_sink_bridge::sending

Cleared when the send node is broken apart.

Referenced by b_sink_bridge_create().


The documentation for this struct was generated from the following files: