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

KWin direct ScreenCast capture via zkde_screencast_unstable_v1 Wayland protocol. More...

#include <algorithm>
#include <array>
#include <atomic>
#include <chrono>
#include <fstream>
#include <memory>
#include <pwd.h>
#include <ranges>
#include <string>
#include <string_view>
#include <thread>
#include <pipewire/pipewire.h>
#include <poll.h>
#include <unistd.h>
#include <wayland-client.h>
#include <kde-output-order-v1.h>
#include <zkde-screencast-unstable-v1.h>
#include "cuda.h"
#include "graphics.h"
#include "pipewire.cpp"
#include "src/platform/common.h"
#include "src/video.h"
Include dependency graph for kwingrab.cpp:

Classes

class  kwin::kwin_t
 
struct  kwin::output_parameter_t
 
class  kwin::screencast_permission_helper_t
 
class  kwin::screencast_t
 

Functions

bool platf::kwin_available ()
 
std::shared_ptr< display_tplatf::kwin_display (mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config)
 
std::vector< std::string > platf::kwin_display_names ()
 

Detailed Description

KWin direct ScreenCast capture via zkde_screencast_unstable_v1 Wayland protocol.

Bypasses xdg-desktop-portal entirely. Sunshine connects directly to KWin's Wayland protocol to obtain a PipeWire node_id, then streams frames via PipeWire.

Chain: KWin -> Wayland kde_screencast -> PipeWire -> Sunshine