]> git.sesse.net Git - nageru/blobdiff - nageru/main.cpp
Support SRT inputs.
[nageru] / nageru / main.cpp
index 351662039d2cd8e1790129f5d2d5e0282de76982..212c0691211a58d1e30dd816eed595dc3409c466 100644 (file)
@@ -20,6 +20,10 @@ extern "C" {
 #include <cef_version.h>
 #endif
 
+#ifdef HAVE_SRT
+#include <srt/srt.h>
+#endif
+
 #include "basic_stats.h"
 #ifdef HAVE_CEF
 #include "nageru_cef_app.h"
@@ -74,6 +78,12 @@ int main(int argc, char *argv[])
        av_register_all();
 #endif
 
+#ifdef HAVE_SRT
+       if (global_flags.srt_port >= 0) {
+               srt_startup();
+       }
+#endif
+
        QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
 
        QSurfaceFormat fmt;
@@ -120,5 +130,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;
 }