X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=main.cpp;h=f28b859fd842bdc501d238eccc743bf6667b5545;hb=835e7727e1d05190d550061cb8fc8cb2daa2283b;hp=9ea610f04d59c8d7dd1a8f98feb246a519a4dfd5;hpb=bbf08db0aecea0a021b07def18bf41dee2724898;p=nageru diff --git a/main.cpp b/main.cpp index 9ea610f..f28b859 100644 --- a/main.cpp +++ b/main.cpp @@ -1,14 +1,28 @@ +extern "C" { +#include +} +#include +#include +#include +#include + #include -#include +#include +#include +#include #include -#include +#include "context.h" +#include "flags.h" #include "mainwindow.h" #include "mixer.h" int main(int argc, char *argv[]) { setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0); + setlinebuf(stdout); + av_register_all(); + parse_flags(argc, argv); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); QApplication app(argc, argv); @@ -21,11 +35,19 @@ int main(int argc, char *argv[]) fmt.setMinorVersion(1); QSurfaceFormat::setDefaultFormat(fmt); + QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt)); + + global_share_widget = new QGLWidget(); + MainWindow mainWindow; - mainWindow.resize(QSize(1280, 720)); + mainWindow.resize(QSize(1500, 810)); mainWindow.show(); + app.installEventFilter(&mainWindow); // For white balance color picking. + int rc = app.exec(); - mixer_quit(); + global_mixer->quit(); + mainWindow.mixer_shutting_down(); + delete global_mixer; return rc; }