Implement NVENC support for KMS and wlgrab capture methods

This commit is contained in:
Cameron Gutman
2024-01-27 17:16:17 -06:00
parent 9a3553db04
commit 8182f592e8
6 changed files with 391 additions and 6 deletions

View File

@@ -27,6 +27,18 @@ namespace cuda {
}
std::unique_ptr<platf::avcodec_encode_device_t>
make_avcodec_encode_device(int width, int height, bool vram);
/**
* @brief Create a GL->CUDA encoding device for consuming captured dmabufs.
* @param in_width Width of captured frames.
* @param in_height Height of captured frames.
* @param offset_x Offset of content in captured frame.
* @param offset_y Offset of content in captured frame.
* @return FFmpeg encoding device context.
*/
std::unique_ptr<platf::avcodec_encode_device_t>
make_avcodec_gl_encode_device(int width, int height, int offset_x, int offset_y);
int
init();
} // namespace cuda