Add support for enabling simulcast in "Plan B" using MediaConstraints.
BUG=webrtc:9655 Change-Id: Ieb5fe5d97b6d4381608a51593bca5423979d1b9f Reviewed-on: https://webrtc-review.googlesource.com/95481 Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Seth Hampson <shampson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24424}
This commit is contained in:
committed by
Commit Bot
parent
d65e143801
commit
fc1acd2364
@ -146,6 +146,9 @@ const char MediaConstraintsInterface::kCpuOveruseDetection[] =
|
||||
"googCpuOveruseDetection";
|
||||
const char MediaConstraintsInterface::kPayloadPadding[] = "googPayloadPadding";
|
||||
|
||||
const char MediaConstraintsInterface::kNumSimulcastLayers[] =
|
||||
"googNumSimulcastLayers";
|
||||
|
||||
// Set |value| to the value associated with the first appearance of |key|, or
|
||||
// return false if |key| is not found.
|
||||
bool MediaConstraintsInterface::Constraints::FindFirst(
|
||||
@ -301,6 +304,13 @@ bool CopyConstraintsIntoOfferAnswerOptions(
|
||||
offer_answer_options->ice_restart = value;
|
||||
}
|
||||
|
||||
int layers;
|
||||
if (FindConstraint(constraints,
|
||||
MediaConstraintsInterface::kNumSimulcastLayers,
|
||||
&layers, &mandatory_constraints_satisfied)) {
|
||||
offer_answer_options->num_simulcast_layers = layers;
|
||||
}
|
||||
|
||||
return mandatory_constraints_satisfied == constraints->GetMandatory().size();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user