Sunshine latest
Self-hosted game stream host for Moonlight.
platf::dxgi::wgc_capture_t Class Reference

#include <src/platform/windows/display.h>

Public Member Functions

int init (display_base_t *display, const ::video::config_t &config)
 Initialize the Windows.Graphics.Capture backend.
 
capture_e next_frame (std::chrono::milliseconds timeout, ID3D11Texture2D **out, uint64_t &out_time)
 Get the next frame from the producer thread. If not available, the capture thread blocks until one is, or the wait times out.
 
capture_e release_frame ()
 
int set_cursor_visible (bool)
 

Detailed Description

Display duplicator that uses the Windows.Graphics.Capture API.

Member Function Documentation

◆ init()

int platf::dxgi::wgc_capture_t::init ( display_base_t * display,
const ::video::config_t & config )

Initialize the Windows.Graphics.Capture backend.

Returns
0 on success, -1 on failure.

◆ next_frame()

capture_e platf::dxgi::wgc_capture_t::next_frame ( std::chrono::milliseconds timeout,
ID3D11Texture2D ** out,
uint64_t & out_time )

Get the next frame from the producer thread. If not available, the capture thread blocks until one is, or the wait times out.

Parameters
timeouthow long to wait for the next frame
outa texture containing the frame just captured
out_timethe timestamp of the frame just captured

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