diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-07-05 18:57:06 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-07-05 18:57:06 +0200 |
commit | 48cd80f24ef24a41fd5d461e0e4356ecfd239bef (patch) | |
tree | 4ef4d8ea800b79d93f8e84a76067488d65edcc01 /src/encoder | |
parent | d53fcfcf6ef5a026c66f21b6b48e7420451f2a4d (diff) |
Add encoder option to systemd service file
Diffstat (limited to 'src/encoder')
-rw-r--r-- | src/encoder/video/software.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |