Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
proc::proc_t Class Reference

Classes

struct  isolated_session_t
 One live isolated session, as the host needs to see it. More...

Public Member Functions

 proc_t (proc_t &&)=default
proc_t & operator= (proc_t &&)=default
 proc_t (boost::process::v1::environment &&env, std::vector< ctx_t > &&apps)
void launch_input_only ()
int execute (const ctx_t &_app, std::shared_ptr< rtsp_stream::launch_session_t > launch_session)
int prepare_session_virtual_display (std::shared_ptr< rtsp_stream::launch_session_t > launch_session, bool apply_scale=true, const ctx_t *session_app=nullptr, std::optional< uid_t > session_owner_uid=std::nullopt, bool isolated_session=false)
int execute_isolated (const ctx_t &app, std::shared_ptr< rtsp_stream::launch_session_t > launch_session)
void terminate_isolated (uint32_t launch_session_id)
void disconnect_isolated (uint32_t launch_session_id)
void terminate_isolated_client (const std::string &client_uuid)
bool isolated_client_present (const std::string &client_uuid)
void terminate_all_isolated ()
std::vector< isolated_session_t > list_isolated ()
int running_for_client (const std::string &client_uuid)
std::string running_app_uuid_for_client (const std::string &client_uuid)
bool any_running ()
boost::process::v1::environment get_session_env (uint32_t launch_session_id)
std::string isolated_audio_sink (uint32_t launch_session_id)
 The sink an isolated session plays into, or empty for one that shares the host's.
std::string isolated_audio_server (uint32_t launch_session_id)
std::string isolated_mic_source (uint32_t launch_session_id)
bool isolated_session_has_account (uint32_t launch_session_id)
 Whether an isolated session runs under a helper account of its own, whose audio server the host's cannot reach.
bool prepare_isolated_resume (std::shared_ptr< rtsp_stream::launch_session_t > launch_session)
int running ()
const std::vector< ctx_t > & get_apps () const
std::vector< ctx_t > & get_apps ()
std::string get_app_image (int app_id)
std::string get_last_run_app_name ()
std::string get_running_app_uuid ()
boost::process::v1::environment get_env ()
void resume ()
void pause ()
void terminate (bool immediate=false, bool needs_refresh=true)

Public Attributes

std::string display_name
std::string initial_display
std::string mode_changed_display
bool initial_hdr = false
bool virtual_display = false
bool allow_client_commands = false

Detailed Description

Definition at line 240 of file process.h.

Constructor & Destructor Documentation

◆ proc_t()

proc::proc_t::proc_t ( boost::process::v1::environment && env,
std::vector< ctx_t > && apps )
inline

Definition at line 251 of file process.h.

◆ ~proc_t()

proc::proc_t::~proc_t ( )

Definition at line 4320 of file process.cpp.

Member Function Documentation

◆ any_running()

bool proc::proc_t::any_running ( )

True while either the legacy global app or an isolated runtime lives.

Definition at line 3134 of file process.cpp.

◆ disconnect_isolated()

void proc::proc_t::disconnect_isolated ( uint32_t launch_session_id)

Apply the app's terminate-on-pause policy after a stream disconnects.

Definition at line 3033 of file process.cpp.

◆ execute()

int proc::proc_t::execute ( const ctx_t & _app,
std::shared_ptr< rtsp_stream::launch_session_t > launch_session )

Definition at line 3368 of file process.cpp.

◆ execute_isolated()

int proc::proc_t::execute_isolated ( const ctx_t & app,
std::shared_ptr< rtsp_stream::launch_session_t > launch_session )

Start an experimental compositor/app runtime bound to one independent Hermes-KMS DRM card. This does not start another Hermes server.

Definition at line 1865 of file process.cpp.

◆ get_app_image()

std::string proc::proc_t::get_app_image ( int app_id)

Definition at line 4299 of file process.cpp.

◆ get_apps() [1/2]

std::vector< ctx_t > & proc::proc_t::get_apps ( )

Definition at line 4291 of file process.cpp.

◆ get_apps() [2/2]

const std::vector< ctx_t > & proc::proc_t::get_apps ( ) const

Definition at line 4287 of file process.cpp.

◆ get_env()

boost::process::environment proc::proc_t::get_env ( )

Definition at line 4316 of file process.cpp.

◆ get_last_run_app_name()

std::string proc::proc_t::get_last_run_app_name ( )

Definition at line 4308 of file process.cpp.

◆ get_running_app_uuid()

std::string proc::proc_t::get_running_app_uuid ( )

Definition at line 4312 of file process.cpp.

◆ get_session_env()

boost::process::v1::environment proc::proc_t::get_session_env ( uint32_t launch_session_id)

