#include "frame_rate_change.h"
#include "safe_stringstream.h"
+#include "dcpomatic_assert.h"
#include <stdint.h>
#include <cmath>
#include <ostream>
template <typename T>
int64_t frames (T r) const {
- return rint (_t * r / HZ);
+ return rint (double (_t) * r / HZ);
}
/** @param r Frames per second */
template <class T>
static ContentTime from_frames (int64_t f, T r) {
- assert (r > 0);
+ DCPOMATIC_ASSERT (r > 0);
return ContentTime (f * HZ / r);
}
{
public:
ContentTimePeriod () {}
+
ContentTimePeriod (ContentTime f, ContentTime t)
: from (f)
, to (t)
template <class T>
static DCPTime from_frames (int64_t f, T r) {
- assert (r > 0);
+ DCPOMATIC_ASSERT (r > 0);
return DCPTime (f * HZ / r);
}