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

Definitions for wlgrab capture. More...

#include <thread>
#include "cuda.h"
#include "src/logging.h"
#include "src/platform/common.h"
#include "src/video.h"
#include "vaapi.h"
#include "wayland.h"
Include dependency graph for wlgrab.cpp:

Classes

struct  wl::img_t
 Captured frame buffer shared between capture and encode stages. More...
 
class  wl::wlr_ram_t
 Wayland screencopy backend that copies frames into system memory. More...
 
class  wl::wlr_t
 Wayland screencopy capture backend shared by RAM and VRAM paths. More...
 
class  wl::wlr_vram_t
 Wayland screencopy backend that exports frames as GPU resources. More...
 

Namespaces

namespace  wl
 

Functions

std::shared_ptr< display_tplatf::wl_display (mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config)
 Create a Wayland display capture backend.
 
std::vector< std::string > platf::wl_display_names ()
 Enumerate displays available through the Wayland capture backend.
 

Detailed Description

Definitions for wlgrab capture.

Function Documentation

◆ wl_display()

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

Create a Wayland display capture backend.

Create a Wayland capture backend for the requested memory type.

Parameters
hwdevice_typeHardware device type requested for capture or encode.
display_nameDisplay name.
configConfiguration values to apply.
Returns
Display backend, or nullptr when Wayland capture initialization fails.

◆ wl_display_names()

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

Enumerate displays available through the Wayland capture backend.

Enumerate capture display names reported by the Wayland compositor.

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