OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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_VOICE_ENGINE_CHANNEL_H_ | 11 #ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 12 #define WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/api/audio/audio_mixer.h" | 16 #include "webrtc/api/audio/audio_mixer.h" |
17 #include "webrtc/api/call/audio_sink.h" | 17 #include "webrtc/api/call/audio_sink.h" |
18 #include "webrtc/base/criticalsection.h" | 18 #include "webrtc/base/criticalsection.h" |
19 #include "webrtc/base/optional.h" | 19 #include "webrtc/base/optional.h" |
20 #include "webrtc/base/thread_checker.h" | 20 #include "webrtc/base/thread_checker.h" |
21 #include "webrtc/common_audio/resampler/include/push_resampler.h" | 21 #include "webrtc/common_audio/resampler/include/push_resampler.h" |
22 #include "webrtc/common_types.h" | 22 #include "webrtc/common_types.h" |
23 #include "webrtc/modules/audio_coding/acm2/codec_manager.h" | 23 #include "webrtc/modules/audio_coding/acm2/codec_manager.h" |
24 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" | 24 #include "webrtc/modules/audio_coding/acm2/rent_a_codec.h" |
25 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" | 25 #include "webrtc/modules/audio_coding/include/audio_coding_module.h" |
26 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d
efines.h" | 26 #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_d
efines.h" |
27 #include "webrtc/modules/audio_processing/rms_level.h" | 27 #include "webrtc/modules/audio_processing/rms_level.h" |
28 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" | 28 #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" |
29 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" | 29 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
| 30 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" |
30 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 31 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
31 #include "webrtc/voice_engine/audio_level.h" | 32 #include "webrtc/voice_engine/audio_level.h" |
32 #include "webrtc/voice_engine/file_player.h" | 33 #include "webrtc/voice_engine/file_player.h" |
33 #include "webrtc/voice_engine/file_recorder.h" | 34 #include "webrtc/voice_engine/file_recorder.h" |
34 #include "webrtc/voice_engine/include/voe_base.h" | 35 #include "webrtc/voice_engine/include/voe_base.h" |
35 #include "webrtc/voice_engine/include/voe_network.h" | 36 #include "webrtc/voice_engine/include/voe_network.h" |
36 #include "webrtc/voice_engine/shared_data.h" | 37 #include "webrtc/voice_engine/shared_data.h" |
37 #include "webrtc/voice_engine/voice_engine_defines.h" | 38 #include "webrtc/voice_engine/voice_engine_defines.h" |
38 | 39 |
39 namespace rtc { | 40 namespace rtc { |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 void OnOverheadChanged(size_t overhead_bytes_per_packet) override; | 382 void OnOverheadChanged(size_t overhead_bytes_per_packet) override; |
382 | 383 |
383 // The existence of this function alongside OnUplinkPacketLossRate is | 384 // The existence of this function alongside OnUplinkPacketLossRate is |
384 // a compromise. We want the encoder to be agnostic of the PLR source, but | 385 // a compromise. We want the encoder to be agnostic of the PLR source, but |
385 // we also don't want it to receive conflicting information from TWCC and | 386 // we also don't want it to receive conflicting information from TWCC and |
386 // from RTCP-XR. | 387 // from RTCP-XR. |
387 void OnTwccBasedUplinkPacketLossRate(float packet_loss_rate); | 388 void OnTwccBasedUplinkPacketLossRate(float packet_loss_rate); |
388 | 389 |
389 void OnRecoverableUplinkPacketLossRate(float recoverable_packet_loss_rate); | 390 void OnRecoverableUplinkPacketLossRate(float recoverable_packet_loss_rate); |
390 | 391 |
| 392 const std::vector<RtpContributingSource>& GetContributingSources() { |
| 393 return rtp_receiver_->GetContributingSources(); |
| 394 } |
| 395 |
391 private: | 396 private: |
392 void OnUplinkPacketLossRate(float packet_loss_rate); | 397 void OnUplinkPacketLossRate(float packet_loss_rate); |
393 | 398 |
394 bool InputMute() const; | 399 bool InputMute() const; |
395 bool OnRtpPacketWithHeader(const uint8_t* received_packet, | 400 bool OnRtpPacketWithHeader(const uint8_t* received_packet, |
396 size_t length, | 401 size_t length, |
397 RTPHeader *header); | 402 RTPHeader *header); |
398 bool ReceivePacket(const uint8_t* packet, | 403 bool ReceivePacket(const uint8_t* packet, |
399 size_t packet_length, | 404 size_t packet_length, |
400 const RTPHeader& header, | 405 const RTPHeader& header, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 523 |
519 rtc::ThreadChecker construction_thread_; | 524 rtc::ThreadChecker construction_thread_; |
520 | 525 |
521 const bool use_twcc_plr_for_ana_; | 526 const bool use_twcc_plr_for_ana_; |
522 }; | 527 }; |
523 | 528 |
524 } // namespace voe | 529 } // namespace voe |
525 } // namespace webrtc | 530 } // namespace webrtc |
526 | 531 |
527 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ | 532 #endif // WEBRTC_VOICE_ENGINE_CHANNEL_H_ |
OLD | NEW |