Monado OpenXR Runtime
u_sink_queue Struct Reference

An xrt_frame_sink queue, any frames received will be pushed to the downstream consumer on the queue thread. More...

Inheritance diagram for u_sink_queue:
Collaboration diagram for u_sink_queue:

Data Fields

struct xrt_frame_sink base
 Base sink. More...
 
struct xrt_frame_node node
 For tracking on the frame context. More...
 
struct xrt_frame_sinkconsumer
 The consumer of the frames that are queued. More...
 
struct u_sink_queue_elemfront
 Front of the queue (oldest frame, first to be consumed) More...
 
struct u_sink_queue_elemback
 Back of the queue (newest frame, back->next is always null) More...
 
uint64_t size
 Number of currently enqueued frames. More...
 
uint64_t max_size
 Max amount of frames before dropping new ones. 0 means unbounded. More...
 
pthread_t thread
 
pthread_mutex_t mutex
 
pthread_cond_t cond
 So we can wake the mainloop up. More...
 
bool running
 Should we keep running. More...
 
struct xrt_frameframe
 The current queued frame. More...
 
struct {
   uint64_t   current
 
   uint64_t   last
 
seq
 
- Data Fields inherited from xrt_frame_sink
void(* push_frame )(struct xrt_frame_sink *sink, struct xrt_frame *frame)
 Push a frame into the sink. More...
 
- Data Fields inherited from xrt_frame_node
struct xrt_frame_nodenext
 
void(* break_apart )(struct xrt_frame_node *node)
 Called first in when the graph is being destroyed, remove any references frames and other objects and stop threads. More...
 
void(* destroy )(struct xrt_frame_node *node)
 Do the actual freeing of the objects. More...
 

Additional Inherited Members

- Public Member Functions inherited from xrt_frame_sink
void u_sink_create_format_converter (struct xrt_frame_context *xfctx, enum xrt_format f, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
void u_sink_create_to_r8g8b8_or_l8 (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
void u_sink_create_to_r8g8b8_bayer_or_l8 (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
void u_sink_create_to_rgb_yuv_yuyv_uyvy_or_l8 (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
void u_sink_create_to_yuv_yuyv_uyvy_or_l8 (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
void u_sink_create_to_yuv_or_yuyv (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
void u_sink_create_to_r8g8b8_r8g8b8a8_r8g8b8x8_or_l8 (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
void u_sink_deinterleaver_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
bool u_sink_queue_create (struct xrt_frame_context *xfctx, uint64_t max_size, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
bool u_sink_simple_queue_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct xrt_frame_sink **out_xfs)
 
void u_sink_quirk_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *downstream, struct u_sink_quirk_params *params, struct xrt_frame_sink **out_xfs)
 
void u_sink_split_create (struct xrt_frame_context *xfctx, struct xrt_frame_sink *left, struct xrt_frame_sink *right, struct xrt_frame_sink **out_xfs)
 
- Static Public Member Functions inherited from xrt_frame_sink
static void xrt_sink_push_frame (struct xrt_frame_sink *sink, struct xrt_frame *frame)
 Push a frame into the sink. More...
 

Detailed Description

An xrt_frame_sink queue, any frames received will be pushed to the downstream consumer on the queue thread.

An xrt_frame_sink queue that holds buffers a single xrt_frame and passes it to the downstream consumer on the queue thread.

Will drop frames should multiple frames be queued up.

If another frame arrives before the current frame is consumed, the new frame replaces the old one.

Field Documentation

◆ back

struct u_sink_queue_elem* u_sink_queue::back

Back of the queue (newest frame, back->next is always null)

Referenced by queue_pop(), queue_refclear(), and queue_try_refpush().

◆ base

◆ cond

pthread_cond_t u_sink_queue::cond

So we can wake the mainloop up.

◆ consumer

struct xrt_frame_sink * u_sink_queue::consumer

The consumer of the frames that are queued.

◆ frame

struct xrt_frame* u_sink_queue::frame

The current queued frame.

◆ front

struct u_sink_queue_elem* u_sink_queue::front

Front of the queue (oldest frame, first to be consumed)

Referenced by queue_pop(), queue_refclear(), and queue_try_refpush().

◆ max_size

uint64_t u_sink_queue::max_size

Max amount of frames before dropping new ones. 0 means unbounded.

Referenced by queue_is_full().

◆ node

struct xrt_frame_node u_sink_queue::node

For tracking on the frame context.

◆ running

bool u_sink_queue::running

Should we keep running.

◆ size

uint64_t u_sink_queue::size

Number of currently enqueued frames.

Referenced by queue_is_empty(), queue_is_full(), queue_pop(), queue_refclear(), and queue_try_refpush().


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