From 48cd80f24ef24a41fd5d461e0e4356ecfd239bef Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 5 Jul 2024 18:57:06 +0200 Subject: Add encoder option to systemd service file --- src/encoder/video/software.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/encoder/video/software.c') diff --git a/src/encoder/video/software.c b/src/encoder/video/software.c index 4666ffd..f3b311e 100644 --- a/src/encoder/video/software.c +++ b/src/encoder/video/software.c @@ -90,6 +90,8 @@ static void gsr_video_encoder_software_copy_textures_to_frame(gsr_video_encoder const unsigned int formats[2] = { GL_RED, GL_RG }; for(int i = 0; i < 2; ++i) { encoder_software->params.egl->glBindTexture(GL_TEXTURE_2D, encoder_software->target_textures[i]); + // We could use glGetTexSubImage and then we wouldn't have to use a specific linesize (LINESIZE_ALIGNMENT) that adds padding, + // but glGetTexSubImage is only available starting from opengl 4.5. encoder_software->params.egl->glGetTexImage(GL_TEXTURE_2D, 0, formats[i], GL_UNSIGNED_BYTE, frame->data[i]); } encoder_software->params.egl->glBindTexture(GL_TEXTURE_2D, 0); -- cgit v1.2.3