![]() |
Sunshine latest
Self-hosted game stream host for Moonlight.
|
Definitions for CUDA encoding. More...
#include <bitset>#include <fcntl.h>#include <filesystem>#include <thread>#include <ffnvcodec/dynlink_loader.h>#include <NvFBC.h>#include <libavcodec/avcodec.h>#include <libavutil/hwcontext_cuda.h>#include <libavutil/imgutils.h>#include "cuda.h"#include "graphics.h"#include "src/logging.h"#include "src/utility.h"#include "src/video.h"#include "wayland.h"Classes | |
| class | cuda::nvfbc::ctx_t |
| class | cuda::cuda_ram_t |
| class | cuda::cuda_t |
| class | cuda::cuda_vram_t |
| class | cuda::nvfbc::display_t |
| class | cuda::gl_cuda_vram_t |
| class | cuda::nvfbc::handle_t |
| class | cuda::img_t |
Macros | |
| #define | CU_CHECK(x, y) |
| #define | CU_CHECK_IGNORE(x, y) |
| #define | SUNSHINE_STRINGVIEW(x) |
| #define | SUNSHINE_STRINGVIEW_HELPER(x) |
Typedefs | |
| using | cuda::cdf_t = util::safe_ptr<CudaFunctions, cff> |
| using | cuda::registered_resource_t = util::safe_ptr<CUgraphicsResource_st, unregisterResource> |
Functions | |
| void | cuda::cff (CudaFunctions *cf) |
| void | cuda::freeStream (CUstream stream) |
| int | cuda::init () |
| int | cuda::nvfbc::init () |
| std::unique_ptr< platf::avcodec_encode_device_t > | cuda::make_avcodec_encode_device (int width, int height, bool vram) |
| std::unique_ptr< platf::avcodec_encode_device_t > | cuda::make_avcodec_gl_encode_device (int width, int height, int offset_x, int offset_y) |
| Create a GL->CUDA encoding device for consuming captured dmabufs. | |
| std::shared_ptr< display_t > | platf::nvfbc_display (mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config) |
| std::vector< std::string > | platf::nvfbc_display_names () |
| file_t | cuda::open_drm_fd_for_cuda_device (int index) |
| Opens the DRM device associated with the CUDA device index. | |
| void | cuda::pass_error (const std::string_view &sv, const char *name, const char *description) |
| void | cuda::unregisterResource (CUgraphicsResource resource) |
Variables | |
| constexpr auto | cuda::cudaDevAttrMaxThreadsPerBlock = (CUdevice_attribute) 1 |
| constexpr auto | cuda::cudaDevAttrMaxThreadsPerMultiProcessor = (CUdevice_attribute) 39 |
Definitions for CUDA encoding.
| #define CU_CHECK | ( | x, | |
| y ) |
| #define CU_CHECK_IGNORE | ( | x, | |
| y ) |
| #define SUNSHINE_STRINGVIEW | ( | x | ) |
| #define SUNSHINE_STRINGVIEW_HELPER | ( | x | ) |
| std::unique_ptr< platf::avcodec_encode_device_t > cuda::make_avcodec_gl_encode_device | ( | int | width, |
| int | height, | ||
| int | offset_x, | ||
| int | offset_y ) |
Create a GL->CUDA encoding device for consuming captured dmabufs.
| width | Width of captured frames. |
| height | Height of captured frames. |
| offset_x | Offset of content in captured frame. |
| offset_y | Offset of content in captured frame. |
| file_t cuda::open_drm_fd_for_cuda_device | ( | int | index | ) |
Opens the DRM device associated with the CUDA device index.
| index | CUDA device index to open. |