]> git.sesse.net Git - nageru/blobdiff - quicksync_encoder_impl.h
Make the API for begin_frame()/end_frame() in VideoEncoder a bit more sensible.
[nageru] / quicksync_encoder_impl.h
index 453a7f6628450f70a07f7429d043f9e1ddce079e..b55edbbc58c6586ff8645fe3b0fbdd08844212f4 100644 (file)
@@ -35,8 +35,8 @@ public:
        QuickSyncEncoderImpl(const std::string &filename, movit::ResourcePool *resource_pool, QSurface *surface, const std::string &va_display, int width, int height, AVOutputFormat *oformat, X264Encoder *x264_encoder, DiskSpaceEstimator *disk_space_estimator);
        ~QuickSyncEncoderImpl();
        void add_audio(int64_t pts, std::vector<float> audio);
-       bool begin_frame(GLuint *y_tex, GLuint *cbcr_tex);
-       RefCountedGLsync end_frame(int64_t pts, int64_t duration, const std::vector<RefCountedFrame> &input_frames);
+       bool begin_frame(int64_t pts, int64_t duration, const std::vector<RefCountedFrame> &input_frames, GLuint *y_tex, GLuint *cbcr_tex);
+       RefCountedGLsync end_frame();
        void shutdown();
        void release_gl_resources();
        void set_stream_mux(Mux *mux)
@@ -146,6 +146,7 @@ private:
 
        int current_storage_frame;
 
+       PendingFrame current_video_frame;  // Used only between begin_frame() and end_frame().
        std::queue<PendingFrame> pending_video_frames;  // under frame_queue_mutex
        movit::ResourcePool *resource_pool;
        QSurface *surface;