mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Minor cleanup
This commit is contained in:
@@ -204,8 +204,7 @@ static unsigned int load_shader_uv(gsr_shader *shader, gsr_egl *egl, gsr_color_u
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int load_shader_rgb(gsr_shader *shader, gsr_egl *egl, gsr_color_uniforms *uniforms, gsr_destination_color color_format, gsr_color_range color_range, bool external_texture) {
|
static unsigned int load_shader_rgb(gsr_shader *shader, gsr_egl *egl, gsr_color_uniforms *uniforms, bool external_texture) {
|
||||||
// TODO: Support hdr
|
|
||||||
char vertex_shader[2048];
|
char vertex_shader[2048];
|
||||||
snprintf(vertex_shader, sizeof(vertex_shader),
|
snprintf(vertex_shader, sizeof(vertex_shader),
|
||||||
"#version 300 es \n"
|
"#version 300 es \n"
|
||||||
@@ -356,13 +355,13 @@ int gsr_color_conversion_init(gsr_color_conversion *self, const gsr_color_conver
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(load_shader_rgb(&self->shaders[0], self->params.egl, &self->uniforms[0], params->destination_color, params->color_range, false) != 0) {
|
if(load_shader_rgb(&self->shaders[0], self->params.egl, &self->uniforms[0], false) != 0) {
|
||||||
fprintf(stderr, "gsr error: gsr_color_conversion_init: failed to load Y shader\n");
|
fprintf(stderr, "gsr error: gsr_color_conversion_init: failed to load Y shader\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(self->params.load_external_image_shader) {
|
if(self->params.load_external_image_shader) {
|
||||||
if(load_shader_rgb(&self->shaders[EXTERNAL_TEXTURE_SHADER_OFFSET], self->params.egl, &self->uniforms[EXTERNAL_TEXTURE_SHADER_OFFSET], params->destination_color, params->color_range, true) != 0) {
|
if(load_shader_rgb(&self->shaders[EXTERNAL_TEXTURE_SHADER_OFFSET], self->params.egl, &self->uniforms[EXTERNAL_TEXTURE_SHADER_OFFSET], true) != 0) {
|
||||||
fprintf(stderr, "gsr error: gsr_color_conversion_init: failed to load Y shader\n");
|
fprintf(stderr, "gsr error: gsr_color_conversion_init: failed to load Y shader\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
/* This code is partially based on xr-video-player pipewire implementation which is based on obs-studio's pipewire implementation */
|
/* This code is partially based on xr-video-player pipewire implementation which is based on obs-studio's pipewire implementation */
|
||||||
|
|
||||||
/* TODO: Make gsr_pipewire_video_init asynchronous */
|
/* TODO: Make gsr_pipewire_video_init asynchronous */
|
||||||
/* TODO: Support 10-bit capture (hdr) when pipewire supports it */
|
/* TODO: Support hdr when pipewire supports it */
|
||||||
/* TODO: Test all of the image formats */
|
/* TODO: Test all of the image formats */
|
||||||
|
|
||||||
#ifndef SPA_POD_PROP_FLAG_DONT_FIXATE
|
#ifndef SPA_POD_PROP_FLAG_DONT_FIXATE
|
||||||
|
|||||||
Reference in New Issue
Block a user