diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 707d3109f7..ea1c1c13f4 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -840,6 +840,14 @@ ARDOUR_UI::parameter_changed (const char* parameter_name) map_meter_falloff (); } else if (PARAM_IS ("verify-remove-last-capture")) { ActionManager::map_some_state ("options", "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture); + } else if (PARAM_IS ("video-pullup") || PARAM_IS ("smpte-frames-per-second")) { + if (session) { + primary_clock.set (session->audible_frame(), true); + secondary_clock.set (session->audible_frame(), true); + } else { + primary_clock.set (0, true); + secondary_clock.set (0, true); + } } #undef PARAM_IS diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 4ec8c1b89f..270da7ab11 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -58,7 +58,7 @@ const uint32_t AudioClock::field_length[(int) AudioClock::AudioFrames+1] = { 10 /* Audio Frame */ }; -AudioClock::AudioClock (const string& name, bool allow_edit, bool duration, bool with_tempo_and_meter) +AudioClock::AudioClock (const string& name, bool allow_edit, bool duration, bool with_extras) : is_duration (duration), editable (allow_edit), colon1 (":"), @@ -110,7 +110,19 @@ AudioClock::AudioClock (const string& name, bool allow_edit, bool duration, bool bbt_packer.pack_start (b2, false, false); bbt_packer.pack_start (ticks_ebox, false, false); - if (with_tempo_and_meter) { + if (with_extras) { + + framerate_label = manage (new Label); + pullup_label = manage (new Label); + + framerate_label->set_name ("BBTMeterLabel"); + pullup_label->set_name ("BBTTempoLabel"); + + rate_pullup_box.pack_start (*framerate_label, true, true); + rate_pullup_box.pack_start (*pullup_label, true, true); + + smpte_packer.pack_start (rate_pullup_box, false,false, 5); + meter_label = manage (new Label); tempo_label = manage (new Label); @@ -122,6 +134,8 @@ AudioClock::AudioClock (const string& name, bool allow_edit, bool duration, bool bbt_packer.pack_start (tempo_meter_box, false, false, 5); } else { + framerate_label = 0; + pullup_label = 0; meter_label = 0; tempo_label = 0; } @@ -467,6 +481,20 @@ AudioClock::set_smpte (nframes_t when, bool force) frames_label.set_text (buf); last_frames = smpte.frames; } + + if (framerate_label) { + sprintf (buf, "%-5.2f", Config->get_smpte_frames_per_second()); + framerate_label->set_text (buf); + + float x = Config->get_video_pullup(); + + if (x == 0.0) { + pullup_label->set_text (_("none")); + } else { + sprintf (buf, "%-6.4f", x); + pullup_label->set_text (buf); + } + } } void diff --git a/gtk2_ardour/audio_clock.h b/gtk2_ardour/audio_clock.h index e0431ba16e..147058ef4d 100644 --- a/gtk2_ardour/audio_clock.h +++ b/gtk2_ardour/audio_clock.h @@ -112,6 +112,11 @@ class AudioClock : public Gtk::HBox Gtk::Label frames_label; Gtk::Label colon1, colon2, colon3; + Gtk::Label* framerate_label; + Gtk::Label* pullup_label; + + Gtk::VBox rate_pullup_box; + Gtk::Label ms_hours_label; Gtk::Label ms_minutes_label; Gtk::Label ms_seconds_label;