timeline: added thumbnail modes that affect how much is rendered

This commit is contained in:
itsmattkc
2022-09-06 16:06:26 -07:00
parent 00f256f16f
commit 571be3d28d
12 changed files with 159 additions and 81 deletions
+6 -1
View File
@@ -312,6 +312,11 @@ TimeRangeListFrameIterator::TimeRangeListFrameIterator(const TimeRangeList &list
UpdateIndexIfNecessary();
}
rational TimeRangeListFrameIterator::Snap(const rational &r) const
{
return Timecode::snap_time_to_timebase(r, timebase_, Timecode::kFloor);
}
bool TimeRangeListFrameIterator::GetNext(rational *out)
{
if (!HasNext()) {
@@ -368,7 +373,7 @@ void TimeRangeListFrameIterator::UpdateIndexIfNecessary()
range_index_++;
if (range_index_ < list_.size()) {
current_ = Timecode::snap_time_to_timebase(list_.at(range_index_).in(), timebase_, Timecode::kCeil);
current_ = Snap(list_.at(range_index_).in());
}
}
}