зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1404250 - Ensure that target bitrate is between minimum and maximum bitrates in VideoConduit; r=pehrsons
MozReview-Commit-ID: Am19abfrETx --HG-- extra : rebase_source : 7906e80ab0a07cc5ffb7940a4f362b709a4bacbc
This commit is contained in:
Родитель
8351214bcd
Коммит
1d0e9fe0b4
|
@ -248,6 +248,8 @@ skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emula
|
|||
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
|
||||
[test_peerConnection_addSecondVideoStream.html]
|
||||
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
|
||||
[test_peerConnection_restrictBandwidthTargetBitrate.html]
|
||||
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
|
||||
[test_peerConnection_restrictBandwidthWithTias.html]
|
||||
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
|
||||
[test_peerConnection_removeVideoTrack.html]
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<script type="application/javascript" src="pc.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
createHTML({
|
||||
bug: "Bug 1404250",
|
||||
title: "Extremely bitrate restricted video-only peer connection"
|
||||
});
|
||||
|
||||
var test;
|
||||
runNetworkTest(function (options) {
|
||||
test = new PeerConnectionTest(options);
|
||||
test.setMediaConstraints([{video: true}], [{video: true}]);
|
||||
test.chain.insertAfter('PC_REMOTE_GET_OFFER', [
|
||||
function PC_REMOTE_ADD_TIAS(test) {
|
||||
test._local_offer.sdp = sdputils.addTiasBps(
|
||||
test._local_offer.sdp, 25000);
|
||||
info("Offer with TIAS: " + JSON.stringify(test._local_offer));
|
||||
}
|
||||
]);
|
||||
test.run();
|
||||
});
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1672,7 +1672,12 @@ WebrtcVideoConduit::SelectBitrates(
|
|||
if (mStartBitrate && mStartBitrate > out_start) {
|
||||
out_start = mStartBitrate;
|
||||
}
|
||||
out_start = std::max(out_start, out_min);
|
||||
|
||||
// Ensure that min <= start <= max
|
||||
if (out_min > out_max) {
|
||||
out_min = out_max;
|
||||
}
|
||||
out_start = std::min(out_max, std::max(out_start, out_min));
|
||||
|
||||
MOZ_ASSERT(mPrefMaxBitrate == 0 || out_max <= mPrefMaxBitrate);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче