X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=main.cpp;h=b7679f90fb856255fbda9d3c4d8a1f7ef7deb0e9;hb=1f2209f81fc8867ce4825cbea8697ec0457a338e;hp=34a1c497a48497c39580ae8cb24b5bd910eb78fc;hpb=e18d9bad93d5bf766d52d0cb66db4c3d3f8a711b;p=nageru diff --git a/main.cpp b/main.cpp index 34a1c49..b7679f9 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,18 @@ 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(); + delete global_mixer; + return rc; }