Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
platf::dxgi::d3d_nvenc_encode_device_t Class Reference

D3D11 encode device that exposes captured textures to NVENC. More...

Inheritance diagram for platf::dxgi::d3d_nvenc_encode_device_t:
Collaboration diagram for platf::dxgi::d3d_nvenc_encode_device_t:

Public Member Functions

int convert (platf::img_t &img_base) override
 Convert a captured D3D texture for NVENC encoding.
bool init_device (std::shared_ptr< platf::display_t > display, adapter_t::pointer adapter_p, pix_fmt_e pix_fmt)
 Create D3D11 and NVENC resources for texture-based encoding.
bool init_encoder (const ::video::config_t &client_config, const ::video::sunshine_colorspace_t &encoder_colorspace) override
 Initialize the platform encoder for the client stream configuration.

Additional Inherited Members

Public Attributes inherited from platf::nvenc_encode_device_t
nvenc::nvenc_encoder * nvenc = nullptr
 NVENC encoder instance owned by the encode device.
Public Attributes inherited from platf::encode_device_t
video::sunshine_colorspace_t colorspace
 Colorspace metadata expected by the encoder.

Detailed Description

D3D11 encode device that exposes captured textures to NVENC.

Member Function Documentation

◆ convert()

int platf::dxgi::d3d_nvenc_encode_device_t::convert ( platf::img_t & img_base)
inlineoverridevirtual

Convert a captured D3D texture for NVENC encoding.

Parameters
img_baseD3D image supplied by the capture backend.
Returns
Conversion status.

Implements platf::encode_device_t.

◆ init_device()

bool platf::dxgi::d3d_nvenc_encode_device_t::init_device ( std::shared_ptr< platf::display_t > display,
adapter_t::pointer adapter_p,
pix_fmt_e pix_fmt )
inline

Create D3D11 and NVENC resources for texture-based encoding.

Parameters
displayDisplay object or identifier associated with the operation.
adapter_pAdapter p.
pix_fmtSunshine pixel format to convert or allocate for.
Returns
True when the D3D11 device resources are initialized.

◆ init_encoder()

bool platf::dxgi::d3d_nvenc_encode_device_t::init_encoder ( const ::video::config_t & client_config,
const ::video::sunshine_colorspace_t & encoder_colorspace )
inlineoverridevirtual

Initialize the platform encoder for the client stream configuration.

Parameters
client_configClient stream configuration negotiated for this session.
encoder_colorspaceColorimetry information used for conversion or encoding.
Returns
True when the NVENC encoder initializes for the client configuration.

Implements platf::nvenc_encode_device_t.


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