Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1871)

Unified Diff: webrtc/media/engine/fakewebrtccall.cc

Issue 1810973002: Add support for configuring the number of spatial/temporal layers for VP9 through a field trial. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: address comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/fakewebrtccall.cc
diff --git a/webrtc/media/engine/fakewebrtccall.cc b/webrtc/media/engine/fakewebrtccall.cc
index 3277e75a6412c0de2e70450cc9828b299e97836a..092410b5a402281577e230020a92de351ae50133 100644
--- a/webrtc/media/engine/fakewebrtccall.cc
+++ b/webrtc/media/engine/fakewebrtccall.cc
@@ -166,9 +166,17 @@ void FakeVideoSendStream::ReconfigureVideoEncoder(
if (config_.encoder_settings.payload_name == "VP8") {
vpx_settings_.vp8 = *reinterpret_cast<const webrtc::VideoCodecVP8*>(
config.encoder_specific_settings);
+ if (!config.streams.empty()) {
+ vpx_settings_.vp8.numberOfTemporalLayers = static_cast<unsigned char>(
+ config.streams.back().temporal_layer_thresholds_bps.size() + 1);
+ }
} else if (config_.encoder_settings.payload_name == "VP9") {
vpx_settings_.vp9 = *reinterpret_cast<const webrtc::VideoCodecVP9*>(
config.encoder_specific_settings);
+ if (!config.streams.empty()) {
+ vpx_settings_.vp9.numberOfTemporalLayers = static_cast<unsigned char>(
+ config.streams.back().temporal_layer_thresholds_bps.size() + 1);
+ }
} else {
ADD_FAILURE() << "Unsupported encoder payload: "
<< config_.encoder_settings.payload_name;
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698