Copy the environment belonging to an isolated runtime, or the base env.

Definition at line 3180 of file process.cpp.

◆ isolated_audio_server()

std::string proc::proc_t::isolated_audio_server ( uint32_t launch_session_id)

The audio server an isolated session's sink lives in, or empty for the host's.

Definition at line 3273 of file process.cpp.

◆ isolated_audio_sink()

std::string proc::proc_t::isolated_audio_sink ( uint32_t launch_session_id)

The sink an isolated session plays into, or empty for one that shares the host's.

Definition at line 3261 of file process.cpp.

◆ isolated_client_present()

bool proc::proc_t::isolated_client_present ( const std::string & client_uuid)

True while this client owns or is launching an isolated runtime.

Definition at line 3068 of file process.cpp.

◆ isolated_mic_source()

std::string proc::proc_t::isolated_mic_source ( uint32_t launch_session_id)

The source playing the client's microphone to an isolated session, or empty.

Definition at line 3282 of file process.cpp.

◆ isolated_session_has_account()

bool proc::proc_t::isolated_session_has_account ( uint32_t launch_session_id)

Whether an isolated session runs under a helper account of its own, whose audio server the host's cannot reach.

Definition at line 3291 of file process.cpp.

◆ launch_input_only()

void proc::proc_t::launch_input_only ( )

Definition at line 1716 of file process.cpp.

◆ list_isolated()

std::vector< proc_t::isolated_session_t > proc::proc_t::list_isolated ( )

Every isolated session this server currently holds.

Definition at line 3189 of file process.cpp.

◆ pause()

void proc::proc_t::pause ( )

Definition at line 4074 of file process.cpp.

◆ prepare_isolated_resume()

bool proc::proc_t::prepare_isolated_resume ( std::shared_ptr< rtsp_stream::launch_session_t > launch_session)

Reattach launch metadata to a still-running client runtime.

Definition at line 3297 of file process.cpp.

◆ prepare_session_virtual_display()

int proc::proc_t::prepare_session_virtual_display ( std::shared_ptr< rtsp_stream::launch_session_t > launch_session,
bool apply_scale = true,
const ctx_t * session_app = nullptr,
std::optional< uid_t > session_owner_uid = std::nullopt,
bool isolated_session = false )

Allocate and activate one experimental Hermes-KMS output for a streaming session. Used for additional clients after the app is already running.

Parameters
apply_scaleWhether to apply the current app/client scale policy.
session_appThe app context, when different from the running one.
session_owner_uidWhen set, the uid a broker-created Hermes-KMS card for this display belongs to: the isolated session account whose compositor will run on it.
Returns
0 on success, or an HTTP-compatible error code.

Definition at line 1729 of file process.cpp.

◆ resume()

void proc::proc_t::resume ( )

Definition at line 4030 of file process.cpp.

◆ running()

int proc::proc_t::running ( )
Returns
_app_id if a process is running, otherwise returns 0

Definition at line 3983 of file process.cpp.

◆ running_app_uuid_for_client()

std::string proc::proc_t::running_app_uuid_for_client ( const std::string & client_uuid)

Definition at line 3118 of file process.cpp.

◆ running_for_client()

int proc::proc_t::running_for_client ( const std::string & client_uuid)

Return the app exposed to a particular client in isolated mode.

Definition at line 3093 of file process.cpp.

◆ terminate()

void proc::proc_t::terminate ( bool immediate = false,
bool needs_refresh = true )

Definition at line 4132 of file process.cpp.

◆ terminate_all_isolated()

void proc::proc_t::terminate_all_isolated ( )

Stop every experimental isolated runtime.

Definition at line 3074 of file process.cpp.

◆ terminate_isolated()

void proc::proc_t::terminate_isolated ( uint32_t launch_session_id)

Stop only the runtime owned by a streaming launch session.

Definition at line 3019 of file process.cpp.

◆ terminate_isolated_client()

void proc::proc_t::terminate_isolated_client ( const std::string & client_uuid)

Stop the isolated runtime associated with a paired client.

Definition at line 3051 of file process.cpp.

Member Data Documentation

◆ allow_client_commands

bool proc::proc_t::allow_client_commands = false

Definition at line 249 of file process.h.

◆ display_name

std::string proc::proc_t::display_name

Definition at line 244 of file process.h.

◆ initial_display

std::string proc::proc_t::initial_display

Definition at line 245 of file process.h.

◆ initial_hdr

bool proc::proc_t::initial_hdr = false

Definition at line 247 of file process.h.

◆ mode_changed_display

std::string proc::proc_t::mode_changed_display

Definition at line 246 of file process.h.

◆ virtual_display

bool proc::proc_t::virtual_display = false

Definition at line 248 of file process.h.


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