2 #include <libavformat/avformat.h>
9 #include <QApplication>
10 #include <QCoreApplication>
13 #include <QSurfaceFormat>
17 #include "mainwindow.h"
20 int main(int argc, char *argv[])
22 parse_flags(argc, argv);
24 if (global_flags.va_display.empty() ||
25 global_flags.va_display[0] != '/') {
26 // We normally use EGL for zerocopy, but if we use VA against DRM
27 // instead of against X11, we turn it off, and then don't need EGL.
28 setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0);
33 QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
34 QApplication app(argc, argv);
37 fmt.setDepthBufferSize(0);
38 fmt.setStencilBufferSize(0);
39 fmt.setProfile(QSurfaceFormat::CoreProfile);
40 fmt.setMajorVersion(3);
41 fmt.setMinorVersion(1);
42 QSurfaceFormat::setDefaultFormat(fmt);
44 QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt));
46 global_share_widget = new QGLWidget();
48 MainWindow mainWindow;
49 mainWindow.resize(QSize(1500, 810));
52 app.installEventFilter(&mainWindow); // For white balance color picking.
56 mainWindow.mixer_shutting_down();