Sunshine master
Self-hosted game stream host for Moonlight.
portalgrab.cpp File Reference

Definitions for XDG portal grab. More...

#include "pipewire.cpp"
Include dependency graph for portalgrab.cpp:

Classes

struct  portal::dbus_response_t
 DBus response loop and response variant for portal calls. More...
 
class  portal::dbus_t
 DBus connection and portal request helpers for screencast setup. More...
 
struct  portal::pipewire_streaminfo_t
 PipeWire stream node and negotiated capture size. More...
 
class  portal::portal_t
 Portal screencast backend that negotiates PipeWire streams over DBus. More...
 
class  portal::restore_token_t
 Persistent portal restore token used to reuse screencast permission. More...
 

Functions

std::shared_ptr< display_tplatf::portal_display (mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config)
 Create a portal-based display capture backend.
 
std::vector< std::string > platf::portal_display_names ()
 Enumerate capture targets available through xdg-desktop-portal.
 

Detailed Description

Definitions for XDG portal grab.

Function Documentation

◆ portal_display()

std::shared_ptr< display_t > platf::portal_display ( mem_type_e hwdevice_type,
const std::string & display_name,
const video::config_t & config )

Create a portal-based display capture backend.

Parameters
hwdevice_typeHardware device type requested for capture or encode.
display_nameDisplay name.
configConfiguration values to apply.
Returns
Display backend backed by xdg-desktop-portal and PipeWire, or nullptr.

◆ portal_display_names()

std::vector< std::string > platf::portal_display_names ( )

Enumerate capture targets available through xdg-desktop-portal.

Returns
Portal display names, or an empty list when portal discovery fails.