OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 16 matching lines...) Expand all Loading... | |
27 } | 27 } |
28 } // namespace | 28 } // namespace |
29 | 29 |
30 namespace webrtc { | 30 namespace webrtc { |
31 | 31 |
32 AudioSendStream::Stats::Stats() = default; | 32 AudioSendStream::Stats::Stats() = default; |
33 | 33 |
34 AudioSendStream::Config::Config(Transport* send_transport) | 34 AudioSendStream::Config::Config(Transport* send_transport) |
35 : send_transport(send_transport) {} | 35 : send_transport(send_transport) {} |
36 | 36 |
37 AudioSendStream::Config::~Config() = default; | |
38 | |
37 std::string AudioSendStream::Config::ToString() const { | 39 std::string AudioSendStream::Config::ToString() const { |
38 std::stringstream ss; | 40 std::stringstream ss; |
39 ss << "{rtp: " << rtp.ToString(); | 41 ss << "{rtp: " << rtp.ToString(); |
40 ss << ", send_transport: " << (send_transport ? "(Transport)" : "nullptr"); | 42 ss << ", send_transport: " << (send_transport ? "(Transport)" : "nullptr"); |
41 ss << ", voe_channel_id: " << voe_channel_id; | 43 ss << ", voe_channel_id: " << voe_channel_id; |
42 ss << ", min_bitrate_kbps: " << min_bitrate_kbps; | 44 ss << ", min_bitrate_kbps: " << min_bitrate_kbps; |
43 ss << ", max_bitrate_kbps: " << max_bitrate_kbps; | 45 ss << ", max_bitrate_kbps: " << max_bitrate_kbps; |
44 ss << ", send_codec_spec: " << send_codec_spec.ToString(); | 46 ss << ", send_codec_spec: " << send_codec_spec.ToString(); |
45 ss << '}'; | 47 ss << '}'; |
46 return ss.str(); | 48 return ss.str(); |
(...skipping 28 matching lines...) Expand all Loading... | |
75 | 77 |
76 std::string AudioSendStream::Config::SendCodecSpec::ToString() const { | 78 std::string AudioSendStream::Config::SendCodecSpec::ToString() const { |
77 std::stringstream ss; | 79 std::stringstream ss; |
78 ss << "{nack_enabled: " << (nack_enabled ? "true" : "false"); | 80 ss << "{nack_enabled: " << (nack_enabled ? "true" : "false"); |
79 ss << ", transport_cc_enabled: " << (transport_cc_enabled ? "true" : "false"); | 81 ss << ", transport_cc_enabled: " << (transport_cc_enabled ? "true" : "false"); |
80 ss << ", enable_codec_fec: " << (enable_codec_fec ? "true" : "false"); | 82 ss << ", enable_codec_fec: " << (enable_codec_fec ? "true" : "false"); |
81 ss << ", enable_opus_dtx: " << (enable_opus_dtx ? "true" : "false"); | 83 ss << ", enable_opus_dtx: " << (enable_opus_dtx ? "true" : "false"); |
82 ss << ", opus_max_playback_rate: " << opus_max_playback_rate; | 84 ss << ", opus_max_playback_rate: " << opus_max_playback_rate; |
83 ss << ", cng_payload_type: " << cng_payload_type; | 85 ss << ", cng_payload_type: " << cng_payload_type; |
84 ss << ", cng_plfreq: " << cng_plfreq; | 86 ss << ", cng_plfreq: " << cng_plfreq; |
87 ss << ", min_ptime: " << min_ptime_ms; | |
88 ss << ", max_ptime: " << max_ptime_ms; | |
85 ss << ", codec_inst: " << ::ToString(codec_inst); | 89 ss << ", codec_inst: " << ::ToString(codec_inst); |
86 ss << '}'; | 90 ss << '}'; |
87 return ss.str(); | 91 return ss.str(); |
88 } | 92 } |
89 | 93 |
90 bool AudioSendStream::Config::SendCodecSpec::operator==( | 94 bool AudioSendStream::Config::SendCodecSpec::operator==( |
91 const AudioSendStream::Config::SendCodecSpec& rhs) const { | 95 const AudioSendStream::Config::SendCodecSpec& rhs) const { |
92 if (nack_enabled != rhs.nack_enabled) { | 96 if (nack_enabled == rhs.nack_enabled && |
minyue-webrtc
2016/10/27 14:33:10
refactored per Michael's request
| |
93 return false; | 97 transport_cc_enabled == rhs.transport_cc_enabled && |
98 enable_codec_fec == rhs.enable_codec_fec && | |
99 enable_opus_dtx == rhs.enable_opus_dtx && | |
100 opus_max_playback_rate == rhs.opus_max_playback_rate && | |
101 cng_payload_type == rhs.cng_payload_type && | |
102 cng_plfreq == rhs.cng_plfreq && max_ptime_ms == rhs.max_ptime_ms && | |
103 min_ptime_ms == rhs.min_ptime_ms && codec_inst == rhs.codec_inst) { | |
104 return true; | |
94 } | 105 } |
95 if (transport_cc_enabled != rhs.transport_cc_enabled) { | 106 return false; |
96 return false; | |
97 } | |
98 if (enable_codec_fec != rhs.enable_codec_fec) { | |
99 return false; | |
100 } | |
101 if (enable_opus_dtx != rhs.enable_opus_dtx) { | |
102 return false; | |
103 } | |
104 if (opus_max_playback_rate != rhs.opus_max_playback_rate) { | |
105 return false; | |
106 } | |
107 if (cng_payload_type != rhs.cng_payload_type) { | |
108 return false; | |
109 } | |
110 if (cng_plfreq != rhs.cng_plfreq) { | |
111 return false; | |
112 } | |
113 if (codec_inst != rhs.codec_inst) { | |
114 return false; | |
115 } | |
116 return true; | |
117 } | 107 } |
118 } // namespace webrtc | 108 } // namespace webrtc |
OLD | NEW |