X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=x264_encoder.h;h=687bf718679c316a3b2e6a24a41c8e449d79c776;hb=ffd68fbfb90242069af957f2a28908f0559f8348;hp=7a155e341bd0e64b0f0153b8a2977058cd001bf3;hpb=35b405f813c4fd4eccf67eb95dce877c9e288421;p=nageru diff --git a/x264_encoder.h b/x264_encoder.h index 7a155e3..687bf71 100644 --- a/x264_encoder.h +++ b/x264_encoder.h @@ -77,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. @@ -95,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.