]> git.sesse.net Git - nageru/blobdiff - x264_encoder.h
Fix an issue where the mixer lagging too much behind CEF would cause us to display...
[nageru] / x264_encoder.h
index 7a155e341bd0e64b0f0153b8a2977058cd001bf3..687bf718679c316a3b2e6a24a41c8e449d79c776 100644 (file)
@@ -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<X264SpeedControl> speed_control;
 
-       std::function<void(x264_param_t *)> bitrate_override_func;
-
        std::atomic<unsigned> new_bitrate_kbit{0};  // 0 for no change.
 
        // Protects everything below it.