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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 int32_t echo_delay_std_ms = -1; | 48 int32_t echo_delay_std_ms = -1; |
49 int32_t echo_return_loss = -100; | 49 int32_t echo_return_loss = -100; |
50 int32_t echo_return_loss_enhancement = -100; | 50 int32_t echo_return_loss_enhancement = -100; |
51 float residual_echo_likelihood = -1.0f; | 51 float residual_echo_likelihood = -1.0f; |
52 bool typing_noise_detected = false; | 52 bool typing_noise_detected = false; |
53 }; | 53 }; |
54 | 54 |
55 struct Config { | 55 struct Config { |
56 Config() = delete; | 56 Config() = delete; |
57 explicit Config(Transport* send_transport); | 57 explicit Config(Transport* send_transport); |
| 58 ~Config(); |
58 std::string ToString() const; | 59 std::string ToString() const; |
59 | 60 |
60 // Send-stream specific RTP settings. | 61 // Send-stream specific RTP settings. |
61 struct Rtp { | 62 struct Rtp { |
62 Rtp(); | 63 Rtp(); |
63 ~Rtp(); | 64 ~Rtp(); |
64 std::string ToString() const; | 65 std::string ToString() const; |
65 | 66 |
66 // Sender SSRC. | 67 // Sender SSRC. |
67 uint32_t ssrc = 0; | 68 uint32_t ssrc = 0; |
(...skipping 17 matching lines...) Expand all Loading... |
85 // TODO(solenberg): Remove when VoiceEngine channels are created outside | 86 // TODO(solenberg): Remove when VoiceEngine channels are created outside |
86 // of Call. | 87 // of Call. |
87 int voe_channel_id = -1; | 88 int voe_channel_id = -1; |
88 | 89 |
89 // Bitrate limits used for variable audio bitrate streams. Set both to -1 to | 90 // Bitrate limits used for variable audio bitrate streams. Set both to -1 to |
90 // disable audio bitrate adaptation. | 91 // disable audio bitrate adaptation. |
91 // Note: This is still an experimental feature and not ready for real usage. | 92 // Note: This is still an experimental feature and not ready for real usage. |
92 int min_bitrate_kbps = -1; | 93 int min_bitrate_kbps = -1; |
93 int max_bitrate_kbps = -1; | 94 int max_bitrate_kbps = -1; |
94 | 95 |
| 96 // Defines whether to turn on audio network adaptor, and defines its config |
| 97 // string. |
| 98 rtc::Optional<std::string> audio_network_adaptor_config; |
| 99 |
95 struct SendCodecSpec { | 100 struct SendCodecSpec { |
96 SendCodecSpec(); | 101 SendCodecSpec(); |
97 std::string ToString() const; | 102 std::string ToString() const; |
98 | 103 |
99 bool operator==(const SendCodecSpec& rhs) const; | 104 bool operator==(const SendCodecSpec& rhs) const; |
100 bool operator!=(const SendCodecSpec& rhs) const { | 105 bool operator!=(const SendCodecSpec& rhs) const { |
101 return !(*this == rhs); | 106 return !(*this == rhs); |
102 } | 107 } |
103 | 108 |
104 bool nack_enabled = false; | 109 bool nack_enabled = false; |
105 bool transport_cc_enabled = false; | 110 bool transport_cc_enabled = false; |
106 bool enable_codec_fec = false; | 111 bool enable_codec_fec = false; |
107 bool enable_opus_dtx = false; | 112 bool enable_opus_dtx = false; |
108 int opus_max_playback_rate = 0; | 113 int opus_max_playback_rate = 0; |
109 int cng_payload_type = -1; | 114 int cng_payload_type = -1; |
110 int cng_plfreq = -1; | 115 int cng_plfreq = -1; |
| 116 int max_ptime_ms = -1; |
| 117 int min_ptime_ms = -1; |
111 webrtc::CodecInst codec_inst; | 118 webrtc::CodecInst codec_inst; |
112 } send_codec_spec; | 119 } send_codec_spec; |
113 }; | 120 }; |
114 | 121 |
115 // Starts stream activity. | 122 // Starts stream activity. |
116 // When a stream is active, it can receive, process and deliver packets. | 123 // When a stream is active, it can receive, process and deliver packets. |
117 virtual void Start() = 0; | 124 virtual void Start() = 0; |
118 // Stops stream activity. | 125 // Stops stream activity. |
119 // When a stream is stopped, it can't receive, process or deliver packets. | 126 // When a stream is stopped, it can't receive, process or deliver packets. |
120 virtual void Stop() = 0; | 127 virtual void Stop() = 0; |
121 | 128 |
122 // TODO(solenberg): Make payload_type a config property instead. | 129 // TODO(solenberg): Make payload_type a config property instead. |
123 virtual bool SendTelephoneEvent(int payload_type, int event, | 130 virtual bool SendTelephoneEvent(int payload_type, int event, |
124 int duration_ms) = 0; | 131 int duration_ms) = 0; |
125 | 132 |
126 virtual void SetMuted(bool muted) = 0; | 133 virtual void SetMuted(bool muted) = 0; |
127 | 134 |
128 virtual Stats GetStats() const = 0; | 135 virtual Stats GetStats() const = 0; |
129 | 136 |
130 protected: | 137 protected: |
131 virtual ~AudioSendStream() {} | 138 virtual ~AudioSendStream() {} |
132 }; | 139 }; |
133 } // namespace webrtc | 140 } // namespace webrtc |
134 | 141 |
135 #endif // WEBRTC_API_CALL_AUDIO_SEND_STREAM_H_ | 142 #endif // WEBRTC_API_CALL_AUDIO_SEND_STREAM_H_ |
OLD | NEW |