]> git.sesse.net Git - nageru/commitdiff
Run IWYU (plus lots of manual fiddling).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 4 Oct 2015 20:49:25 +0000 (22:49 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 4 Oct 2015 20:49:25 +0000 (22:49 +0200)
13 files changed:
bmusb.cpp
bmusb.h
context.cpp
glwidget.cpp
glwidget.h
h264encode.cpp
h264encode.h
main.cpp
mixer.cpp
mixer.h
pbo_frame_allocator.cpp
pbo_frame_allocator.h
window.cpp

index 207d632c4d637fe4ec711bab6f59d80b095bdece..65c3b1cafb3c15dcdc36b8fb70413a8827ec50a5 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -6,29 +6,31 @@
 // 576p60/720p60/1080i60 works, 1080p60 does not work (firmware limitation)
 // Audio comes out as 8-channel 24-bit raw audio.
 
+#include <assert.h>
+#include <errno.h>
+#include <libusb.h>
+#include <netinet/in.h>
+#include <sched.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <libusb.h>
-#include <arpa/inet.h>
-#include <unistd.h>
 #include <string.h>
-#include <fcntl.h>
-#include <stdint.h>
-#include <assert.h>
 #ifdef __SSE2__
 #include <immintrin.h>
 #endif
+#include "bmusb.h"
+
 #include <algorithm>
+#include <atomic>
+#include <condition_variable>
+#include <cstddef>
+#include <cstdint>
+#include <deque>
 #include <functional>
 #include <memory>
-#include <deque>
-#include <utility>
 #include <mutex>
-#include <condition_variable>
-#include <thread>
 #include <stack>
-#include <atomic>
-#include "bmusb.h"
+#include <thread>
 
 using namespace std;
 using namespace std::placeholders;
diff --git a/bmusb.h b/bmusb.h
index c8817480833a55657fc177cd5dd255a9c538ea59..301350f53be858fac1885f0821920bdbac600e2c 100644 (file)
--- a/bmusb.h
+++ b/bmusb.h
@@ -8,6 +8,9 @@
 #include <functional>
 #include <mutex>
 #include <thread>
+#include <vector>
+
+struct libusb_transfer;
 
 // An interface for frame allocators; if you do not specify one
 // (using set_video_frame_allocator), a default one that pre-allocates
index 946d40dc84ab1b0c5462311f6e4bdf1af3355f10..4ae85bdd95a7dc09f9abd4676d35fa078e894402 100644 (file)
@@ -1,10 +1,11 @@
 #include <stdio.h>
-#include <stdlib.h>
 
-#include <QOpenGLContext>
+#include <QGL>
 #include <QOffscreenSurface>
-#include <QWindow>
-#include <QGLWidget>
+#include <QOpenGLContext>
+#include <QSurfaceFormat>
+
+class QSurface;
 
 QGLWidget *global_share_widget = nullptr;
 
index 6e216a6700d88212a508fe457fb6e889a584c383..319592e5e89a99a98c7f6f27da7758866a4cc0b6 100644 (file)
@@ -1,21 +1,27 @@
-#include <qmetatype.h>
-#include <qdatastream.h>
-#include <qtextstream.h>
-#include <qcursor.h>
-#include <qcoreevent.h>
+#include <qmetatype.h>  // Needs to come before egl.h.
+#include <qdatastream.h>  // Needs to come before egl.h.
+#include <qtextstream.h>  // Needs to come before egl.h.
+#include <qcursor.h>  // Needs to come before egl.h.
+#include <qcoreevent.h>  // Needs to come before egl.h.
 #include <epoxy/gl.h>
 #include <epoxy/egl.h>
-#include "context.h"
+#include <QSurfaceFormat>
+
 #include "glwidget.h"
-#include "mixer.h"
-#include <QCoreApplication>
-#include <QGuiApplication>
-#include <QThread>
-#include <math.h>
-#include <thread>
+
 #include <movit/resource_pool.h>
+#include <stdio.h>
+
+#include "context.h"
+#include "mixer.h"
+#include "ref_counted_gl_sync.h"
+
+class QSurface;
+class QWidget;
+
 #undef Success
 #include <movit/util.h>
+#include <string>
 
 GLWidget::GLWidget(QWidget *parent)
     : QGLWidget(parent, global_share_widget),
index bb62940d6d5a16830db12797b837c956fd73b7cb..1f6b6e74f14fa12c7f20334a45864044edd5d7d3 100644 (file)
@@ -1,8 +1,11 @@
 #ifndef GLWIDGET_H
 #define GLWIDGET_H
 
+#include <epoxy/gl.h>
 #include <QGLWidget>
 
+class QWidget;
+
 namespace movit {
 class ResourcePool;
 }
index 83de3bd32c61ffe30687c234775db5299801b7c1..db0ba93588fc72f9061e491c694910bc0f4f3180 100644 (file)
@@ -1,28 +1,34 @@
 //#include "sysdeps.h"
+#include "h264encode.h"
+
+#include <EGL/eglplatform.h>
+#include <X11/X.h>
+#include <X11/Xlib.h>
+#include <assert.h>
+#include <epoxy/egl.h>
+#include <libavcodec/avcodec.h>
+#include <libavformat/avio.h>
+#include <libavutil/mathematics.h>
+#include <libavutil/rational.h>
+#include <libdrm/drm_fourcc.h>
+#include <stdint.h>
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
-#include <getopt.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-#include <assert.h>
-#include <pthread.h>
-#include <errno.h>
-#include <math.h>
+#include <string.h>
 #include <va/va.h>
-#include <va/va_x11.h>
-#include <va/va_enc_h264.h>
 #include <va/va_drmcommon.h>
-#include <libdrm/drm_fourcc.h>
-#include <thread>
+#include <va/va_enc_h264.h>
+#include <va/va_x11.h>
+#include <condition_variable>
 #include <mutex>
 #include <queue>
-#include <condition_variable>
-#include "h264encode.h"
+#include <string>
+#include <thread>
+
+#include "context.h"
+
+class QOpenGLContext;
+class QSurface;
 
 #define CHECK_VASTATUS(va_status, func)                                 \
     if (va_status != VA_STATUS_SUCCESS) {                               \
index b14ca6f4690643d6281be45c0dbd27e19b49f3a5..b9effa76d86eadcd0b466762196392d1d9adef05 100644 (file)
 extern "C" {
 #include <libavformat/avformat.h>
 }
-#include <epoxy/egl.h>
+#include <epoxy/gl.h>
 #include <atomic>
+#include <condition_variable>
 #include <map>
 #include <memory>
 #include <mutex>
+#include <queue>
 #include <thread>
-#include <condition_variable>
+#include <vector>
 
-#include "pbo_frame_allocator.h"
+#include "bmusb.h"
 #include "context.h"
+#include "pbo_frame_allocator.h"
 #include "ref_counted_gl_sync.h"
 
+class QSurface;
+
 #define SURFACE_NUM 16 /* 16 surfaces for source YUV */
 
 class H264Encoder {
index 97363950647619b61d7bca43512a8870d2ae4b02..f92b12e37735890b28110680d56b04d46d3de7d2 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -1,13 +1,15 @@
+#include <stdlib.h>
 #include <epoxy/gl.h>
+
 #include <QApplication>
-#include <QDesktopWidget>
+#include <QCoreApplication>
+#include <QGL>
+#include <QSize>
 #include <QSurfaceFormat>
-#include <QtGui/QOpenGLContext>
-#include <QGLFormat>
 
+#include "context.h"
 #include "mainwindow.h"
 #include "mixer.h"
-#include "context.h"
 
 int main(int argc, char *argv[])
 {
index 0c36c48f97e04d7b080cce543c0accdcb8598503..fec83ff1d90c05c8f5e908e2640a018dfec4fdef 100644 (file)
--- a/mixer.cpp
+++ b/mixer.cpp
@@ -5,54 +5,49 @@
 #define WIDTH 1280
 #define HEIGHT 720
 
-#include <epoxy/gl.h>
-#include <epoxy/egl.h>
-
 #undef Success
 
-#include <assert.h>
-#include <features.h>
-#include <math.h>
-#include <png.h>
-#include <pngconf.h>
-#include <setjmp.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
-#include <time.h>
-#include <mutex>
-#include <queue>
-#include <condition_variable>
+#include "mixer.h"
 
-#include <diffusion_effect.h>
+#include <assert.h>
 #include <effect.h>
 #include <effect_chain.h>
-#include <flat_input.h>
+#include <effect_util.h>
+#include <epoxy/egl.h>
+#include <features.h>
 #include <image_format.h>
 #include <init.h>
-#include <lift_gamma_gain_effect.h>
-#include <saturation_effect.h>
-#include <util.h>
-#include <ycbcr_input.h>
-#include <vignette_effect.h>
-#include <resample_effect.h>
-#include <resize_effect.h>
 #include <overlay_effect.h>
 #include <padding_effect.h>
+#include <resample_effect.h>
+#include <resource_pool.h>
+#include <saturation_effect.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <time.h>
+#include <util.h>
 #include <white_balance_effect.h>
 #include <ycbcr.h>
-#include <resource_pool.h>
-#include <effect_util.h>
-
-#include <EGL/egl.h>
+#include <ycbcr_input.h>
+#include <cmath>
+#include <condition_variable>
+#include <cstddef>
+#include <memory>
+#include <mutex>
+#include <string>
+#include <thread>
+#include <vector>
 
-#include "h264encode.h"
-#include "context.h"
 #include "bmusb.h"
+#include "context.h"
+#include "h264encode.h"
 #include "pbo_frame_allocator.h"
-#include "mixer.h"
 #include "ref_counted_gl_sync.h"
 
+class QOpenGLContext;
+
 using namespace movit;
 using namespace std;
 using namespace std::placeholders;
diff --git a/mixer.h b/mixer.h
index 2c6e51c7b51179fb6ed322ed696e24437522901f..70953bdd06124eb4819da26f6cf1b9e40e90c6f6 100644 (file)
--- a/mixer.h
+++ b/mixer.h
@@ -1,9 +1,13 @@
 #ifndef _MIXER_H
 #define _MIXER_H 1
 
+#include <epoxy/gl.h>
+#include <functional>
+
 #include "ref_counted_gl_sync.h"
 
 class QSurface;
+
 void start_mixer(QSurface *surface, QSurface *surface2, QSurface *surface3, QSurface *surface4);
 void mixer_quit();
 
index 59013bf5e385528f6c79b07afd1a140c0f07b555..1018403c88da24c0128db4ac919d5e5c5b71f3d0 100644 (file)
@@ -1,4 +1,9 @@
 #include "pbo_frame_allocator.h"
+
+#include <stdint.h>
+#include <stdio.h>
+#include <cstddef>
+
 #include "util.h"
 
 using namespace std;
index 1155d20c1559abbd314585404e1af62dabe52d98..825d01f5034429db4a0f8a1baa2e67a31f3f3cbe 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef _PBO_FRAME_ALLOCATOR 
 #define _PBO_FRAME_ALLOCATOR 1
 
+#include <epoxy/gl.h>
 #include <mutex>
 #include <queue>
-#include <epoxy/gl.h>
 
 #include "bmusb.h"
 
index b8eced73171be32e5af8847b9685626d4b95cd91..6c67f78649aa721c64efa5fc58b165dc4c16c438 100644 (file)
@@ -1,8 +1,9 @@
-#include "glwidget.h"
 #include "window.h"
-#include "mainwindow.h"
-#include <QApplication>
+
 #include <QBoxLayout>
+#include <QString>
+
+#include "glwidget.h"
 
 Window::Window(MainWindow *mw)
        : main_window(mw)