|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Shared D3D11 conversion resources for AVCodec and NVENC encode devices. More...
Classes | |
| struct | encoder_img_ctx_t |
| D3D texture and format information for encoder input. More... | |
Public Member Functions | |
| void | apply_colorspace (const ::video::sunshine_colorspace_t &colorspace) |
| Apply the configured colorspace metadata to the active frame. | |
| int | convert (platf::img_t &img_base) |
| Convert a captured D3D image into encoder input textures. | |
| shader_res_t | create_black_texture_for_rtv_clear () |
| Create black texture for rtv clear. | |
| int | init (std::shared_ptr< platf::display_t > display, adapter_t::pointer adapter_p, pix_fmt_e pix_fmt) |
| Initialize shared D3D conversion resources for the encoder. | |
| int | init_output (ID3D11Texture2D *frame_texture, int width, int height) |
| Create D3D11 output textures, views, and shaders for frame conversion. | |
| int | initialize_image_context (const img_d3d_t &img, encoder_img_ctx_t &img_ctx) |
| Initialize encoder-side D3D resources for a captured image. | |
Public Attributes | |
| blend_t | blend_disable |
| Blend disable. | |
| buf_t | color_matrix |
| Color matrix. | |
| ::video::color_t * | color_p |
| Color p. | |
| ps_t | convert_UV_fp16_ps |
| Convert UV fp16 ps. | |
| ps_t | convert_UV_ps |
| Convert UV ps. | |
| vs_t | convert_UV_vs |
| Convert UV vs. | |
| ps_t | convert_Y_or_YUV_fp16_ps |
| Convert y or YUV fp16 ps. | |
| ps_t | convert_Y_or_YUV_ps |
| Convert y or YUV ps. | |
| vs_t | convert_Y_or_YUV_vs |
| Convert y or YUV vs. | |
| device_t | device |
| D3D11 device used for encoder-side texture conversion. | |
| device_ctx_t | device_ctx |
| D3D11 device context used to issue conversion commands. | |
| std::shared_ptr< display_base_t > | display |
| Display capture backend that supplies source textures. | |
| DXGI_FORMAT | format |
| DXGI format required by the encoder input texture. | |
| std::map< uint32_t, encoder_img_ctx_t > | img_ctx_map |
| Encoder resources cached by captured image ID. | |
| render_target_t | out_UV_rtv |
| Out UV rtv. | |
| D3D11_VIEWPORT | out_UV_viewport |
| Out UV viewport. | |
| D3D11_VIEWPORT | out_UV_viewport_for_clear |
| Out UV viewport for clear. | |
| render_target_t | out_Y_or_YUV_rtv |
| Out y or YUV rtv. | |
| std::array< D3D11_VIEWPORT, 3 > | out_Y_or_YUV_viewports |
| Out y or YUV viewports. | |
| std::array< D3D11_VIEWPORT, 3 > | out_Y_or_YUV_viewports_for_clear |
| Out y or YUV viewports for clear. | |
| texture2d_t | output_texture |
| Output texture. | |
| bool | rtvs_cleared = false |
| Whether render-target views have been cleared for the frame. | |
| sampler_state_t | sampler_linear |
| Sampler linear. | |
| buf_t | subsample_offset |
| Subsample offset. | |
Shared D3D11 conversion resources for AVCodec and NVENC encode devices.
|
inline |
Apply the configured colorspace metadata to the active frame.
| colorspace | Colorimetry information used for conversion or encoding. |
|
inline |
Convert a captured D3D image into encoder input textures.
| img_base | D3D image supplied by the capture backend. |
|
inline |
Create black texture for rtv clear.
|
inline |
Initialize shared D3D conversion resources for the encoder.
| display | Display object or identifier associated with the operation. |
| adapter_p | Adapter p. |
| pix_fmt | Sunshine pixel format to convert or allocate for. |
|
inline |
Create D3D11 output textures, views, and shaders for frame conversion.
| frame_texture | Frame texture. |
| width | Frame or display width in pixels. |
| height | Frame or display height in pixels. |
|
inline |
Initialize encoder-side D3D resources for a captured image.
| img | Image or frame object to read from or populate. |
| img_ctx | Cached encoder resources associated with the image ID. |