X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=nageru%2Fvideo_encoder.h;h=61b16f763d3cdb3211ca864fc311b79c9c47cb22;hb=ed6cb5e4ae64a2f0fc1a08c3ea898a154fc1672d;hp=5c42ef81f1a6c94fd1a68d4be4e755f3a5fd63df;hpb=7188e3e948c60f78f5e2cd8756337f716de06d99;p=nageru diff --git a/nageru/video_encoder.h b/nageru/video_encoder.h index 5c42ef8..61b16f7 100644 --- a/nageru/video_encoder.h +++ b/nageru/video_encoder.h @@ -20,10 +20,11 @@ extern "C" { #include } -#include "mux.h" +#include "shared/mux.h" #include "shared/ref_counted_gl_sync.h" class AudioEncoder; +class AV1Encoder; class DiskSpaceEstimator; class HTTPD; class Mux; @@ -51,7 +52,7 @@ public: // // The semantics of y_tex and cbcr_tex depend on is_zerocopy(): // - // - If false, the are input parameters, ie., the caller + // - If false, they are input parameters, ie., the caller // allocates textures. (The contents are not read before // end_frame() is called.) // - If true, they are output parameters, ie., VideoEncoder @@ -78,7 +79,7 @@ private: static int write_packet2_thunk(void *opaque, uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time); int write_packet2(uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time); - AVOutputFormat *oformat; + const AVOutputFormat *oformat; mutable std::mutex qs_mu, qs_audio_mu; std::unique_ptr quicksync_encoder; // Under _and_ . movit::ResourcePool *resource_pool; @@ -90,12 +91,16 @@ private: bool seen_sync_markers = false; - std::unique_ptr stream_mux; // To HTTP. + std::unique_ptr http_mux; // To the HTTP server. std::unique_ptr stream_audio_encoder; std::unique_ptr x264_encoder; // nullptr if not using x264. + std::unique_ptr x264_disk_encoder; // nullptr if not using x264, or if not having separate disk encodes. +#ifdef HAVE_AV1 + std::unique_ptr av1_encoder; // nullptr if not using SVT-AV1. +#endif - std::string stream_mux_header; - MuxMetrics stream_mux_metrics; + std::string http_mux_header; + MuxMetrics http_mux_metrics; std::atomic quicksync_encoders_in_shutdown{0}; std::atomic overriding_bitrate{0};