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