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 |
11 #ifndef WEBRTC_CALL_AUDIO_SEND_STREAM_H_ | 11 #ifndef WEBRTC_CALL_AUDIO_SEND_STREAM_H_ |
12 #define WEBRTC_CALL_AUDIO_SEND_STREAM_H_ | 12 #define WEBRTC_CALL_AUDIO_SEND_STREAM_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <string> | 15 #include <string> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/api/audio_codecs/audio_format.h" | |
18 #include "webrtc/api/call/transport.h" | 19 #include "webrtc/api/call/transport.h" |
19 #include "webrtc/base/optional.h" | 20 #include "webrtc/base/optional.h" |
20 #include "webrtc/config.h" | 21 #include "webrtc/config.h" |
21 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" | 22 #include "webrtc/modules/audio_coding/codecs/audio_encoder_factory.h" |
22 #include "webrtc/typedefs.h" | 23 #include "webrtc/typedefs.h" |
23 | 24 |
24 namespace webrtc { | 25 namespace webrtc { |
25 | 26 |
26 // WORK IN PROGRESS | 27 // WORK IN PROGRESS |
27 // This class is under development and is not yet intended for for use outside | 28 // This class is under development and is not yet intended for for use outside |
28 // of WebRtc/Libjingle. Please use the VoiceEngine API instead. | 29 // of WebRtc/Libjingle. Please use the VoiceEngine API instead. |
29 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=4690 | 30 // See: https://bugs.chromium.org/p/webrtc/issues/detail?id=4690 |
30 | 31 |
31 class AudioSendStream { | 32 class AudioSendStream { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 // Note: This is still an experimental feature and not ready for real usage. | 97 // Note: This is still an experimental feature and not ready for real usage. |
97 int min_bitrate_bps = -1; | 98 int min_bitrate_bps = -1; |
98 int max_bitrate_bps = -1; | 99 int max_bitrate_bps = -1; |
99 | 100 |
100 // Defines whether to turn on audio network adaptor, and defines its config | 101 // Defines whether to turn on audio network adaptor, and defines its config |
101 // string. | 102 // string. |
102 rtc::Optional<std::string> audio_network_adaptor_config; | 103 rtc::Optional<std::string> audio_network_adaptor_config; |
103 | 104 |
104 struct SendCodecSpec { | 105 struct SendCodecSpec { |
105 SendCodecSpec(); | 106 SendCodecSpec(); |
107 ~SendCodecSpec(); | |
106 std::string ToString() const; | 108 std::string ToString() const; |
107 | 109 |
108 bool operator==(const SendCodecSpec& rhs) const; | 110 bool operator==(const SendCodecSpec& rhs) const; |
109 bool operator!=(const SendCodecSpec& rhs) const { | 111 bool operator!=(const SendCodecSpec& rhs) const { |
110 return !(*this == rhs); | 112 return !(*this == rhs); |
111 } | 113 } |
112 | 114 |
113 bool nack_enabled = false; | 115 bool nack_enabled = false; |
114 bool transport_cc_enabled = false; | 116 bool transport_cc_enabled = false; |
115 bool enable_codec_fec = false; | |
116 bool enable_opus_dtx = false; | |
117 int opus_max_playback_rate = 0; | |
118 int cng_payload_type = -1; | 117 int cng_payload_type = -1; |
119 int cng_plfreq = -1; | 118 int payload_type; |
the sun
2017/03/16 08:48:19
default init
ossu
2017/03/20 18:19:48
It's now required by the constructor.
| |
120 int max_ptime_ms = -1; | 119 SdpAudioFormat format; |
121 int min_ptime_ms = -1; | 120 rtc::Optional<int> target_bitrate_bps; |
kwiberg-webrtc
2017/03/01 12:26:47
Does an unset value mean default bitrate?
ossu
2017/03/02 01:30:28
Yes. I'll add a comment clarifying that.
| |
122 webrtc::CodecInst codec_inst; | |
123 } send_codec_spec; | 121 } send_codec_spec; |
122 | |
123 rtc::scoped_refptr<AudioEncoderFactory> encoder_factory; | |
124 }; | 124 }; |
125 | 125 |
126 // Starts stream activity. | 126 // Starts stream activity. |
127 // When a stream is active, it can receive, process and deliver packets. | 127 // When a stream is active, it can receive, process and deliver packets. |
128 virtual void Start() = 0; | 128 virtual void Start() = 0; |
129 // Stops stream activity. | 129 // Stops stream activity. |
130 // When a stream is stopped, it can't receive, process or deliver packets. | 130 // When a stream is stopped, it can't receive, process or deliver packets. |
131 virtual void Stop() = 0; | 131 virtual void Stop() = 0; |
132 | 132 |
133 // TODO(solenberg): Make payload_type a config property instead. | 133 // TODO(solenberg): Make payload_type a config property instead. |
134 virtual bool SendTelephoneEvent(int payload_type, int payload_frequency, | 134 virtual bool SendTelephoneEvent(int payload_type, int payload_frequency, |
135 int event, int duration_ms) = 0; | 135 int event, int duration_ms) = 0; |
136 | 136 |
137 virtual void SetMuted(bool muted) = 0; | 137 virtual void SetMuted(bool muted) = 0; |
138 | 138 |
139 virtual Stats GetStats() const = 0; | 139 virtual Stats GetStats() const = 0; |
140 | 140 |
141 protected: | 141 protected: |
142 virtual ~AudioSendStream() {} | 142 virtual ~AudioSendStream() {} |
143 }; | 143 }; |
144 } // namespace webrtc | 144 } // namespace webrtc |
145 | 145 |
146 #endif // WEBRTC_CALL_AUDIO_SEND_STREAM_H_ | 146 #endif // WEBRTC_CALL_AUDIO_SEND_STREAM_H_ |
OLD | NEW |