#pragma once #include #include "clock.h" enum { // Flowing. FLOWING, // Got request to flush. FLUSHED, // Flushed because of an error. FLUSHED_ERROR, // Realized flush. SIGNALED, // Errored. ERRORED }; static inline bool frame_is_late(struct camu_clock *clock, f64 base, f64 pts, f64 duration) { return pts + duration < ((base == -1.0) ? camu_clock_get_base_pts(clock) : base); }