+ // x264 seemingly has an issue where x264_encoder_reconfig() is not reflected
+ // immediately in x264_encoder_parameters(). Since speed control keeps calling
+ // those two all the time, any changes you make outside X264SpeedControl
+ // could be overridden. Thus, to make changes to encoder parameters, you should
+ // instead set a function here, which will be called every time parameters
+ // are modified.
+ void set_config_override_function(std::function<void(x264_param_t *)> override_func)
+ {
+ this->override_func = override_func;
+ }
+