From 62d61fda12e3774fee6b671e44fb89bd2ef8da8c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 4 Jul 2024 01:35:03 +0200 Subject: Add support for software video encoding with '-encoder cpu' option, currently h264 only --- src/capture/kms_cuda.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/capture/kms_cuda.c') diff --git a/src/capture/kms_cuda.c b/src/capture/kms_cuda.c index a9f1f8e..a35e263 100644 --- a/src/capture/kms_cuda.c +++ b/src/capture/kms_cuda.c @@ -85,7 +85,9 @@ static void gsr_capture_kms_unload_cuda_graphics(gsr_capture_kms_cuda *cap_kms) static int gsr_capture_kms_cuda_capture(gsr_capture *cap, AVFrame *frame) { gsr_capture_kms_cuda *cap_kms = cap->priv; + cap_kms->kms.base.egl->glClear(0); gsr_capture_kms_capture(&cap_kms->kms, frame, cap_kms->params.hdr, true, true, cap_kms->params.record_cursor); + cap_kms->kms.base.egl->eglSwapBuffers(cap_kms->kms.base.egl->egl_display, cap_kms->kms.base.egl->egl_surface); const int div[2] = {1, 2}; // divide UV texture size by 2 because chroma is half size for(int i = 0; i < 2; ++i) { -- cgit v1.2.3