|
Monado OpenXR Runtime
|
Something that produces frames, and pushes them to all sinks added to it. More...
#include <xrt/xrt_frame_source.h>

Static Public Member Functions | |
| static XRT_NONNULL_ALL xrt_result_t | xrt_frame_source_add_sink (struct xrt_frame_source *xfsrc, struct xrt_frame_sink *xs) |
| Add a sink that frames will be pushed to. | |
| static XRT_NONNULL_ALL void | xrt_frame_source_remove_sink (struct xrt_frame_source *xfsrc, struct xrt_frame_sink *xs) |
| Remove a sink, does nothing if it hasn't been added. | |
Data Fields | |
| xrt_result_t(* | add_sink )(struct xrt_frame_source *xfsrc, struct xrt_frame_sink *xs) |
| Add a sink that frames will be pushed to. | |
| void(* | remove_sink )(struct xrt_frame_source *xfsrc, struct xrt_frame_sink *xs) |
| Remove a sink, does nothing if it hasn't been added. | |
Something that produces frames, and pushes them to all sinks added to it.
The frame counterpart of t_timing_event_source.
Implementations must also implement xrt_frame_node. Once xrt_frame_source::remove_sink returns the sink will not be pushed to again, so it is safe to destroy it.
The same frame is pushed to all sinks, so they must not modify it. Sinks must not add or remove sinks on the same source from within xrt_frame_sink::push_frame.
|
inlinestatic |
Add a sink that frames will be pushed to.
| xfsrc | The frame source. |
| xs | The sink to add. |
Helper for calling through the function pointer.
References add_sink.
|
inlinestatic |
Remove a sink, does nothing if it hasn't been added.
Waits for any in-flight push to the sink to return.
| xfsrc | The frame source. |
| xs | The sink to remove. |
Helper for calling through the function pointer.
References remove_sink.
| xrt_result_t(* xrt_frame_source::add_sink) (struct xrt_frame_source *xfsrc, struct xrt_frame_sink *xs) |
Add a sink that frames will be pushed to.
| xfsrc | The frame source. |
| xs | The sink to add. |
Referenced by b_frame_source_create(), and xrt_frame_source_add_sink().
| void(* xrt_frame_source::remove_sink) (struct xrt_frame_source *xfsrc, struct xrt_frame_sink *xs) |
Remove a sink, does nothing if it hasn't been added.
Waits for any in-flight push to the sink to return.
| xfsrc | The frame source. |
| xs | The sink to remove. |
Referenced by b_frame_source_create(), and xrt_frame_source_remove_sink().