| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1611 if (parameters_.options.is_screencast.value_or(false) != | 1611 if (parameters_.options.is_screencast.value_or(false) != |
| 1612 old_options.is_screencast.value_or(false) && | 1612 old_options.is_screencast.value_or(false) && |
| 1613 parameters_.codec_settings) { | 1613 parameters_.codec_settings) { |
| 1614 // If screen content settings change, we may need to recreate the codec | 1614 // If screen content settings change, we may need to recreate the codec |
| 1615 // instance so that the correct type is used. | 1615 // instance so that the correct type is used. |
| 1616 | 1616 |
| 1617 bool force_encoder_allocation = true; | 1617 bool force_encoder_allocation = true; |
| 1618 SetCodec(*parameters_.codec_settings, force_encoder_allocation); | 1618 SetCodec(*parameters_.codec_settings, force_encoder_allocation); |
| 1619 // Mark screenshare parameter as being updated, then test for any other | 1619 // Mark screenshare parameter as being updated, then test for any other |
| 1620 // changes that may require codec reconfiguration. | 1620 // changes that may require codec reconfiguration. |
| 1621 // TODO(sprang): Refactor code to guarantee that ReconfigureEncoder is a |
| 1622 // subset SetCodec instead, so that we don't unnecessarily reconfigure |
| 1623 // the encoder twice. |
| 1621 old_options.is_screencast = options->is_screencast; | 1624 old_options.is_screencast = options->is_screencast; |
| 1622 } | 1625 } |
| 1623 if (parameters_.options != old_options) { | 1626 if (parameters_.options != old_options) { |
| 1624 ReconfigureEncoder(); | 1627 ReconfigureEncoder(); |
| 1625 } | 1628 } |
| 1626 } | 1629 } |
| 1627 | 1630 |
| 1628 if (source_ && stream_) { | 1631 if (source_ && stream_) { |
| 1629 stream_->SetSource( | 1632 stream_->SetSource( |
| 1630 nullptr, webrtc::VideoSendStream::DegradationPreference::kBalanced); | 1633 nullptr, webrtc::VideoSendStream::DegradationPreference::kBalanced); |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2542 rtx_mapping[video_codecs[i].codec.id] != | 2545 rtx_mapping[video_codecs[i].codec.id] != |
| 2543 ulpfec_config.red_payload_type) { | 2546 ulpfec_config.red_payload_type) { |
| 2544 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2547 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2545 } | 2548 } |
| 2546 } | 2549 } |
| 2547 | 2550 |
| 2548 return video_codecs; | 2551 return video_codecs; |
| 2549 } | 2552 } |
| 2550 | 2553 |
| 2551 } // namespace cricket | 2554 } // namespace cricket |
| OLD | NEW |