Sunshine master
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 D3D cursor rendering resources for GPU capture.
 
capture_e next_frame (std::chrono::milliseconds timeout, ID3D11Texture2D **out, uint64_t &out_time)
 Acquire the next frame from the Windows capture backend.
 
capture_e release_frame ()
 Release resources associated with frame.
 
int set_cursor_visible (bool cursor_visible)
 Enable or disable cursor composition in Windows.Graphics.Capture frames.
 

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 D3D cursor rendering resources for GPU capture.

Initialize the Windows.Graphics.Capture backend.

Parameters
displayDisplay object or identifier associated with the operation.
configConfiguration values to apply.
Returns
0 on success; nonzero or negative platform status on failure.
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 )

Acquire the next frame from the Windows capture backend.

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

Parameters
timeoutMaximum time to wait for the operation.
outOutput object populated by the operation.
out_timeQPC timestamp associated with the acquired frame.
Returns
Capture status for the frame acquisition attempt.

◆ release_frame()

capture_e platf::dxgi::wgc_capture_t::release_frame ( )

Release resources associated with frame.

Returns
Capture status after releasing the current frame.

◆ set_cursor_visible()

int platf::dxgi::wgc_capture_t::set_cursor_visible ( bool cursor_visible)

Enable or disable cursor composition in Windows.Graphics.Capture frames.

Parameters
cursor_visibleWhether the cursor should be included in captured frames.
Returns
Zero when the cursor visibility state was accepted by the capture session.

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