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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 // TODO(solenberg): Remove when VoiceEngine channels are created outside | 82 // TODO(solenberg): Remove when VoiceEngine channels are created outside |
83 // of Call. | 83 // of Call. |
84 int voe_channel_id = -1; | 84 int voe_channel_id = -1; |
85 | 85 |
86 // Bitrate limits used for variable audio bitrate streams. Set both to -1 to | 86 // Bitrate limits used for variable audio bitrate streams. Set both to -1 to |
87 // disable audio bitrate adaptation. | 87 // disable audio bitrate adaptation. |
88 // Note: This is still an experimental feature and not ready for real usage. | 88 // Note: This is still an experimental feature and not ready for real usage. |
89 int min_bitrate_kbps = -1; | 89 int min_bitrate_kbps = -1; |
90 int max_bitrate_kbps = -1; | 90 int max_bitrate_kbps = -1; |
91 | 91 |
92 bool enable_audio_network_adaptor = false; | |
93 std::string audio_network_adaptor_config; | |
94 | |
92 struct SendCodecSpec { | 95 struct SendCodecSpec { |
93 SendCodecSpec() { | 96 SendCodecSpec() { |
94 webrtc::CodecInst empty_inst = {0}; | 97 webrtc::CodecInst empty_inst = {0}; |
95 codec_inst = empty_inst; | 98 codec_inst = empty_inst; |
96 codec_inst.pltype = -1; | 99 codec_inst.pltype = -1; |
97 } | 100 } |
98 bool operator==(const SendCodecSpec& rhs) const { | 101 bool operator==(const SendCodecSpec& rhs) const { |
99 { | 102 { |
100 if (nack_enabled != rhs.nack_enabled) { | 103 if (nack_enabled != rhs.nack_enabled) { |
michaelt
2016/10/20 09:10:04
wouldn't this be the cleaner impl. ?
if (nack_en
minyue-webrtc
2016/10/20 09:22:11
Yes, that can be an improvement.
| |
101 return false; | 104 return false; |
102 } | 105 } |
103 if (transport_cc_enabled != rhs.transport_cc_enabled) { | 106 if (transport_cc_enabled != rhs.transport_cc_enabled) { |
104 return false; | 107 return false; |
105 } | 108 } |
106 if (enable_codec_fec != rhs.enable_codec_fec) { | 109 if (enable_codec_fec != rhs.enable_codec_fec) { |
107 return false; | 110 return false; |
108 } | 111 } |
109 if (enable_opus_dtx != rhs.enable_opus_dtx) { | 112 if (enable_opus_dtx != rhs.enable_opus_dtx) { |
110 return false; | 113 return false; |
111 } | 114 } |
112 if (opus_max_playback_rate != rhs.opus_max_playback_rate) { | 115 if (opus_max_playback_rate != rhs.opus_max_playback_rate) { |
113 return false; | 116 return false; |
114 } | 117 } |
115 if (cng_payload_type != rhs.cng_payload_type) { | 118 if (cng_payload_type != rhs.cng_payload_type) { |
116 return false; | 119 return false; |
117 } | 120 } |
118 if (cng_plfreq != rhs.cng_plfreq) { | 121 if (cng_plfreq != rhs.cng_plfreq) { |
119 return false; | 122 return false; |
120 } | 123 } |
124 if (max_ptime_ms != rhs.max_ptime_ms) { | |
125 return false; | |
126 } | |
127 if (min_ptime_ms != rhs.min_ptime_ms) { | |
128 return false; | |
129 } | |
121 if (codec_inst != rhs.codec_inst) { | 130 if (codec_inst != rhs.codec_inst) { |
122 return false; | 131 return false; |
123 } | 132 } |
124 return true; | 133 return true; |
125 } | 134 } |
126 } | 135 } |
127 bool operator!=(const SendCodecSpec& rhs) const { | 136 bool operator!=(const SendCodecSpec& rhs) const { |
128 return !(*this == rhs); | 137 return !(*this == rhs); |
129 } | 138 } |
130 | 139 |
131 bool nack_enabled = false; | 140 bool nack_enabled = false; |
132 bool transport_cc_enabled = false; | 141 bool transport_cc_enabled = false; |
133 bool enable_codec_fec = false; | 142 bool enable_codec_fec = false; |
134 bool enable_opus_dtx = false; | 143 bool enable_opus_dtx = false; |
135 int opus_max_playback_rate = 0; | 144 int opus_max_playback_rate = 0; |
136 int cng_payload_type = -1; | 145 int cng_payload_type = -1; |
137 int cng_plfreq = -1; | 146 int cng_plfreq = -1; |
147 int max_ptime_ms = -1; | |
148 int min_ptime_ms = -1; | |
138 webrtc::CodecInst codec_inst; | 149 webrtc::CodecInst codec_inst; |
139 } send_codec_spec; | 150 } send_codec_spec; |
140 }; | 151 }; |
141 | 152 |
142 // Starts stream activity. | 153 // Starts stream activity. |
143 // When a stream is active, it can receive, process and deliver packets. | 154 // When a stream is active, it can receive, process and deliver packets. |
144 virtual void Start() = 0; | 155 virtual void Start() = 0; |
145 // Stops stream activity. | 156 // Stops stream activity. |
146 // When a stream is stopped, it can't receive, process or deliver packets. | 157 // When a stream is stopped, it can't receive, process or deliver packets. |
147 virtual void Stop() = 0; | 158 virtual void Stop() = 0; |
148 | 159 |
149 // TODO(solenberg): Make payload_type a config property instead. | 160 // TODO(solenberg): Make payload_type a config property instead. |
150 virtual bool SendTelephoneEvent(int payload_type, int event, | 161 virtual bool SendTelephoneEvent(int payload_type, int event, |
151 int duration_ms) = 0; | 162 int duration_ms) = 0; |
152 | 163 |
153 virtual void SetMuted(bool muted) = 0; | 164 virtual void SetMuted(bool muted) = 0; |
154 | 165 |
155 virtual Stats GetStats() const = 0; | 166 virtual Stats GetStats() const = 0; |
156 | 167 |
157 protected: | 168 protected: |
158 virtual ~AudioSendStream() {} | 169 virtual ~AudioSendStream() {} |
159 }; | 170 }; |
160 } // namespace webrtc | 171 } // namespace webrtc |
161 | 172 |
162 #endif // WEBRTC_API_CALL_AUDIO_SEND_STREAM_H_ | 173 #endif // WEBRTC_API_CALL_AUDIO_SEND_STREAM_H_ |
OLD | NEW |