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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1686 | 1686 |
1687 const std::vector<uint32_t>& | 1687 const std::vector<uint32_t>& |
1688 WebRtcVideoChannel2::WebRtcVideoSendStream::GetSsrcs() const { | 1688 WebRtcVideoChannel2::WebRtcVideoSendStream::GetSsrcs() const { |
1689 return ssrcs_; | 1689 return ssrcs_; |
1690 } | 1690 } |
1691 | 1691 |
1692 void WebRtcVideoChannel2::WebRtcVideoSendStream::SetOptions( | 1692 void WebRtcVideoChannel2::WebRtcVideoSendStream::SetOptions( |
1693 const VideoOptions& options) { | 1693 const VideoOptions& options) { |
1694 rtc::CritScope cs(&lock_); | 1694 rtc::CritScope cs(&lock_); |
1695 | 1695 |
| 1696 VideoOptions old_options = parameters_.options; |
1696 parameters_.options.SetAll(options); | 1697 parameters_.options.SetAll(options); |
1697 // Reconfigure encoder settings on the next frame or stream | 1698 // Reconfigure encoder settings on the next frame or stream |
1698 // recreation. | 1699 // recreation if the options changed. |
1699 pending_encoder_reconfiguration_ = true; | 1700 if (parameters_.options != old_options) { |
| 1701 pending_encoder_reconfiguration_ = true; |
| 1702 } |
1700 } | 1703 } |
1701 | 1704 |
1702 webrtc::VideoCodecType CodecTypeFromName(const std::string& name) { | 1705 webrtc::VideoCodecType CodecTypeFromName(const std::string& name) { |
1703 if (CodecNamesEq(name, kVp8CodecName)) { | 1706 if (CodecNamesEq(name, kVp8CodecName)) { |
1704 return webrtc::kVideoCodecVP8; | 1707 return webrtc::kVideoCodecVP8; |
1705 } else if (CodecNamesEq(name, kVp9CodecName)) { | 1708 } else if (CodecNamesEq(name, kVp9CodecName)) { |
1706 return webrtc::kVideoCodecVP9; | 1709 return webrtc::kVideoCodecVP9; |
1707 } else if (CodecNamesEq(name, kH264CodecName)) { | 1710 } else if (CodecNamesEq(name, kH264CodecName)) { |
1708 return webrtc::kVideoCodecH264; | 1711 return webrtc::kVideoCodecH264; |
1709 } | 1712 } |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 rtx_mapping[video_codecs[i].codec.id] != | 2596 rtx_mapping[video_codecs[i].codec.id] != |
2594 fec_settings.red_payload_type) { | 2597 fec_settings.red_payload_type) { |
2595 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2598 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2596 } | 2599 } |
2597 } | 2600 } |
2598 | 2601 |
2599 return video_codecs; | 2602 return video_codecs; |
2600 } | 2603 } |
2601 | 2604 |
2602 } // namespace cricket | 2605 } // namespace cricket |
OLD | NEW |