]> git.sesse.net Git - nageru/blobdiff - h264encode.h
Add a way to get the current video mode.
[nageru] / h264encode.h
index caf33af0c8de3d2c72af8e56dcf8d57f60ef3eb0..0d70524e76d5a73d01977e1852a434a59280e947 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdint.h>
 #include <atomic>
 #include <memory>
+#include <string>
 #include <vector>
 
 #include "ref_counted_frame.h"
@@ -44,12 +45,13 @@ class QSurface;
 // .cpp file.
 class H264Encoder {
 public:
-        H264Encoder(QSurface *surface, int width, int height, HTTPD *httpd);
+        H264Encoder(QSurface *surface, const std::string &va_display, int width, int height, HTTPD *httpd);
         ~H264Encoder();
 
-       void add_audio(int64_t pts, std::vector<float> audio);  // Needs to come before end_frame() of same pts.
+       void add_audio(int64_t pts, std::vector<float> audio);
        bool begin_frame(GLuint *y_tex, GLuint *cbcr_tex);
        void end_frame(RefCountedGLsync fence, int64_t pts, const std::vector<RefCountedFrame> &input_frames);
+       void shutdown();  // Blocking.
 
 private:
        std::unique_ptr<H264EncoderImpl> impl;