X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fmixer.h;h=49afa7f1f2f7a0e1ce7254e05e0bef3b2b6f8027;hb=f9024d141398e69e7b4011becd3ebbe37eaa1776;hp=de8b45741ef30cf97058d5270f995f45e1680553;hpb=25326c82bda01dfa1b86fb4f074d7697705239f8;p=nageru diff --git a/nageru/mixer.h b/nageru/mixer.h index de8b457..49afa7f 100644 --- a/nageru/mixer.h +++ b/nageru/mixer.h @@ -23,6 +23,7 @@ #include #include +#include #include #include "audio_mixer.h" @@ -288,6 +289,11 @@ public: theme->set_wb(channel, r, g, b); } + std::string format_status_line(const std::string &disk_space_left_text, double file_length_seconds) + { + return theme->format_status_line(disk_space_left_text, file_length_seconds); + } + // Note: You can also get this through the global variable global_audio_mixer. AudioMixer *get_audio_mixer() { return audio_mixer.get(); } const AudioMixer *get_audio_mixer() const { return audio_mixer.get(); } @@ -413,7 +419,7 @@ public: return httpd.get_num_connected_clients(); } - std::vector get_theme_menu() { return theme->get_theme_menu(); } + Theme::MenuEntry *get_theme_menu() { return theme->get_theme_menu(); } void theme_menu_entry_clicked(int lua_ref) { return theme->theme_menu_entry_clicked(lua_ref); } @@ -456,7 +462,7 @@ private: HTTPD httpd; unsigned num_cards, num_video_inputs, num_html_inputs = 0; - QSurface *mixer_surface, *h264_encoder_surface, *decklink_output_surface; + QSurface *mixer_surface, *h264_encoder_surface, *decklink_output_surface, *image_update_surface; std::unique_ptr resource_pool; std::unique_ptr theme; std::atomic audio_source_channel{0}; @@ -532,6 +538,7 @@ private: std::function upload_func; // Needs to be called to actually upload the texture to OpenGL. unsigned dropped_frames = 0; // Number of dropped frames before this one. std::chrono::steady_clock::time_point received_timestamp = std::chrono::steady_clock::time_point::min(); + movit::RGBTriplet neutral_color{1.0f, 1.0f, 1.0f}; // Used for MJPEG encoding. (upload_func packs everything it needs // into the functor, but would otherwise also use these.) @@ -570,6 +577,7 @@ private: JitterHistory output_jitter_history; CaptureCard cards[MAX_VIDEO_CARDS]; // Protected by . YCbCrInterpretation ycbcr_interpretation[MAX_VIDEO_CARDS]; // Protected by . + movit::RGBTriplet last_received_neutral_color[MAX_VIDEO_CARDS]; // Used by the mixer thread only. Constructor-initialiezd. std::unique_ptr audio_mixer; // Same as global_audio_mixer (see audio_mixer.h). bool input_card_is_master_clock(unsigned card_index, unsigned master_card_index) const; struct OutputFrameInfo {