X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mixer.h;h=6a58575febd61d230b5e0cb7c65a6771a66248e5;hb=7dec19543c858de7247f64f6c82f613f9fe05825;hp=dab567f1e80728f668eeb5a26fc8467edcff9ed1;hpb=5c6163ad5daa01b486e44c394dd7cc9878ec5df5;p=nageru diff --git a/mixer.h b/mixer.h index dab567f..6a58575 100644 --- a/mixer.h +++ b/mixer.h @@ -147,6 +147,25 @@ public: output_channel[output].set_frame_ready_callback(callback); } + // TODO: Should this really be per-channel? Shouldn't it just be called for e.g. the live output? + typedef std::function &)> transition_names_updated_callback_t; + void set_transition_names_updated_callback(Output output, transition_names_updated_callback_t callback) + { + output_channel[output].set_transition_names_updated_callback(callback); + } + + typedef std::function name_updated_callback_t; + void set_name_updated_callback(Output output, name_updated_callback_t callback) + { + output_channel[output].set_name_updated_callback(callback); + } + + typedef std::function color_updated_callback_t; + void set_color_updated_callback(Output output, color_updated_callback_t callback) + { + output_channel[output].set_color_updated_callback(callback); + } + typedef std::function bool has_current_frame = false, has_ready_frame = false; // protected by new_frame_ready_callback_t new_frame_ready_callback; - bool has_new_frame_ready_callback = false; + transition_names_updated_callback_t transition_names_updated_callback; + name_updated_callback_t name_updated_callback; + color_updated_callback_t color_updated_callback; + + std::vector last_transition_names; + std::string last_name, last_color; }; OutputChannel output_channel[NUM_OUTPUTS];