Sunshine master
Self-hosted game stream host for Moonlight.
platf::dxgi::duplication_t Class Reference

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

Collaboration diagram for platf::dxgi::duplication_t:
[legend]

Public Member Functions

int init (display_base_t *display, const ::video::config_t &config)
 Initialize WGC capture for the selected display.
 
capture_e next_frame (DXGI_OUTDUPL_FRAME_INFO &frame_info, std::chrono::milliseconds timeout, resource_t::pointer *res_p)
 Acquire the next frame from the Windows capture backend.
 
capture_e release_frame ()
 Release resources associated with frame.
 
capture_e reset (dup_t::pointer dup_p=dup_t::pointer())
 Reset the object to its initial empty state.
 

Public Attributes

dup_t dup
 Desktop Duplication capture session.
 
bool has_frame {}
 Whether a frame is currently held by the duplication object.
 
std::chrono::steady_clock::time_point last_protected_content_warning_time {}
 Last protected content warning time.
 

Detailed Description

Display duplicator that uses the DirectX Desktop Duplication API.

Member Function Documentation

◆ init()

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

Initialize WGC capture for the selected display.

Parameters
displayDisplay object or identifier associated with the operation.
configConfiguration values to apply.
Returns
0 on success; nonzero or negative platform status on failure.

DDAPI-specific initialization goes here.

◆ next_frame()

capture_e platf::dxgi::duplication_t::next_frame ( DXGI_OUTDUPL_FRAME_INFO & frame_info,
std::chrono::milliseconds timeout,
resource_t::pointer * res_p )

Acquire the next frame from the Windows capture backend.

Parameters
frame_infoFrame info.
timeoutMaximum time to wait for the operation.
res_pRes p.
Returns
Capture status for the frame acquisition attempt.

◆ release_frame()

capture_e platf::dxgi::duplication_t::release_frame ( )

Release resources associated with frame.

Returns
Capture status after releasing the current frame.

◆ reset()

capture_e platf::dxgi::duplication_t::reset ( dup_t::pointer dup_p = dup_t::pointer())

Reset the object to its initial empty state.

Parameters
dup_pDup p.
Returns
Reset status.

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