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 |
11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 11 #ifndef WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 12 #define WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <memory> | 15 #include <memory> |
16 #include <string> | 16 #include <string> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
| 19 #include "webrtc/api/rtpreceiverinterface.h" |
19 #include "webrtc/base/buffer.h" | 20 #include "webrtc/base/buffer.h" |
20 #include "webrtc/base/constructormagic.h" | 21 #include "webrtc/base/constructormagic.h" |
21 #include "webrtc/base/networkroute.h" | 22 #include "webrtc/base/networkroute.h" |
22 #include "webrtc/base/scoped_ref_ptr.h" | 23 #include "webrtc/base/scoped_ref_ptr.h" |
23 #include "webrtc/base/thread_checker.h" | 24 #include "webrtc/base/thread_checker.h" |
24 #include "webrtc/call/audio_state.h" | 25 #include "webrtc/call/audio_state.h" |
25 #include "webrtc/call/call.h" | 26 #include "webrtc/call/call.h" |
26 #include "webrtc/config.h" | 27 #include "webrtc/config.h" |
27 #include "webrtc/media/base/rtputils.h" | 28 #include "webrtc/media/base/rtputils.h" |
28 #include "webrtc/media/engine/apm_helpers.h" | 29 #include "webrtc/media/engine/apm_helpers.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 void OnReadyToSend(bool ready) override; | 204 void OnReadyToSend(bool ready) override; |
204 void OnTransportOverheadChanged(int transport_overhead_per_packet) override; | 205 void OnTransportOverheadChanged(int transport_overhead_per_packet) override; |
205 bool GetStats(VoiceMediaInfo* info) override; | 206 bool GetStats(VoiceMediaInfo* info) override; |
206 | 207 |
207 // SSRC=0 will set the audio sink on the latest unsignaled stream, future or | 208 // SSRC=0 will set the audio sink on the latest unsignaled stream, future or |
208 // current. Only one stream at a time will use the sink. | 209 // current. Only one stream at a time will use the sink. |
209 void SetRawAudioSink( | 210 void SetRawAudioSink( |
210 uint32_t ssrc, | 211 uint32_t ssrc, |
211 std::unique_ptr<webrtc::AudioSinkInterface> sink) override; | 212 std::unique_ptr<webrtc::AudioSinkInterface> sink) override; |
212 | 213 |
| 214 std::vector<webrtc::RtpSource> GetSources(uint32_t ssrc) const; |
| 215 |
213 // implements Transport interface | 216 // implements Transport interface |
214 bool SendRtp(const uint8_t* data, | 217 bool SendRtp(const uint8_t* data, |
215 size_t len, | 218 size_t len, |
216 const webrtc::PacketOptions& options) override { | 219 const webrtc::PacketOptions& options) override { |
217 rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen); | 220 rtc::CopyOnWriteBuffer packet(data, len, kMaxRtpPacketLen); |
218 rtc::PacketOptions rtc_options; | 221 rtc::PacketOptions rtc_options; |
219 rtc_options.packet_id = options.packet_id; | 222 rtc_options.packet_id = options.packet_id; |
220 return VoiceMediaChannel::SendPacket(&packet, rtc_options); | 223 return VoiceMediaChannel::SendPacket(&packet, rtc_options); |
221 } | 224 } |
222 | 225 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; | 291 std::map<uint32_t, WebRtcAudioReceiveStream*> recv_streams_; |
289 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 292 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
290 | 293 |
291 webrtc::AudioSendStream::Config::SendCodecSpec send_codec_spec_; | 294 webrtc::AudioSendStream::Config::SendCodecSpec send_codec_spec_; |
292 | 295 |
293 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); | 296 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcVoiceMediaChannel); |
294 }; | 297 }; |
295 } // namespace cricket | 298 } // namespace cricket |
296 | 299 |
297 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ | 300 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVOICEENGINE_H_ |
OLD | NEW |