|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Definitions for handling video ram. More...
#include <cmath>#include <d3dcompiler.h>#include <DirectXMath.h>#include <libavcodec/avcodec.h>#include <libavutil/hwcontext_d3d11va.h>#include <AMF/core/Factory.h>#include <boost/algorithm/string/predicate.hpp>#include "display.h"#include "misc.h"#include "src/config.h"#include "src/logging.h"#include "src/nvenc/nvenc_config.h"#include "src/nvenc/nvenc_d3d11_native.h"#include "src/nvenc/nvenc_d3d11_on_cuda.h"#include "src/nvenc/nvenc_utils.h"#include "src/video.h"#include "utf_utils.h"Classes | |
| class | platf::dxgi::d3d_avcodec_encode_device_t |
| D3D11 encode device that exposes captured textures to FFmpeg AVCodec. More... | |
| class | platf::dxgi::d3d_base_encode_device |
| Shared D3D11 conversion resources for AVCodec and NVENC encode devices. More... | |
| class | platf::dxgi::d3d_nvenc_encode_device_t |
| D3D11 encode device that exposes captured textures to NVENC. More... | |
| struct | platf::dxgi::d3d_base_encode_device::encoder_img_ctx_t |
| D3D texture and format information for encoder input. More... | |
| struct | platf::dxgi::img_d3d_t |
| D3D-backed captured image and duplication metadata. More... | |
| struct | platf::dxgi::texture_lock_helper |
| Keyed-mutex guard used while sharing a D3D texture. More... | |
Macros | |
| #define | SUNSHINE_SHADERS_DIR SUNSHINE_ASSETS_DIR "/shaders/directx" |
| Macro for SUNSHINE SHADERS DIR. | |
Typedefs | |
| using | frame_t = util::safe_ptr<AVFrame, free_frame> |
FFmpeg hardware frame pointer released with av_frame_free. | |
Functions | |
| blob_t | platf::dxgi::compile_pixel_shader (LPCSTR file) |
| Compile an HLSL pixel shader from source text. | |
| blob_t | platf::dxgi::compile_shader (LPCSTR file, LPCSTR entrypoint, LPCSTR shader_model) |
| Compile an HLSL shader from source text. | |
| blob_t | platf::dxgi::compile_vertex_shader (LPCSTR file) |
| Compile an HLSL vertex shader from source text. | |
| int | platf::dxgi::init () |
| Initialize the Windows audio-control backend. | |
| blend_t | platf::dxgi::make_blend (device_t::pointer device, bool enable, bool invert) |
| Create a blend object or message. | |
| template<class T > | |
| buf_t | platf::dxgi::make_buffer (device_t::pointer device, const T &t) |
| Create a buffer object or message. | |
| util::buffer_t< std::uint8_t > | platf::dxgi::make_cursor_alpha_image (const util::buffer_t< std::uint8_t > &img_data, DXGI_OUTDUPL_POINTER_SHAPE_INFO shape_info) |
| Create cursor alpha image. | |
| util::buffer_t< std::uint8_t > | platf::dxgi::make_cursor_xor_image (const util::buffer_t< std::uint8_t > &img_data, DXGI_OUTDUPL_POINTER_SHAPE_INFO shape_info) |
| Create cursor xor image. | |
| bool | platf::dxgi::set_cursor_texture (device_t::pointer device, gpu_cursor_t &cursor, util::buffer_t< std::uint8_t > &&cursor_img, DXGI_OUTDUPL_POINTER_SHAPE_INFO &shape_info) |
| Set cursor texture. | |
Variables | |
| blob_t | platf::dxgi::convert_yuv420_packed_uv_type0_ps_hlsl |
| Convert yuv420 packed uv type0 ps hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_packed_uv_type0_ps_linear_hlsl |
| Convert yuv420 packed uv type0 ps linear hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_packed_uv_type0_ps_perceptual_quantizer_hlsl |
| Convert yuv420 packed uv type0 ps perceptual quantizer hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_packed_uv_type0_vs_hlsl |
| Convert yuv420 packed uv type0 vs hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_packed_uv_type0s_ps_hlsl |
| Convert yuv420 packed uv type0s ps hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_packed_uv_type0s_ps_linear_hlsl |
| Convert yuv420 packed uv type0s ps linear hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_packed_uv_type0s_ps_perceptual_quantizer_hlsl |
| Convert yuv420 packed uv type0s ps perceptual quantizer hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_packed_uv_type0s_vs_hlsl |
| Convert yuv420 packed uv type0s vs hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_planar_y_ps_hlsl |
| Convert yuv420 planar y ps hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_planar_y_ps_linear_hlsl |
| Convert yuv420 planar y ps linear hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_planar_y_ps_perceptual_quantizer_hlsl |
| Convert yuv420 planar y ps perceptual quantizer hlsl. | |
| blob_t | platf::dxgi::convert_yuv420_planar_y_vs_hlsl |
| Convert yuv420 planar y vs hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_packed_ayuv_ps_hlsl |
| Convert YUV444 packed ayuv ps hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_packed_ayuv_ps_linear_hlsl |
| Convert YUV444 packed ayuv ps linear hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_packed_vs_hlsl |
| Convert YUV444 packed vs hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_packed_y410_ps_hlsl |
| Convert YUV444 packed y410 ps hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_packed_y410_ps_linear_hlsl |
| Convert YUV444 packed y410 ps linear hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_packed_y410_ps_perceptual_quantizer_hlsl |
| Convert YUV444 packed y410 ps perceptual quantizer hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_planar_ps_hlsl |
| Convert YUV444 planar ps hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_planar_ps_linear_hlsl |
| Convert YUV444 planar ps linear hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_planar_ps_perceptual_quantizer_hlsl |
| Convert YUV444 planar ps perceptual quantizer hlsl. | |
| blob_t | platf::dxgi::convert_yuv444_planar_vs_hlsl |
| Convert YUV444 planar vs hlsl. | |
| blob_t | platf::dxgi::cursor_ps_hlsl |
| Cursor ps hlsl. | |
| blob_t | platf::dxgi::cursor_ps_normalize_white_hlsl |
| Cursor ps normalize white hlsl. | |
| blob_t | platf::dxgi::cursor_vs_hlsl |
| Cursor vs hlsl. | |
Definitions for handling video ram.
| blob_t platf::dxgi::compile_pixel_shader | ( | LPCSTR | file | ) |
Compile an HLSL pixel shader from source text.
| file | Optional stdio file handle connected to the child process. |
| blob_t platf::dxgi::compile_shader | ( | LPCSTR | file, |
| LPCSTR | entrypoint, | ||
| LPCSTR | shader_model ) |
Compile an HLSL shader from source text.
| file | Optional stdio file handle connected to the child process. |
| entrypoint | Function entry point to resolve from the library. |
| shader_model | Shader model. |
| blob_t platf::dxgi::compile_vertex_shader | ( | LPCSTR | file | ) |
Compile an HLSL vertex shader from source text.
| file | Optional stdio file handle connected to the child process. |
| int platf::dxgi::init | ( | ) |
Initialize the Windows audio-control backend.
Initialize global D3D11 desktop duplication support.
| blend_t platf::dxgi::make_blend | ( | device_t::pointer | device, |
| bool | enable, | ||
| bool | invert ) |
Create a blend object or message.
| device | D3D, audio, or platform device used by the operation. |
| enable | Whether the blend state should enable blending. |
| invert | Whether the blend state should invert the color channels. |
| buf_t platf::dxgi::make_buffer | ( | device_t::pointer | device, |
| const T & | t ) |
Create a buffer object or message.
| device | D3D, audio, or platform device used by the operation. |
| t | Initial value used to populate the GPU buffer. |
| util::buffer_t< std::uint8_t > platf::dxgi::make_cursor_alpha_image | ( | const util::buffer_t< std::uint8_t > & | img_data, |
| DXGI_OUTDUPL_POINTER_SHAPE_INFO | shape_info ) |
Create cursor alpha image.
| img_data | Raw pointer-shape bytes returned by DXGI. |
| shape_info | DXGI metadata describing the pointer shape. |
| util::buffer_t< std::uint8_t > platf::dxgi::make_cursor_xor_image | ( | const util::buffer_t< std::uint8_t > & | img_data, |
| DXGI_OUTDUPL_POINTER_SHAPE_INFO | shape_info ) |
Create cursor xor image.
| img_data | Raw pointer-shape bytes returned by DXGI. |
| shape_info | DXGI metadata describing the pointer shape. |
| bool platf::dxgi::set_cursor_texture | ( | device_t::pointer | device, |
| gpu_cursor_t & | cursor, | ||
| util::buffer_t< std::uint8_t > && | cursor_img, | ||
| DXGI_OUTDUPL_POINTER_SHAPE_INFO & | shape_info ) |
Set cursor texture.
| device | D3D, audio, or platform device used by the operation. |
| cursor | Cursor image or visibility state to composite. |
| cursor_img | Cursor img. |
| shape_info | Shape info. |