X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=x264_encoder.h;h=687bf718679c316a3b2e6a24a41c8e449d79c776;hb=d3e48df512d9476d3849227067792a3537bb094e;hp=b8a3562a38da57e0be03437c87ecbd799facb689;hpb=c574aef4437253dcf0e6c1fed4c9cab1033b33f9;p=nageru diff --git a/x264_encoder.h b/x264_encoder.h index b8a3562..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. @@ -115,15 +116,6 @@ private: // Key is the pts of the frame. std::unordered_map frames_being_encoded; - - // Metrics. - std::atomic metric_x264_queued_frames{0}; - std::atomic metric_x264_max_queued_frames{X264_QUEUE_LENGTH}; - std::atomic metric_x264_dropped_frames{0}; - std::atomic metric_x264_output_frames_i{0}; - std::atomic metric_x264_output_frames_p{0}; - std::atomic metric_x264_output_frames_b{0}; - Histogram metric_x264_crf; }; #endif // !defined(_X264ENCODE_H)