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

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1412233003: Support simulcast and spatial layers in VideoQualityTest (PERF NOTE) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase + suppress log spamming Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « webrtc/video/video_quality_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 strncpy(video_codec.plName, 364 strncpy(video_codec.plName,
365 config_.encoder_settings.payload_name.c_str(), 365 config_.encoder_settings.payload_name.c_str(),
366 kPayloadNameSize - 1); 366 kPayloadNameSize - 1);
367 video_codec.plName[kPayloadNameSize - 1] = '\0'; 367 video_codec.plName[kPayloadNameSize - 1] = '\0';
368 video_codec.plType = config_.encoder_settings.payload_type; 368 video_codec.plType = config_.encoder_settings.payload_type;
369 video_codec.numberOfSimulcastStreams = 369 video_codec.numberOfSimulcastStreams =
370 static_cast<unsigned char>(streams.size()); 370 static_cast<unsigned char>(streams.size());
371 video_codec.minBitrate = streams[0].min_bitrate_bps / 1000; 371 video_codec.minBitrate = streams[0].min_bitrate_bps / 1000;
372 RTC_DCHECK_LE(streams.size(), static_cast<size_t>(kMaxSimulcastStreams)); 372 RTC_DCHECK_LE(streams.size(), static_cast<size_t>(kMaxSimulcastStreams));
373 if (video_codec.codecType == kVideoCodecVP9) {
374 // If the vector is empty, bitrates will be configured automatically.
375 RTC_DCHECK(config.spatial_layers.empty() ||
376 config.spatial_layers.size() ==
377 video_codec.codecSpecific.VP9.numberOfSpatialLayers);
378 RTC_DCHECK_LE(video_codec.codecSpecific.VP9.numberOfSpatialLayers,
379 kMaxSimulcastStreams);
380 for (size_t i = 0; i < config.spatial_layers.size(); ++i)
381 video_codec.spatialLayers[i] = config.spatial_layers[i];
382 }
373 for (size_t i = 0; i < streams.size(); ++i) { 383 for (size_t i = 0; i < streams.size(); ++i) {
374 SimulcastStream* sim_stream = &video_codec.simulcastStream[i]; 384 SimulcastStream* sim_stream = &video_codec.simulcastStream[i];
375 RTC_DCHECK_GT(streams[i].width, 0u); 385 RTC_DCHECK_GT(streams[i].width, 0u);
376 RTC_DCHECK_GT(streams[i].height, 0u); 386 RTC_DCHECK_GT(streams[i].height, 0u);
377 RTC_DCHECK_GT(streams[i].max_framerate, 0); 387 RTC_DCHECK_GT(streams[i].max_framerate, 0);
378 // Different framerates not supported per stream at the moment. 388 // Different framerates not supported per stream at the moment.
379 RTC_DCHECK_EQ(streams[i].max_framerate, streams[0].max_framerate); 389 RTC_DCHECK_EQ(streams[i].max_framerate, streams[0].max_framerate);
380 RTC_DCHECK_GE(streams[i].min_bitrate_bps, 0); 390 RTC_DCHECK_GE(streams[i].min_bitrate_bps, 0);
381 RTC_DCHECK_GE(streams[i].target_bitrate_bps, streams[i].min_bitrate_bps); 391 RTC_DCHECK_GE(streams[i].target_bitrate_bps, streams[i].min_bitrate_bps);
382 RTC_DCHECK_GE(streams[i].max_bitrate_bps, streams[i].target_bitrate_bps); 392 RTC_DCHECK_GE(streams[i].max_bitrate_bps, streams[i].target_bitrate_bps);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 vie_channel_->IsSendingFecEnabled()); 566 vie_channel_->IsSendingFecEnabled());
557 567
558 // Restart the media flow 568 // Restart the media flow
559 vie_encoder_->Restart(); 569 vie_encoder_->Restart();
560 570
561 return true; 571 return true;
562 } 572 }
563 573
564 } // namespace internal 574 } // namespace internal
565 } // namespace webrtc 575 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_quality_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698