X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=x264_encoder.h;h=687bf718679c316a3b2e6a24a41c8e449d79c776;hb=4a0187ffb4075b4d217b8d9e9c96cac548b199d8;hp=455bb1e96e822282c3dfd41162f6fe0304b7ceda;hpb=0556d8cb8416bdc7b432a432c3d58239a94358d2;p=nageru diff --git a/x264_encoder.h b/x264_encoder.h index 455bb1e..687bf71 100644 --- a/x264_encoder.h +++ b/x264_encoder.h @@ -32,6 +32,8 @@ extern "C" { #include +#include "defs.h" +#include "metrics.h" #include "print_latency.h" #include "x264_dynamic.h" @@ -75,6 +77,9 @@ private: void init_x264(); void encode_frame(QueuedFrame qf); + // bitrate_kbit can be 0 for no change. + static void speed_control_override_func(unsigned bitrate_kbit, movit::YCbCrLumaCoefficients coefficients, x264_param_t *param); + // One big memory chunk of all 50 (or whatever) frames, allocated in // the constructor. All data functions just use pointers into this // pool. @@ -93,8 +98,6 @@ private: x264_t *x264; std::unique_ptr speed_control; - std::function bitrate_override_func; - std::atomic new_bitrate_kbit{0}; // 0 for no change. // Protects everything below it.