![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include <chrono>#include <thread>#include <vector>#include <condition_variable>#include <queue>#include <assert.h>#include <openxr/openxr.h>#include <openxr/openxr_platform.h>#include <glm/glm.hpp>#include <glm/gtc/matrix_transform.hpp>#include <glm/gtc/type_ptr.hpp>#include <glm/gtc/quaternion.hpp>#include "debug.h"#include "host.h"#include "keyboard_control.h"#include "lib_common.h"#include "messaging.h"#include "module.h"#include "video.h"#include "video_display.h"#include "video_display/splashscreen.h"#include "opengl_utils.hpp"#include "opengl_panorama.hpp"#include "sdl_window.hpp"#include "utils/profile_timer.hpp"
Go to the source code of this file.
Classes | |
| class | Gl_interop_swapchain |
| class | Openxr_instance |
| class | Openxr_local_space |
| class | Openxr_session |
| struct | Openxr_state |
| class | Openxr_swapchain |
| struct | state_xrgl |
Macros | |
| #define | MAX_BUFFER_SIZE 3 |
Functions | |
| static video_frame * | allocate_frame (state_xrgl *s) |
| static void | delete_frame (video_frame *f) |
| static void | display_xrgl_done (void *state) |
| static bool | display_xrgl_get_property (void *state, int property, void *val, size_t *len) |
| static struct video_frame * | display_xrgl_getf (void *state) |
| static void * | display_xrgl_init (struct module *parent, const char *fmt, unsigned int flags) |
| static void | display_xrgl_probe (struct device_info **available_cards, int *count, void(**deleter)(void *)) |
| static bool | display_xrgl_putf (void *state, struct video_frame *frame, long long nonblock) |
| static bool | display_xrgl_reconfigure (void *state, struct video_desc desc) |
| static void | display_xrgl_run (void *state) |
| static glm::mat4 | get_proj_mat (const XrFovf &fov, float zNear, float zFar) |
| static std::vector< int64_t > | get_swapchain_formats (XrSession session) |
| static std::vector< XrViewConfigurationView > | get_views (Openxr_state &xr_state) |
| static void | map_new_buffer (struct video_frame *f) |
| static void | recycle_frame (video_frame *f) |
| REGISTER_MODULE (openxr_gl, &openxr_gl_info, LIBRARY_CLASS_VIDEO_DISPLAY, VIDEO_DISPLAY_ABI_VERSION) | |
| static int64_t | select_swapchain_fmt (const std::vector< int64_t > &swapchain_formats) |
| static void | worker (state_xrgl *s) |
Variables | |
| static const struct video_display_info | openxr_gl_info |
Definition in file openxr_gl.cpp.
| #define MAX_BUFFER_SIZE 3 |
Definition at line 83 of file openxr_gl.cpp.
Referenced by display_xrgl_init(), display_xrgl_putf(), and worker().
|
static |
Definition at line 539 of file openxr_gl.cpp.
References video_frame::callbacks, state_xrgl::current_desc, video_frame_callbacks::dispose_udata, GlBuffer::get(), map_new_buffer(), and vf_alloc_desc().
Referenced by worker().

|
static |
Definition at line 523 of file openxr_gl.cpp.
References video_frame::callbacks, tile::data, video_frame_callbacks::dispose_udata, GlBuffer::get(), video_frame::tiles, and vf_free().
Referenced by worker().

|
static |
Definition at line 1003 of file openxr_gl.cpp.
References state.
|
static |
Definition at line 1065 of file openxr_gl.cpp.
References codecs, DISPLAY_PROPERTY_BUF_PITCH, DISPLAY_PROPERTY_CODECS, DISPLAY_PROPERTY_RGB_SHIFT, DISPLAY_PROPERTY_SUPPORTED_IL_MODES, len, PITCH_DEFAULT, PROGRESSIVE, property, state, and val.
|
static |
Definition at line 1009 of file openxr_gl.cpp.
References state_xrgl::current_desc, state_xrgl::dispose_frame_pool, state_xrgl::free_frame_pool, state_xrgl::free_frame_ready_cv, state_xrgl::lock, state_xrgl::new_frame_ready_cv, state, video_desc_eq(), and video_desc_from_frame().

|
static |
Definition at line 978 of file openxr_gl.cpp.
References state_xrgl::dispose_frame_pool, flags, fmt, state_xrgl::free_frame_pool, Openxr_instance::get(), Openxr_state::instance, MAX_BUFFER_SIZE, parent, Openxr_state::system_id, UNUSED, and state_xrgl::xr_state.

|
static |
Definition at line 1109 of file openxr_gl.cpp.
References count, deleter, device_info::dev, instance, name, and UNUSED.
|
static |
Definition at line 1027 of file openxr_gl.cpp.
References state_xrgl::dispose_frame_pool, frame, state_xrgl::frame_consumed_cv, state_xrgl::frame_queue, state_xrgl::lock, MAX_BUFFER_SIZE, state_xrgl::new_frame_ready_cv, nonblock, PUTF_BLOCKING, PUTF_DISCARD, and state.
|
static |
Definition at line 1058 of file openxr_gl.cpp.
References state_xrgl::current_desc, desc, and state.
|
static |
Definition at line 609 of file openxr_gl.cpp.
References Openxr_session::begin(), exit_uv(), Openxr_instance::get(), Openxr_local_space::get(), Openxr_session::get(), get_proj_mat(), get_swapchain_formats(), get_views(), Sdl_window::height, Openxr_state::instance, LOG_LEVEL_ERROR, LOG_LEVEL_NOTICE, LOG_LEVEL_WARNING, log_msg(), Sdl_window::make_render_context_current(), Sdl_window::make_worker_context_current(), PROFILE_DETAIL, PROFILE_FUNC, PanoramaScene::render(), state_xrgl::scene, Sdl_window::sdl_window, select_swapchain_fmt(), state, Openxr_state::system_id, Sdl_window::width, state_xrgl::window, worker(), worker_thread(), and state_xrgl::xr_state.

|
static |
Definition at line 465 of file openxr_gl.cpp.
Referenced by display_xrgl_run().
|
static |
Definition at line 443 of file openxr_gl.cpp.
Referenced by display_xrgl_run().
|
static |
Definition at line 413 of file openxr_gl.cpp.
References Openxr_instance::get(), Openxr_state::instance, and Openxr_state::system_id.
Referenced by display_xrgl_run().

|
static |
Definition at line 501 of file openxr_gl.cpp.
References tile::data, tile::data_len, and video_frame::tiles.
Referenced by allocate_frame(), and recycle_frame().
|
static |
Definition at line 511 of file openxr_gl.cpp.
References video_frame::callbacks, tile::data, video_frame_callbacks::dispose_udata, GlBuffer::get(), map_new_buffer(), and video_frame::tiles.
Referenced by worker().

| REGISTER_MODULE | ( | openxr_gl | , |
| & | openxr_gl_info, | ||
| LIBRARY_CLASS_VIDEO_DISPLAY | , | ||
| VIDEO_DISPLAY_ABI_VERSION | ) |
|
static |
Definition at line 484 of file openxr_gl.cpp.
Referenced by display_xrgl_run().
|
static |
Definition at line 550 of file openxr_gl.cpp.
References allocate_frame(), video_frame::callbacks, state_xrgl::current_desc, delete_frame(), state_xrgl::dispose_frame_pool, video_frame_callbacks::dispose_udata, frame, state_xrgl::frame_consumed_cv, state_xrgl::frame_queue, state_xrgl::free_frame_pool, state_xrgl::free_frame_ready_cv, state_xrgl::lock, Sdl_window::make_worker_context_current(), MAX_BUFFER_SIZE, state_xrgl::new_frame_ready_cv, PROFILE_DETAIL, PROFILE_FUNC, PanoramaScene::put_frame(), recycle_frame(), state_xrgl::scene, vf_alloc(), video_desc_eq(), video_desc_from_frame(), and state_xrgl::window.
Referenced by display_xrgl_run().

|
static |
Definition at line 1152 of file openxr_gl.cpp.