void QueueLengthPolicy::update_policy(unsigned queue_length)
{
- metric_input_queue_length_frames = queue_length;
-
if (queue_length == 0) { // Starvation.
if (been_at_safe_point_since_last_starvation && safe_queue_length < unsigned(global_flags.max_input_queue_frames)) {
++safe_queue_length;
been_at_safe_point_since_last_starvation = false;
++metric_input_duped_frames;
metric_input_queue_safe_length_frames = safe_queue_length;
+ metric_input_queue_length_frames = 0;
return;
}
if (queue_length >= safe_queue_length) {
card_index, safe_queue_length);
frames_with_at_least_one = 0;
}
+ metric_input_queue_length_frames = min(queue_length, safe_queue_length); // The caller will drop frames for us if needed.
}
Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards)