Skip to content

Class ILLIXR::offload_rendering_server

ClassList > ILLIXR > offload_rendering_server

Main server implementation for offload rendering. More...

  • #include <offload_rendering_server.hpp>

Inherits the following classes: ILLIXR::threadloop, ILLIXR::vulkan::timewarp, ILLIXR::data_format::pose_prediction, std::enable_shared_from_this< plugin >

Public Functions

Type Name
virtual void _p_thread_setup () override
Gets called at setup time, from the new thread.
data_format::pose_type correct_pose (const data_format::pose_type & pose) override const
Correct pose data (no-op in this implementation)
void destroy () override
Cleanup resources on destruction.
bool fast_pose_reliable () override const
Check if fast pose data is reliable.
data_format::fast_pose_type get_fast_pose () override const
Get the latest pose for rendering.
data_format::fast_pose_type get_fast_pose (time_point future_time) override const
Get predicted pose for a future time point (returns current pose)
Eigen::Quaternionf get_offset () override
Get orientation offset (returns identity in this implementation)
data_format::pose_type get_true_pose () override const
Get the true pose (same as fast pose in this implementation)
bool is_external () override
Indicates this sink does not make use of the rendering pipeline in order for the access masks of the layout transitions to be set properly.
offload_rendering_server (const std::string & name, phonebook * pb)
Constructor initializes the server with configuration from environment variables.
void record_command_buffer (VkCommandBuffer commandBuffer, VkFramebuffer framebuffer, int buffer_ind, bool left) override
Record command buffer (no-op in this implementation)
void set_offset (const Eigen::Quaternionf & orientation) override
Set orientation offset (no-op in this implementation)
void setup (VkRenderPass render_pass, uint32_t subpass, std::shared_ptr< vulkan::buffer_pool< data_format::fast_pose_type > > _buffer_pool, bool input_texture_vulkan_coordinates) override
Sets up the rendering pipeline and encoding resources.
virtual void start () override
A method which Spindle calls when it starts the component.
bool true_pose_reliable () override const
Check if true pose data is reliable (always false in this implementation)
void update_uniforms (const data_format::pose_type & r_pose) override
Update uniforms (no-op in this implementation)

Public Functions inherited from ILLIXR::threadloop

See ILLIXR::threadloop

Type Name
virtual void internal_stop ()
Stops the thread.
virtual void start () override
Starts the thread.
virtual void stop () override
Joins the thread.
threadloop (const std::string & name, phonebook * pb)
~threadloop () override

Public Functions inherited from ILLIXR::plugin

See ILLIXR::plugin

Type Name
std::string get_name () noexcept const
plugin (std::string name, phonebook * pb)
void spd_add_file_sink (const std::string & file_name, const std::string & extension, const std::string & log_level)
auto spdlogger (const char * log_level)
virtual void start ()
A method which Spindle calls when it starts the component.
virtual void stop ()
A method which Spindle calls when it stops the component.
virtual ~plugin () = default

Protected Types inherited from ILLIXR::threadloop

See ILLIXR::threadloop

Type Name
enum skip_option

Protected Attributes inherited from ILLIXR::threadloop

See ILLIXR::threadloop

Type Name
std::size_t iteration_no = 0
std::size_t skip_no = 0

Protected Attributes inherited from ILLIXR::plugin

See ILLIXR::plugin

Type Name
const std::shared_ptr< gen_guid > gen_guid_
const std::size_t id_
std::string name_
const phonebook * phonebook_
std::shared_ptr< spdlog::logger > plugin_logger_
const std::shared_ptr< record_logger > record_logger_

Protected Functions

Type Name
virtual void _p_one_iteration () override
Main processing loop for frame encoding and transmission.
virtual skip_option _p_should_skip () override
Determines if the current iteration should be skipped.

Protected Functions inherited from ILLIXR::threadloop

See ILLIXR::threadloop

Type Name
virtual void _p_one_iteration () = 0
Override with the computation the thread does every loop.
virtual skip_option _p_should_skip ()
Gets called in a tight loop, to gate the invocation of _p_one_iteration() __
virtual void _p_thread_setup ()
Gets called at setup time, from the new thread.
bool should_terminate ()
Whether the thread has been asked to terminate.

Detailed Description

