#include <poll.h>
#include <sys/types.h>
#include <unistd.h>
+
#include "pbd/error.h"
+#include "pbd/stacktrace.h"
#include "pbd/enumwriter.h"
#include "pbd/failed_constructor.h"
#include "pbd/pthread_utils.h"
*/
if (now) {
+ DEBUG_TRACE (DEBUG::MTC, string_compose ("update MTC time does a reset, was full ? %1 now = %2\n", was_full, now));
maybe_reset ();
}
DEBUG_TRACE (DEBUG::MTC, string_compose ("MTC time timestamp = %1 TC %2 = frame %3 (from full message ? %4)\n",
now, timecode, mtc_frame, was_full));
-
+
if (was_full || outside_window (mtc_frame)) {
session.timecode_to_sample (timecode, mtc_frame, true, false);
reset_lock.lock ();
if (reset_pending) {
+ DEBUG_TRACE (DEBUG::MTC, "actually reset\n");
reset ();
reset_pending = 0;
}
*/
DEBUG_TRACE (DEBUG::MTC, string_compose ("trying to reset MTC window with state = %1\n", enum_2_string (port->input()->mtc_running())));
+ PBD::stacktrace (cerr, 35);
switch (port->input()->mtc_running()) {
case MTC_Forward:
+ DEBUG_TRACE (DEBUG::MTC, "set MTC window while running forward\n");
window_begin = root;
if (session.slave_state() == Session::Running) {
window_end = root + (session.frames_per_timecode_frame() * frame_tolerance);
} else {
window_end = root + seekahead_distance ();
}
- DEBUG_TRACE (DEBUG::MTC, string_compose ("legal MTC window now %1 .. %2\n", window_begin, window_end));
break;
case MTC_Backward:
+ DEBUG_TRACE (DEBUG::MTC, "set MTC window while running backward\n");
if (session.slave_state() == Session::Running) {
nframes_t d = session.frames_per_timecode_frame() * frame_tolerance;
if (root > d) {
}
}
window_end = root;
- DEBUG_TRACE (DEBUG::MTC, string_compose ("legal MTC window now %1 .. %2\n", window_begin, window_end));
break;
default:
+ DEBUG_TRACE (DEBUG::MTC, "not touching MTC window - MTC_Stopped\n");
/* do nothing */
break;
}
+
+ DEBUG_TRACE (DEBUG::MTC, string_compose ("legal MTC window now %1 .. %2\n", window_begin, window_end));
}
nframes64_t