X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=h264encode.h;h=b9effa76d86eadcd0b466762196392d1d9adef05;hb=c76392ca2e019399e6123a7ba0849090a3f7a4ce;hp=f355116781cadde6f06c25d5a7c2b8a35b17870d;hpb=e18d9bad93d5bf766d52d0cb66db4c3d3f8a711b;p=nageru diff --git a/h264encode.h b/h264encode.h index f355116..b9effa7 100644 --- a/h264encode.h +++ b/h264encode.h @@ -29,19 +29,22 @@ extern "C" { #include } -#include +#include #include +#include #include #include #include +#include #include -#include -#include -#include -#include +#include -#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); + void end_frame(RefCountedGLsync fence, const std::vector &input_frames_to_release); private: struct storage_task { @@ -92,10 +95,12 @@ private: //int frame_width, frame_height; //int ; int current_storage_frame; -#if 0 - std::map> pending_frames; -#endif - std::map pending_frames; + + struct PendingFrame { + RefCountedGLsync fence; + std::vector input_frames_to_release; + }; + std::map pending_frames; QSurface *surface; AVFormatContext *avctx;