X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=main.cpp;h=f28b859fd842bdc501d238eccc743bf6667b5545;hb=b2766e96ceadecdec2eafc85e2cec55c9fd27a34;hp=34a1c497a48497c39580ae8cb24b5bd910eb78fc;hpb=e18d9bad93d5bf766d52d0cb66db4c3d3f8a711b;p=nageru diff --git a/main.cpp b/main.cpp index 34a1c49..f28b859 100644 --- a/main.cpp +++ b/main.cpp @@ -1,13 +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); @@ -20,9 +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(mainWindow.sizeHint()); + mainWindow.resize(QSize(1500, 810)); mainWindow.show(); - return app.exec(); + app.installEventFilter(&mainWindow); // For white balance color picking. + + int rc = app.exec(); + global_mixer->quit(); + mainWindow.mixer_shutting_down(); + delete global_mixer; + return rc; }