X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Ftheme.h;h=8a0a92af7361d1cb50de5a1e9ee9f802f48c172c;hb=6e5ded9f44606841fb5e905394cca803c7d7abdf;hp=fe713ef1f6da48df468d4923c03a5451e23d1f27;hpb=1bf2b3e600dc5485f4957a419459b997d721e5fa;p=nageru diff --git a/nageru/theme.h b/nageru/theme.h index fe713ef..8a0a92a 100644 --- a/nageru/theme.h +++ b/nageru/theme.h @@ -49,6 +49,8 @@ enum EffectType { MULTIPLY_EFFECT, MIX_EFFECT, LIFT_GAMMA_GAIN_EFFECT, + BLUR_EFFECT, + UNSHARP_MASK_EFFECT, NO_EFFECT_TYPE }; @@ -78,13 +80,14 @@ struct InputStateInfo { unsigned last_width[MAX_VIDEO_CARDS], last_height[MAX_VIDEO_CARDS]; bool last_interlaced[MAX_VIDEO_CARDS], last_has_signal[MAX_VIDEO_CARDS], last_is_connected[MAX_VIDEO_CARDS]; unsigned last_frame_rate_nom[MAX_VIDEO_CARDS], last_frame_rate_den[MAX_VIDEO_CARDS]; + bmusb::PixelFormat last_pixel_format[MAX_VIDEO_CARDS]; bool has_last_subtitle[MAX_VIDEO_CARDS]; std::string last_subtitle[MAX_VIDEO_CARDS]; }; class Theme { public: - Theme(const std::string &filename, const std::vector &search_dirs, movit::ResourcePool *resource_pool, unsigned num_cards); + Theme(const std::string &filename, const std::vector &search_dirs, movit::ResourcePool *resource_pool); ~Theme(); struct Chain { @@ -191,6 +194,11 @@ public: std::string format_status_line(const std::string &disk_space_left_text, double file_length_seconds); + // Signal that the given card is going away and will not be replaced + // with a fake capture card, so remove all connections to it so that + // they don't automatically come back on the next frame. + void remove_card(unsigned card_index); + private: void register_globals(); void register_class(const char *class_name, const luaL_Reg *funcs, EffectType effect_type = NO_EFFECT_TYPE); @@ -205,7 +213,6 @@ private: const InputState *input_state = nullptr; // Protected by . Only set temporarily, during chain setup. movit::ResourcePool *resource_pool; int num_channels = -1; - unsigned num_cards; bool startup_finished = false; std::mutex map_m;