64 Time (
double a_rate = default_rate)
73 drop = (lrintf (100.f * (
float)a_rate) == (long)2997);
81 rate == other.
rate && drop == other.
drop;
84 std::ostream&
print (std::ostream& ostr)
const
89 ostr << hours <<
':' << minutes <<
':' << seconds <<
':'
90 << frames <<
'.' << subframes
91 <<
" @" << rate << (drop ?
" drop" :
" nondrop");
119 double sample_sample_rate,
120 double timecode_frames_per_second,
bool timecode_drop_frames);
136 bool use_offset,
bool use_subframes,
137 double sample_sample_rate,
138 uint32_t subframes_per_frame,
139 bool offset_is_negative, int64_t offset_samples);
157 bool use_offset,
bool use_subframes,
158 double timecode_frames_per_second,
159 bool timecode_drop_frames,
160 double sample_sample_rate,
161 uint32_t subframes_per_frame,
162 bool offset_is_negative, int64_t offset_samples);
void frames_floot(Time &timecode)
void timecode_to_sample(Timecode::Time const &timecode, int64_t &sample, bool use_offset, bool use_subframes, double sample_sample_rate, uint32_t subframes_per_frame, bool offset_is_negative, int64_t offset_samples)
Wrap increment_subframes(Time &timecode, uint32_t)
void seconds_floor(Time &timecode)
double timecode_to_frames_per_second(TimecodeFormat const t)
Wrap increment(Time &timecode, uint32_t)
void minutes_floor(Time &timecode)
bool parse_timecode_format(std::string tc, Timecode::Time &TC)
bool timecode_has_drop_frames(TimecodeFormat const t)
std::string timecode_format_sampletime(int64_t sample, double sample_sample_rate, double timecode_frames_per_second, bool timecode_drop_frames)
Wrap increment_minutes(Time &timecode, uint32_t)
void hours_floor(Time &timecode)
std::string timecode_format_time(Timecode::Time const timecode)
std::string timecode_format_name(TimecodeFormat const t)
void sample_to_timecode(int64_t sample, Timecode::Time &timecode, bool use_offset, bool use_subframes, double timecode_frames_per_second, bool timecode_drop_frames, double sample_sample_rate, uint32_t subframes_per_frame, bool offset_is_negative, int64_t offset_samples)
Wrap increment_hours(Time &timecode, uint32_t)
Wrap decrement_subframes(Time &timecode, uint32_t)
Wrap decrement(Time &timecode, uint32_t)
Wrap increment_seconds(Time &timecode, uint32_t)
bool operator==(const ProcessorSelection &a, const ProcessorSelection &b)
bool drop
Whether this Time uses dropframe Timecode.
std::ostream & print(std::ostream &ostr) const
static double default_rate
Rate to use for default constructor.
Time(double a_rate=default_rate)
double rate
Frame rate of this Time.
uint32_t subframes
Typically unused.
uint32_t frames
Timecode frames (not audio frames)
std::ostream & operator<<(std::ostream &ostr, const Timecode::Time &t)