| OLD | NEW |
| 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 static_cast<unsigned int>(streams[i].max_qp)); | 467 static_cast<unsigned int>(streams[i].max_qp)); |
| 468 } | 468 } |
| 469 | 469 |
| 470 // Set to zero to not update the bitrate controller from ViEEncoder, as | 470 // Set to zero to not update the bitrate controller from ViEEncoder, as |
| 471 // the bitrate controller is already set from Call. | 471 // the bitrate controller is already set from Call. |
| 472 video_codec.startBitrate = 0; | 472 video_codec.startBitrate = 0; |
| 473 | 473 |
| 474 RTC_DCHECK_GT(streams[0].max_framerate, 0); | 474 RTC_DCHECK_GT(streams[0].max_framerate, 0); |
| 475 video_codec.maxFramerate = streams[0].max_framerate; | 475 video_codec.maxFramerate = streams[0].max_framerate; |
| 476 | 476 |
| 477 if (!SetSendCodec(video_codec)) | 477 if (!SetSendCodec(video_codec)) { |
| 478 LOG(LS_WARNING) << "(Re)configureVideoEncoder: SetSendCodec failed " |
| 479 "for config: " |
| 480 << config.ToString(); |
| 478 return false; | 481 return false; |
| 479 | 482 } |
| 480 // Clear stats for disabled layers. | 483 // Clear stats for disabled layers. |
| 481 for (size_t i = video_codec.numberOfSimulcastStreams; | 484 for (size_t i = video_codec.numberOfSimulcastStreams; |
| 482 i < config_.rtp.ssrcs.size(); ++i) { | 485 i < config_.rtp.ssrcs.size(); ++i) { |
| 483 stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]); | 486 stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]); |
| 484 } | 487 } |
| 485 | 488 |
| 486 stats_proxy_.SetContentType(config.content_type); | 489 stats_proxy_.SetContentType(config.content_type); |
| 487 | 490 |
| 488 RTC_DCHECK_GE(config.min_transmit_bitrate_bps, 0); | 491 RTC_DCHECK_GE(config.min_transmit_bitrate_bps, 0); |
| 489 vie_encoder_.SetMinTransmitBitrate(config.min_transmit_bitrate_bps / 1000); | 492 vie_encoder_.SetMinTransmitBitrate(config.min_transmit_bitrate_bps / 1000); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 used_ssrcs.resize(static_cast<size_t>(video_codec.numberOfSimulcastStreams)); | 627 used_ssrcs.resize(static_cast<size_t>(video_codec.numberOfSimulcastStreams)); |
| 625 vie_encoder_.SetSsrcs(used_ssrcs); | 628 vie_encoder_.SetSsrcs(used_ssrcs); |
| 626 | 629 |
| 627 // Restart the media flow | 630 // Restart the media flow |
| 628 vie_encoder_.Restart(); | 631 vie_encoder_.Restart(); |
| 629 | 632 |
| 630 return true; | 633 return true; |
| 631 } | 634 } |
| 632 } // namespace internal | 635 } // namespace internal |
| 633 } // namespace webrtc | 636 } // namespace webrtc |
| OLD | NEW |