dedicated namespace for video-utils
[ardour.git] / gtk2_ardour / video_monitor.cc
index 7f9fd71da2b84ae283a2e13a5d54d7a53a09fd37..2c265365faa9d786f6ad7e8bf8e938e18ba767ea 100644 (file)
@@ -202,7 +202,6 @@ VideoMonitor::send_cmd (int what, int param)
        bool osd_update = false;
        int prev_osdmode = osdmode;
        if (!is_started()) return;
-       printf("VideoMonitor::send_cmd %d %d\n", what, param); fflush(stdout);
        switch (what) {
                case 1:
                        if (param) process->write_to_stdin("window ontop on\n");
@@ -496,7 +495,9 @@ VideoMonitor::set_offset (ARDOUR::frameoffset_t offset)
                video_frame_offset = floor(offset * _session->timecode_frames_per_second() / audio_frame_rate);
        }
 
-       // TODO remember if changed..
+       if (video_offset == video_frame_offset) { return; }
+       video_offset = video_frame_offset;
+
        std::ostringstream osstream1; osstream1 << -1 * video_frame_offset;
        process->write_to_stdin("set offset " + osstream1.str() + "\n");
 }