place timecode conversion functions into a Timecode class rather than an olive namespace

Code cleanup and improvement.
This commit is contained in:
itsmattkc
2019-12-26 17:20:58 +11:00
parent 3b2fcf4aae
commit 520b8b46fa
19 changed files with 110 additions and 92 deletions
+2 -2
View File
@@ -56,8 +56,8 @@ void VideoRenderBackend::InvalidateCache(const rational &start_range, const rati
<< end_range_adj.toDouble();
// Snap start_range to timebase
int64_t timestamp = olive::time_to_timestamp(start_range_adj, params_.time_base());
rational true_start = olive::timestamp_to_time(timestamp, params_.time_base());
int64_t timestamp = Timecode::time_to_timestamp(start_range_adj, params_.time_base());
rational true_start = Timecode::timestamp_to_time(timestamp, params_.time_base());
for (rational r=true_start;r<end_range_adj;r+=params_.time_base()) {
// Try to order the queue from closest to the playhead to furthest