set (double (frame) / frames_per_second, tcr);
}
+Time::Time (double seconds)
+{
+ set (seconds, 24);
+}
+
void
Time::set (double seconds, int tcr_)
{
{
return (int64_t(e) * float (tcr_ / tcr)) + int64_t(s) * tcr_ + int64_t(m) * 60 * tcr_ + int64_t(h) * 60 * 60 * tcr_;
}
+
+double
+Time::to_seconds () const
+{
+ return h * 3600 + m * 60 + s + double(e) / tcr;
+}
, tcr (tcr_)
{}
+ Time (double seconds);
+
Time (std::string time, int tcr);
int h; ///< hours
int tcr; ///< timecode rate: the number of editable units per second.
std::string to_string () const;
+ double to_seconds () const;
int64_t to_editable_units (int tcr_) const;
private: