Player: move up timeline and adjust size

keep play button bar at the bottom for all configurations, avoid text and buttons overlay when Player is small. Fix cut timing in selection
This commit is contained in:
Bruno
2021-06-15 23:51:59 +02:00
parent a7df619a05
commit f59d4af92b
4 changed files with 280 additions and 244 deletions

View File

@@ -268,6 +268,28 @@ GstClockTime Timeline::sectionsDuration() const
return duration() - d;
}
GstClockTime Timeline::sectionsTimeAt(GstClockTime t) const
{
// target time
GstClockTime d = t;
// loop over gaps
for (auto it = gaps_.begin(); it != gaps_.end(); ++it) {
// gap before target?
if ( (*it).end < d ) {
// increment target
d += (*it).end - (*it).begin;
}
else
// done
break;
}
// return updated target
return d;
}
size_t Timeline::fillSectionsArrays( float* const gaps, float* const fading)
{
size_t arraysize = MAX_TIMELINE_ARRAY;