]> git.sesse.net Git - nageru/blobdiff - h264encode.h
Fix edge clamping behavior with out self-allocated textures.
[nageru] / h264encode.h
index 5409d17421c3fb8b047c94911908c2243864d7f4..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 <thread>
-#include <thread>
-#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 */
 
@@ -63,7 +66,7 @@ public:
        void 
 #endif
        bool begin_frame(GLuint *y_tex, GLuint *cbcr_tex);
-       void end_frame(GLsync fence, const std::vector<FrameAllocator::Frame> &input_frames_to_release);
+       void end_frame(RefCountedGLsync fence, const std::vector<FrameAllocator::Frame> &input_frames_to_release);
 
 private:
        struct storage_task {
@@ -94,7 +97,7 @@ private:
        int current_storage_frame;
 
        struct PendingFrame {
-               GLsync fence;
+               RefCountedGLsync fence;
                std::vector<FrameAllocator::Frame> input_frames_to_release;
        };
        std::map<int, PendingFrame> pending_frames;