OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 } | 1664 } |
1665 | 1665 |
1666 // Cache the codecs in order to configure the channel created later. | 1666 // Cache the codecs in order to configure the channel created later. |
1667 for (const auto& ch : send_streams_) { | 1667 for (const auto& ch : send_streams_) { |
1668 if (!SetSendCodecs(ch.second->channel(), ch.second->rtp_parameters())) { | 1668 if (!SetSendCodecs(ch.second->channel(), ch.second->rtp_parameters())) { |
1669 return false; | 1669 return false; |
1670 } | 1670 } |
1671 } | 1671 } |
1672 | 1672 |
1673 // Set nack status on receive channels. | 1673 // Set nack status on receive channels. |
1674 if (!send_streams_.empty()) { | 1674 for (const auto& kv : recv_streams_) { |
1675 for (const auto& kv : recv_streams_) { | 1675 SetNack(kv.second->channel(), send_codec_spec_.nack_enabled); |
1676 SetNack(kv.second->channel(), send_codec_spec_.nack_enabled); | |
1677 } | |
1678 } | 1676 } |
1679 | 1677 |
1680 // Check if the transport cc feedback has changed on the preferred send codec, | 1678 // Check if the transport cc feedback has changed on the preferred send codec, |
1681 // and in that case reconfigure all receive streams. | 1679 // and in that case reconfigure all receive streams. |
1682 if (recv_transport_cc_enabled_ != send_codec_spec_.transport_cc_enabled) { | 1680 if (recv_transport_cc_enabled_ != send_codec_spec_.transport_cc_enabled) { |
1683 LOG(LS_INFO) << "Recreate all the receive streams because the send " | 1681 LOG(LS_INFO) << "Recreate all the receive streams because the send " |
1684 "codec has changed."; | 1682 "codec has changed."; |
1685 recv_transport_cc_enabled_ = send_codec_spec_.transport_cc_enabled; | 1683 recv_transport_cc_enabled_ = send_codec_spec_.transport_cc_enabled; |
1686 for (auto& kv : recv_streams_) { | 1684 for (auto& kv : recv_streams_) { |
1687 kv.second->RecreateAudioReceiveStream(recv_transport_cc_enabled_); | 1685 kv.second->RecreateAudioReceiveStream(recv_transport_cc_enabled_); |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2556 } | 2554 } |
2557 } else { | 2555 } else { |
2558 LOG(LS_INFO) << "Stopping playout for channel #" << channel; | 2556 LOG(LS_INFO) << "Stopping playout for channel #" << channel; |
2559 engine()->voe()->base()->StopPlayout(channel); | 2557 engine()->voe()->base()->StopPlayout(channel); |
2560 } | 2558 } |
2561 return true; | 2559 return true; |
2562 } | 2560 } |
2563 } // namespace cricket | 2561 } // namespace cricket |
2564 | 2562 |
2565 #endif // HAVE_WEBRTC_VOICE | 2563 #endif // HAVE_WEBRTC_VOICE |
OLD | NEW |