X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fmain.cpp;h=9b26426fb0a9e2e81111d9f62260df95b791b500;hb=23cf3b5264ae9fe8471b9fa281e55d544c2e9f3b;hp=351662039d2cd8e1790129f5d2d5e0282de76982;hpb=533f00a9b992d06767737f9db236b4cf76b9c124;p=nageru diff --git a/nageru/main.cpp b/nageru/main.cpp index 3516620..9b26426 100644 --- a/nageru/main.cpp +++ b/nageru/main.cpp @@ -20,6 +20,10 @@ extern "C" { #include #endif +#ifdef HAVE_SRT +#include +#endif + #include "basic_stats.h" #ifdef HAVE_CEF #include "nageru_cef_app.h" @@ -63,6 +67,9 @@ int main(int argc, char *argv[]) global_flags.va_display = QuickSyncEncoder::get_usable_va_display(); } + // The OpenGL widgets do not work well with the native Wayland integration. + setenv("QT_QPA_PLATFORM", "xcb", 0); + if ((global_flags.va_display.empty() || global_flags.va_display[0] != '/') && !global_flags.x264_video_to_disk) { // We normally use EGL for zerocopy, but if we use VA against DRM @@ -74,6 +81,12 @@ int main(int argc, char *argv[]) av_register_all(); #endif +#ifdef HAVE_SRT + if (global_flags.srt_port >= 0 || !global_flags.srt_destination_host.empty()) { + srt_startup(); + } +#endif + QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QSurfaceFormat fmt; @@ -120,5 +133,10 @@ int main(int argc, char *argv[]) int rc = app.exec(); delete global_mixer; +#ifdef HAVE_SRT + if (global_flags.srt_port >= 0) { + srt_cleanup(); + } +#endif return rc; }