This class handles: * Frame capture from the rendering pipeline * Hardware-accelerated encoding using FFmpeg/CUDA * Network transmission of encoded frames * Pose synchronization with the client

Public Functions Documentation

function _p_thread_setup

Gets called at setup time, from the new thread.

virtual void ILLIXR::offload_rendering_server::_p_thread_setup () override

Implements ILLIXR::threadloop::_p_thread_setup


function correct_pose

Correct pose data (no-op in this implementation)

inline data_format::pose_type ILLIXR::offload_rendering_server::correct_pose (
    const data_format::pose_type & pose
) override const


function destroy

Cleanup resources on destruction.

void ILLIXR::offload_rendering_server::destroy () override


function fast_pose_reliable

Check if fast pose data is reliable.

inline bool ILLIXR::offload_rendering_server::fast_pose_reliable () override const


function get_fast_pose [1/2]

Get the latest pose for rendering.

data_format::fast_pose_type ILLIXR::offload_rendering_server::get_fast_pose () override const


function get_fast_pose [2/2]

Get predicted pose for a future time point (returns current pose)

inline data_format::fast_pose_type ILLIXR::offload_rendering_server::get_fast_pose (
    time_point future_time
) override const


function get_offset

Get orientation offset (returns identity in this implementation)

inline Eigen::Quaternionf ILLIXR::offload_rendering_server::get_offset () override


function get_true_pose

Get the true pose (same as fast pose in this implementation)

inline data_format::pose_type ILLIXR::offload_rendering_server::get_true_pose () override const


function is_external

Indicates this sink does not make use of the rendering pipeline in order for the access masks of the layout transitions to be set properly.

inline bool ILLIXR::offload_rendering_server::is_external () override


function offload_rendering_server

Constructor initializes the server with configuration from environment variables.

ILLIXR::offload_rendering_server::offload_rendering_server (
    const std::string & name,
    phonebook * pb
) 

Parameters:

  • name Plugin name
  • pb Phonebook for component lookup

function record_command_buffer

Record command buffer (no-op in this implementation)

inline void ILLIXR::offload_rendering_server::record_command_buffer (
    VkCommandBuffer commandBuffer,
    VkFramebuffer framebuffer,
    int buffer_ind,
    bool left
) override


function set_offset

Set orientation offset (no-op in this implementation)

inline void ILLIXR::offload_rendering_server::set_offset (
    const Eigen::Quaternionf & orientation
) override


function setup

Sets up the rendering pipeline and encoding resources.

void ILLIXR::offload_rendering_server::setup (
    VkRenderPass render_pass,
    uint32_t subpass,
    std::shared_ptr< vulkan::buffer_pool< data_format::fast_pose_type > > _buffer_pool,
    bool input_texture_vulkan_coordinates
) override

Parameters:

  • render_pass Vulkan render pass handle
  • subpass Subpass index
  • _buffer_pool Buffer pool for frame management
  • input_texture_vulkan_coordinates Whether input textures use Vulkan coordinates

function start

A method which Spindle calls when it starts the component.

virtual void ILLIXR::offload_rendering_server::start () override

This is necessary because a constructor can't call derived virtual methods (due to structure of C++). See threadloop for an example of this use-case.

Implements ILLIXR::plugin::start


function true_pose_reliable

Check if true pose data is reliable (always false in this implementation)

inline bool ILLIXR::offload_rendering_server::true_pose_reliable () override const


function update_uniforms

Update uniforms (no-op in this implementation)

inline void ILLIXR::offload_rendering_server::update_uniforms (
    const data_format::pose_type & r_pose
) override


Protected Functions Documentation

function _p_one_iteration

Main processing loop for frame encoding and transmission.

virtual void ILLIXR::offload_rendering_server::_p_one_iteration () override

This method: * Captures the latest rendered frame * Encodes it using hardware acceleration * Transmits it to the client * Tracks performance metrics

Implements ILLIXR::threadloop::_p_one_iteration


function _p_should_skip

Determines if the current iteration should be skipped.

inline virtual skip_option ILLIXR::offload_rendering_server::_p_should_skip () override

Implements ILLIXR::threadloop::_p_should_skip



The documentation for this class was generated from the following file /home/friedel/devel/ILLIXR/plugins/offload_rendering_server/offload_rendering_server.hpp