X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fvideo_monitor.cc;h=d6831e45b744e6f232a17fda759f156cac53dec8;hb=3dcb7bf3d3f4eca512c799b5f63fd412e5e3e233;hp=9edc3d1d2295d67b7f2848e949892d629c15dc18;hpb=30b087ab3d28f1585987fa3f6ae006562ae192e3;p=ardour.git diff --git a/gtk2_ardour/video_monitor.cc b/gtk2_ardour/video_monitor.cc index 9edc3d1d22..d6831e45b7 100644 --- a/gtk2_ardour/video_monitor.cc +++ b/gtk2_ardour/video_monitor.cc @@ -37,7 +37,7 @@ using namespace ARDOUR_UI_UTILS; VideoMonitor::VideoMonitor (PublicEditor *ed, std::string xjadeo_bin_path) : editor (ed) { - manually_seeked_sample = 0; + manually_seeked_frame = 0; fps =0.0; // = _session->timecode_frames_per_second(); sync_by_manual_seek = true; _restore_settings_mask = 0; @@ -72,7 +72,7 @@ VideoMonitor::start () return true; } - manually_seeked_sample = 0; + manually_seeked_frame = 0; sync_by_manual_seek = false; if (clock_connection.connected()) { clock_connection.disconnect(); } @@ -126,7 +126,7 @@ void VideoMonitor::open (std::string filename) { if (!is_started()) return; - manually_seeked_sample = 0; + manually_seeked_frame = 0; osdmode = 10; // 1: frameno, 2: timecode, 8: box starting = 15; process->write_to_stdin("load " + filename + "\n"); @@ -384,8 +384,8 @@ VideoMonitor::parse_output (std::string d, size_t /*s*/) osdmode = atoi(value); if (starting || atoi(xjadeo_settings["osd mode"]) != osdmode) { if (!starting && _session) _session->set_dirty (); - if ((osdmode & 1) == 1) { UiState("xjadeo-window-osd-sample-on"); } - if ((osdmode & 1) == 0) { UiState("xjadeo-window-osd-sample-off"); } + if ((osdmode & 1) == 1) { UiState("xjadeo-window-osd-frame-on"); } + if ((osdmode & 1) == 0) { UiState("xjadeo-window-osd-frame-off"); } if ((osdmode & 2) == 2) { UiState("xjadeo-window-osd-timecode-on"); } if ((osdmode & 2) == 0) { UiState("xjadeo-window-osd-timecode-off"); } if ((osdmode & 8) == 8) { UiState("xjadeo-window-osd-box-on"); } @@ -467,7 +467,7 @@ VideoMonitor::get_custom_setting (const std::string k) return (xjadeo_settings[k]); } -#define NO_OFFSET (ARDOUR::max_samplepos) //< skip setting or modifying offset +#define NO_OFFSET (Temporal::max_samplepos) //< skip setting or modifying offset void VideoMonitor::srsupdate () { @@ -526,8 +526,8 @@ VideoMonitor::manual_seek (samplepos_t when, bool /*force*/, ARDOUR::sampleoffse } if (video_frame < 0 ) video_frame = 0; - if (video_frame == manually_seeked_sample) { return; } - manually_seeked_sample = video_frame; + if (video_frame == manually_seeked_frame) { return; } + manually_seeked_frame = video_frame; #if 0 /* DEBUG */ std::cout <<"seek: " << video_frame << std::endl; @@ -556,9 +556,8 @@ VideoMonitor::xjadeo_sync_setup () if (!_session) { return; } bool my_manual_seek = true; - if (_session->config.get_external_sync()) { - if (ARDOUR::Config->get_sync_source() == ARDOUR::Engine) - my_manual_seek = false; + if (_session->synced_to_engine ()) { + my_manual_seek = false; } if (my_manual_seek != sync_by_manual_seek) {