first compiling, mostly working version of group controls changes
[ardour.git] / gtk2_ardour / video_monitor.cc
index c48999c3cd1b273005a01609c7501ecde4e730cf..ece1856d545e8be9903f038307538611109a4452 100644 (file)
@@ -20,7 +20,7 @@
 #include "pbd/file_utils.h"
 #include "pbd/convert.h"
 #include "gui_thread.h"
-#include "ardour_ui.h"
+#include "timers.h"
 #include "utils.h"
 
 #include <stdio.h>
@@ -128,7 +128,6 @@ VideoMonitor::open (std::string filename)
        if (!is_started()) return;
        manually_seeked_frame = 0;
        osdmode = 10; // 1: frameno, 2: timecode, 8: box
-       sync_by_manual_seek = false;
        starting = 15;
        process->write_to_stdin("load " + filename + "\n");
        process->write_to_stdin("set fps -1\n");
@@ -160,8 +159,10 @@ VideoMonitor::open (std::string filename)
                querystate();
                state_clk_divide = 0;
                /* TODO once every two second or so -- state_clk_divide hack below */
-               state_connection = ARDOUR_UI::RapidScreenUpdate.connect (sigc::mem_fun (*this, &VideoMonitor::querystate));
+               state_connection = Timers::rapid_connect (sigc::mem_fun (*this, &VideoMonitor::querystate));
        }
+       sync_by_manual_seek = true;
+       clock_connection = Timers::fps_connect (sigc::mem_fun (*this, &VideoMonitor::srsupdate));
        xjadeo_sync_setup();
 }
 
@@ -467,7 +468,7 @@ VideoMonitor::get_custom_setting (const std::string k)
        return (xjadeo_settings[k]);
 }
 
-#define NO_OFFSET (1<<31) //< skip setting or modifying offset --  TODO check ARDOUR::frameoffset_t max value.
+#define NO_OFFSET (ARDOUR::max_framepos) //< skip setting or modifying offset
 void
 VideoMonitor::srsupdate ()
 {
@@ -569,7 +570,7 @@ VideoMonitor::xjadeo_sync_setup ()
                        process->write_to_stdin("jack connect\n");
                } else {
                        process->write_to_stdin("jack disconnect\n");
-                       clock_connection = ARDOUR_UI::SuperRapidScreenUpdate.connect (sigc::mem_fun (*this, &VideoMonitor::srsupdate));
+                       clock_connection = Timers::fps_connect (sigc::mem_fun (*this, &VideoMonitor::srsupdate));
                }
                sync_by_manual_seek = my_manual_seek;
        }