diff options
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | src/egl.c | 6 | ||||
-rw-r--r-- | src/main.cpp | 3 |
3 files changed, 9 insertions, 3 deletions
@@ -133,3 +133,6 @@ Add 10-bit capture option. This is good because it reduces banding and quality i Enable b-frames. Support vfr matching games exact fps all the time. On x11 use damage tracking, on wayland? maybe there is drm plane damage tracking. But that may not be accurate as the compositor may update it every monitor hz anyways. On wayland maybe only support it for desktop portal + pipewire capture. + +Support selecting which gpu to use. This can be done in egl with eglQueryDevicesEXT and then eglGetPlatformDisplayEXT. This will automatically work on AMD and Intel as vaapi uses the same device. On nvidia we need to use eglQueryDeviceAttribEXT with EGL_CUDA_DEVICE_NV. + Maybe on glx (nvidia x11 nvfbc) we need to use __NV_PRIME_RENDER_OFFLOAD_PROVIDER and __GLX_VENDOR_LIBRARY_NAME instead.
\ No newline at end of file @@ -328,7 +328,7 @@ static bool gsr_egl_switch_to_glx_context(gsr_egl *self) { } static bool gsr_egl_load_egl(gsr_egl *self, void *library) { - dlsym_assign required_dlsym[] = { + const dlsym_assign required_dlsym[] = { { (void**)&self->eglGetError, "eglGetError" }, { (void**)&self->eglGetDisplay, "eglGetDisplay" }, { (void**)&self->eglInitialize, "eglInitialize" }, @@ -373,7 +373,7 @@ static bool gsr_egl_proc_load_egl(gsr_egl *self) { } static bool gsr_egl_load_glx(gsr_egl *self, void *library) { - dlsym_assign required_dlsym[] = { + const dlsym_assign required_dlsym[] = { { (void**)&self->glXGetProcAddress, "glXGetProcAddress" }, { (void**)&self->glXChooseFBConfig, "glXChooseFBConfig" }, { (void**)&self->glXMakeContextCurrent, "glXMakeContextCurrent" }, @@ -403,7 +403,7 @@ static bool gsr_egl_load_glx(gsr_egl *self, void *library) { } static bool gsr_egl_load_gl(gsr_egl *self, void *library) { - dlsym_assign required_dlsym[] = { + const dlsym_assign required_dlsym[] = { { (void**)&self->glGetError, "glGetError" }, { (void**)&self->glGetString, "glGetString" }, { (void**)&self->glFlush, "glFlush" }, diff --git a/src/main.cpp b/src/main.cpp index 71980cf..b91e68c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2527,6 +2527,9 @@ int main(int argc, char **argv) { #if LIBAVUTIL_VERSION_MAJOR <= 56 av_opt_set_channel_layout(swr, "in_channel_layout", AV_CH_LAYOUT_STEREO, 0); av_opt_set_channel_layout(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0); + #elif LIBAVUTIL_VERSION_MAJOR >= 59 + av_opt_set_chlayout(swr, "in_chlayout", &audio_track.codec_context->ch_layout, 0); + av_opt_set_chlayout(swr, "out_chlayout", &audio_track.codec_context->ch_layout, 0); #else av_opt_set_chlayout(swr, "in_channel_layout", &audio_track.codec_context->ch_layout, 0); av_opt_set_chlayout(swr, "out_channel_layout", &audio_track.codec_context->ch_layout, 0); |