minor code cleanup
This commit is contained in:
@@ -709,7 +709,7 @@ void ViewerWidget::UpdateTextureFromNode()
|
||||
ClearVideoAutoCacherQueue();
|
||||
}
|
||||
|
||||
watcher->SetTicket(GetFrame(time, RenderTicketPriority::kHigh));
|
||||
watcher->SetTicket(GetFrame(time, RenderTicketPriority::kNormal));
|
||||
} else {
|
||||
// There is definitely no frame here, we can immediately flip to showing nothing
|
||||
nonqueue_watchers_.clear();
|
||||
@@ -762,7 +762,7 @@ void ViewerWidget::PlayInternal(int speed, bool in_to_out_only)
|
||||
playback_speed_ = speed;
|
||||
play_in_to_out_only_ = in_to_out_only;
|
||||
|
||||
playback_queue_next_frame_ = GetTimestamp();
|
||||
playback_queue_next_frame_ = GetTimestamp() + playback_speed_;
|
||||
|
||||
controls_->ShowPauseButton();
|
||||
|
||||
@@ -776,18 +776,10 @@ void ViewerWidget::PlayInternal(int speed, bool in_to_out_only)
|
||||
prequeuing_video_ = true;
|
||||
prequeue_count_ = 0;
|
||||
|
||||
// We "prioritize" the frames, which means they're pushed to the top of the render queue,
|
||||
// we queue in reverse so that they're still queued in order
|
||||
|
||||
playback_queue_next_frame_ += playback_speed_ * prequeue_length_;
|
||||
int64_t temp = playback_queue_next_frame_;
|
||||
|
||||
for (int i=0; i<prequeue_length_; i++) {
|
||||
playback_queue_next_frame_ -= playback_speed_;
|
||||
RequestNextFrameForQueue(RenderTicketPriority::kHigh, false);
|
||||
RequestNextFrameForQueue(RenderTicketPriority::kNormal, false);
|
||||
playback_queue_next_frame_ += playback_speed_;
|
||||
}
|
||||
|
||||
playback_queue_next_frame_ = temp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user