| 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 #include "webrtc/audio/audio_send_stream.h" | 11 #include "webrtc/audio/audio_send_stream.h" |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include "webrtc/audio/audio_state.h" | 15 #include "webrtc/audio/audio_state.h" |
| 16 #include "webrtc/audio/conversion.h" | 16 #include "webrtc/audio/conversion.h" |
| 17 #include "webrtc/audio/scoped_voe_interface.h" | 17 #include "webrtc/audio/scoped_voe_interface.h" |
| 18 #include "webrtc/base/checks.h" | 18 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/base/event.h" | 19 #include "webrtc/base/event.h" |
| 20 #include "webrtc/base/logging.h" | 20 #include "webrtc/base/logging.h" |
| 21 #include "webrtc/base/task_queue.h" | 21 #include "webrtc/base/task_queue.h" |
| 22 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 22 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" |
| 23 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" | 23 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont
roller.h" |
| 24 #include "webrtc/modules/pacing/paced_sender.h" | 24 #include "webrtc/modules/pacing/paced_sender.h" |
| 25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
| 26 #include "webrtc/voice_engine/channel_proxy.h" | 26 #include "webrtc/voice_engine/channel_proxy.h" |
| 27 #include "webrtc/voice_engine/include/voe_base.h" | 27 #include "webrtc/voice_engine/include/voe_base.h" |
| 28 #include "webrtc/voice_engine/transmit_mixer.h" | 28 #include "webrtc/voice_engine/transmit_mixer.h" |
| 29 #include "webrtc/voice_engine/voice_engine_impl.h" | 29 #include "webrtc/voice_engine/voice_engine_impl.h" |
| 30 | 30 |
| 31 namespace webrtc { | 31 namespace webrtc { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 constexpr char kOpusCodecName[] = "opus"; | 35 constexpr char kOpusCodecName[] = "opus"; |
| 36 | 36 |
| 37 bool IsCodec(const webrtc::CodecInst& codec, const char* ref_name) { | 37 bool IsCodec(const webrtc::CodecInst& codec, const char* ref_name) { |
| 38 return (STR_CASE_CMP(codec.plname, ref_name) == 0); | 38 return (STR_CASE_CMP(codec.plname, ref_name) == 0); |
| 39 } | 39 } |
| 40 } // namespace | 40 } // namespace |
| 41 | 41 |
| 42 namespace internal { | 42 namespace internal { |
| 43 AudioSendStream::AudioSendStream( | 43 AudioSendStream::AudioSendStream( |
| 44 const webrtc::AudioSendStream::Config& config, | 44 const webrtc::AudioSendStream::Config& config, |
| 45 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, | 45 const rtc::scoped_refptr<webrtc::AudioState>& audio_state, |
| 46 rtc::TaskQueue* worker_queue, | 46 rtc::TaskQueue* worker_queue, |
| 47 PacketRouter* packet_router, | 47 PacketRouter* packet_router, |
| 48 CongestionController* congestion_controller, | 48 SendSideCongestionController* congestion_controller, |
| 49 BitrateAllocator* bitrate_allocator, | 49 BitrateAllocator* bitrate_allocator, |
| 50 RtcEventLog* event_log, | 50 RtcEventLog* event_log, |
| 51 RtcpRttStats* rtcp_rtt_stats) | 51 RtcpRttStats* rtcp_rtt_stats) |
| 52 : worker_queue_(worker_queue), | 52 : worker_queue_(worker_queue), |
| 53 config_(config), | 53 config_(config), |
| 54 audio_state_(audio_state), | 54 audio_state_(audio_state), |
| 55 bitrate_allocator_(bitrate_allocator), | 55 bitrate_allocator_(bitrate_allocator), |
| 56 congestion_controller_(congestion_controller) { | 56 congestion_controller_(congestion_controller) { |
| 57 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); | 57 LOG(LS_INFO) << "AudioSendStream: " << config_.ToString(); |
| 58 RTC_DCHECK_NE(config_.voe_channel_id, -1); | 58 RTC_DCHECK_NE(config_.voe_channel_id, -1); |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 LOG(LS_WARNING) << "SetVADStatus() failed."; | 373 LOG(LS_WARNING) << "SetVADStatus() failed."; |
| 374 return false; | 374 return false; |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 } | 377 } |
| 378 return true; | 378 return true; |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace internal | 381 } // namespace internal |
| 382 } // namespace webrtc | 382 } // namespace webrtc |
| OLD | NEW |