X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=x264_encoder.h;h=455bb1e96e822282c3dfd41162f6fe0304b7ceda;hb=a315ebb10446bc372016bc0e9cd29d1aa3696eaa;hp=9b6f74d31eb017ee2cdc150ec50f3d524babb4bf;hpb=7c68022d2d22007e0a918f81db87278713659731;p=nageru diff --git a/x264_encoder.h b/x264_encoder.h index 9b6f74d..455bb1e 100644 --- a/x264_encoder.h +++ b/x264_encoder.h @@ -24,6 +24,7 @@ #include #include #include +#include extern "C" { #include @@ -32,6 +33,7 @@ extern "C" { #include #include "print_latency.h" +#include "x264_dynamic.h" class Mux; class X264SpeedControl; @@ -45,7 +47,7 @@ public: ~X264Encoder(); // Must be called before first frame. Does not take ownership. - void set_mux(Mux *mux) { this->mux = mux; } + void add_mux(Mux *mux) { muxes.push_back(mux); } // is taken to be raw NV12 data of WIDTHxHEIGHT resolution. // Does not block. @@ -78,7 +80,7 @@ private: // pool. std::unique_ptr frame_pool; - Mux *mux = nullptr; + std::vector muxes; bool wants_global_headers; std::string global_headers; @@ -87,6 +89,7 @@ private: std::thread encoder_thread; std::atomic x264_init_done{false}; std::atomic should_quit{false}; + X264Dynamic dyn; x264_t *x264; std::unique_ptr speed_control;