X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=h264encode.h;h=ec49fb71dde19f801b5a4f95f106c1cdc8089a04;hb=02083dca89292d6ba95642cf8957f1cee8826313;hp=581131968a461edcb0cb11124232bcf6797fc638;hpb=3ed9b0fbb73071284aa7fa221ce0373d2dadbc85;p=nageru diff --git a/h264encode.h b/h264encode.h index 5811319..ec49fb7 100644 --- a/h264encode.h +++ b/h264encode.h @@ -39,7 +39,7 @@ extern "C" { #include #include -#include "bmusb.h" +#include "bmusb/bmusb.h" #include "context.h" #include "pbo_frame_allocator.h" #include "ref_counted_frame.h" @@ -66,8 +66,9 @@ public: }; void #endif + void add_audio(int64_t pts, std::vector audio); // Needs to come before end_frame() of same pts. bool begin_frame(GLuint *y_tex, GLuint *cbcr_tex); - void end_frame(RefCountedGLsync fence, std::vector audio, const std::vector &input_frames); + void end_frame(RefCountedGLsync fence, int64_t pts, const std::vector &input_frames); private: struct storage_task { @@ -101,9 +102,10 @@ private: struct PendingFrame { RefCountedGLsync fence; std::vector input_frames; - std::vector audio; }; - std::map pending_frames; + std::map pending_video_frames; // under frame_queue_mutex + std::map> pending_audio_frames; // under frame_queue_mutex + std::map timestamps; // under frame_queue_mutex QSurface *surface; AVFormatContext *avctx;