]> git.sesse.net Git - nageru/blobdiff - h264encode.h
Rework entire pts handling.
[nageru] / h264encode.h
index 1eb09b4ffe5e9ed41f144aa9540c9331e2accaf6..ec49fb71dde19f801b5a4f95f106c1cdc8089a04 100644 (file)
@@ -66,8 +66,9 @@ public:
        };
        void 
 #endif
+       void add_audio(int64_t pts, std::vector<float> audio);  // Needs to come before end_frame() of same pts.
        bool begin_frame(GLuint *y_tex, GLuint *cbcr_tex);
-       void end_frame(RefCountedGLsync fence, int64_t pts, std::vector<float> audio, const std::vector<RefCountedFrame> &input_frames);
+       void end_frame(RefCountedGLsync fence, int64_t pts, const std::vector<RefCountedFrame> &input_frames);
 
 private:
        struct storage_task {
@@ -103,7 +104,7 @@ private:
                std::vector<RefCountedFrame> input_frames;
        };
        std::map<int, PendingFrame> pending_video_frames;  // under frame_queue_mutex
-       std::map<int, std::vector<float>> pending_audio_frames;  // under frame_queue_mutex
+       std::map<int64_t, std::vector<float>> pending_audio_frames;  // under frame_queue_mutex
        std::map<int, int64_t> timestamps;  // under frame_queue_mutex
        QSurface *surface;