Sunshine master
Self-hosted game stream host for Moonlight.
cuda::nvfbc::handle_t Class Reference

NvFBC dynamic-library handle and function table. More...

Public Member Functions

int capture (NVFBC_CREATE_CAPTURE_SESSION_PARAMS &capture_params)
 Run the capture loop for this backend.
 
 handle_t (handle_t &&other)
 Move an NvFBC API handle and its resolved function table.
 
const char * last_error ()
 Read the last error string from the active NvFBC session.
 
handle_toperator= (handle_t &&other)
 Assign state from another instance while preserving ownership semantics.
 
int reset ()
 Reset the object to its initial empty state.
 
std::optional< NVFBC_GET_STATUS_PARAMS > status ()
 Return or update the current status value.
 
int stop ()
 Release the NvFBC capture session and wait for capture work to stop.
 

Static Public Member Functions

static std::optional< handle_tmake ()
 Allocate the underlying object and wrap it in the owning handle.
 

Public Attributes

NVFBC_SESSION_HANDLE handle
 NVIDIA FBC capture session handle.
 
std::bitset< MAX_FLAGS > handle_flags
 Handle flags.
 

Detailed Description

NvFBC dynamic-library handle and function table.

Constructor & Destructor Documentation

◆ handle_t()

cuda::nvfbc::handle_t::handle_t ( handle_t && other)
inline

Move an NvFBC API handle and its resolved function table.

Parameters
otherSource object whose state is copied or moved into this object.

Member Function Documentation

◆ capture()

int cuda::nvfbc::handle_t::capture ( NVFBC_CREATE_CAPTURE_SESSION_PARAMS & capture_params)
inline

Run the capture loop for this backend.

Parameters
capture_paramsCapture params.
Returns
Capture status reported to the streaming pipeline.

◆ last_error()

const char * cuda::nvfbc::handle_t::last_error ( )
inline

Read the last error string from the active NvFBC session.

Returns
Human-readable NvFBC error string.

◆ make()

static std::optional< handle_t > cuda::nvfbc::handle_t::make ( )
inlinestatic

Allocate the underlying object and wrap it in the owning handle.

Returns
Created backend object, or null when creation fails.

◆ operator=()

handle_t & cuda::nvfbc::handle_t::operator= ( handle_t && other)
inline

Assign state from another instance while preserving ownership semantics.

Parameters
otherSource object whose state is copied or moved into this object.
Returns
Reference or value produced by the operator.

◆ reset()

int cuda::nvfbc::handle_t::reset ( )
inline

Reset the object to its initial empty state.

Returns
Reset status.

◆ status()

std::optional< NVFBC_GET_STATUS_PARAMS > cuda::nvfbc::handle_t::status ( )
inline

Return or update the current status value.

Returns
Status status.

◆ stop()

int cuda::nvfbc::handle_t::stop ( )
inline

Release the NvFBC capture session and wait for capture work to stop.

Returns
Stop status.

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