/* * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
bool BitrateProber::ReadyToSetActiveState(DataSize packet_size) const { if (clusters_.empty()) {
RTC_DCHECK(probing_state_ == ProbingState::kDisabled ||
probing_state_ == ProbingState::kInactive); returnfalse;
} switch (probing_state_) { case ProbingState::kDisabled: case ProbingState::kActive: returnfalse; case ProbingState::kInactive: if (config_.allow_start_probing_immediately) { returntrue;
} // If config_.min_packet_size > 0, a "large enough" packet must be // sent first, before a probe can be generated and sent. Otherwise, // send the probe asap. return packet_size >=
std::min(RecommendedMinProbeSize(), config_.min_packet_size.Get());
}
}
Timestamp BitrateProber::NextProbeTime(Timestamp /* now */) const { // Probing is not active or probing is already complete. if (probing_state_ != ProbingState::kActive || clusters_.empty()) { return Timestamp::PlusInfinity();
}
// Compute the time delta from the cluster start to ensure probe bitrate stays // close to the target bitrate. Result is in milliseconds.
DataSize sent_bytes = DataSize::Bytes(cluster.sent_bytes);
DataRate send_bitrate = cluster.pace_info.send_bitrate;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.