diff options
| author | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2026-08-10 10:38:14 +0500 |
|---|---|---|
| committer | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2026-08-10 10:38:14 +0500 |
| commit | 6dc1149d078fc3b04a19696bfb7d5d6940372175 (patch) | |
| tree | 169f7f71e6a292a4ab61a0493000e1add4430f8e /src/image_writer.c | |
| parent | 6836426ae183b9a7d0ec99c1e147e8ad6edabd92 (diff) | |
| parent | 80517840f4ae64469721598e8373d81f2e4493dd (diff) | |
Merge tag '6.0.0' of https://repo.dec05eba.com/gpu-screen-recorder into debian
Diffstat (limited to 'src/image_writer.c')
| -rw-r--r-- | src/image_writer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/image_writer.c b/src/image_writer.c index adc88a7..117c8b8 100644 --- a/src/image_writer.c +++ b/src/image_writer.c @@ -1,4 +1,5 @@ #include "../include/image_writer.h" +#include "../include/log.h" #include "../include/egl.h" #include "../include/utils.h" @@ -8,7 +9,6 @@ #include <stdlib.h> #include <stdint.h> #include <stdio.h> -#include <assert.h> #include <dlfcn.h> #define TJPF_RGBA 7 @@ -83,7 +83,7 @@ bool gsr_image_writer_init_opengl(gsr_image_writer *self, gsr_egl *egl, int widt self->height = height; self->texture = gl_create_texture(self->egl, self->width, self->height, GL_RGBA8, GL_RGBA, GL_NEAREST); /* TODO: use GL_RGB16 instead of GL_RGB8 for hdr/10-bit */ if(self->texture == 0) { - fprintf(stderr, "gsr error: gsr_image_writer_init: failed to create texture\n"); + gsr_log(GSR_LOG_LEVEL_ERROR, "gsr_image_writer_init: failed to create texture"); return false; } @@ -128,7 +128,7 @@ static bool gsr_image_writer_write_memory_to_file(gsr_image_writer *self, const } if(!success) - fprintf(stderr, "gsr error: gsr_image_writer_write_to_file: failed to write image data to output file %s\n", filepath); + gsr_log(GSR_LOG_LEVEL_ERROR, "gsr_image_writer_write_to_file: failed to write image data to output file %s", filepath); return success; } @@ -136,7 +136,7 @@ static bool gsr_image_writer_write_memory_to_file(gsr_image_writer *self, const static bool gsr_image_writer_write_opengl_texture_to_file(gsr_image_writer *self, const char *filepath, gsr_image_format image_format, int quality) { uint8_t *frame_data = malloc(self->width * self->height * 4); if(!frame_data) { - fprintf(stderr, "gsr error: gsr_image_writer_write_to_file: failed to allocate memory for image frame\n"); + gsr_log(GSR_LOG_LEVEL_ERROR, "gsr_image_writer_write_to_file: failed to allocate memory for image frame"); return false; } |
