#include <libavformat/avformat.h>
}
+#include <movit/image_format.h>
+
#include "print_latency.h"
class Mux;
// <data> is taken to be raw NV12 data of WIDTHxHEIGHT resolution.
// Does not block.
- void add_frame(int64_t pts, int64_t duration, const uint8_t *data, const ReceivedTimestamps &received_ts);
+ void add_frame(int64_t pts, int64_t duration, movit::YCbCrLumaCoefficients ycbcr_coefficients, const uint8_t *data, const ReceivedTimestamps &received_ts);
std::string get_global_headers() const {
while (!x264_init_done) {
private:
struct QueuedFrame {
int64_t pts, duration;
+ movit::YCbCrLumaCoefficients ycbcr_coefficients;
uint8_t *data;
ReceivedTimestamps received_ts;
};
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.