OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 <string.h> | 11 #include <string.h> |
12 #include <algorithm> | 12 #include <algorithm> |
13 #include <map> | 13 #include <map> |
14 #include <memory> | 14 #include <memory> |
15 #include <set> | 15 #include <set> |
16 #include <utility> | 16 #include <utility> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "webrtc/audio/audio_receive_stream.h" | 19 #include "webrtc/audio/audio_receive_stream.h" |
20 #include "webrtc/audio/audio_send_stream.h" | 20 #include "webrtc/audio/audio_send_stream.h" |
21 #include "webrtc/audio/audio_state.h" | 21 #include "webrtc/audio/audio_state.h" |
22 #include "webrtc/audio/scoped_voe_interface.h" | 22 #include "webrtc/audio/scoped_voe_interface.h" |
23 #include "webrtc/base/basictypes.h" | 23 #include "webrtc/base/basictypes.h" |
24 #include "webrtc/base/checks.h" | 24 #include "webrtc/base/checks.h" |
25 #include "webrtc/base/constructormagic.h" | 25 #include "webrtc/base/constructormagic.h" |
| 26 #include "webrtc/base/location.h" |
26 #include "webrtc/base/logging.h" | 27 #include "webrtc/base/logging.h" |
27 #include "webrtc/base/optional.h" | 28 #include "webrtc/base/optional.h" |
28 #include "webrtc/base/task_queue.h" | 29 #include "webrtc/base/task_queue.h" |
29 #include "webrtc/base/thread_annotations.h" | 30 #include "webrtc/base/thread_annotations.h" |
30 #include "webrtc/base/thread_checker.h" | 31 #include "webrtc/base/thread_checker.h" |
31 #include "webrtc/base/trace_event.h" | 32 #include "webrtc/base/trace_event.h" |
32 #include "webrtc/call/bitrate_allocator.h" | 33 #include "webrtc/call/bitrate_allocator.h" |
33 #include "webrtc/call/call.h" | 34 #include "webrtc/call/call.h" |
34 #include "webrtc/call/flexfec_receive_stream_impl.h" | 35 #include "webrtc/call/flexfec_receive_stream_impl.h" |
35 #include "webrtc/config.h" | 36 #include "webrtc/config.h" |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 Trace::CreateTrace(); | 349 Trace::CreateTrace(); |
349 call_stats_->RegisterStatsObserver(congestion_controller_.get()); | 350 call_stats_->RegisterStatsObserver(congestion_controller_.get()); |
350 | 351 |
351 congestion_controller_->SignalNetworkState(kNetworkDown); | 352 congestion_controller_->SignalNetworkState(kNetworkDown); |
352 congestion_controller_->SetBweBitrates( | 353 congestion_controller_->SetBweBitrates( |
353 config_.bitrate_config.min_bitrate_bps, | 354 config_.bitrate_config.min_bitrate_bps, |
354 config_.bitrate_config.start_bitrate_bps, | 355 config_.bitrate_config.start_bitrate_bps, |
355 config_.bitrate_config.max_bitrate_bps); | 356 config_.bitrate_config.max_bitrate_bps); |
356 | 357 |
357 module_process_thread_->Start(); | 358 module_process_thread_->Start(); |
358 module_process_thread_->RegisterModule(call_stats_.get()); | 359 module_process_thread_->RegisterModule(call_stats_.get(), RTC_FROM_HERE); |
359 module_process_thread_->RegisterModule(congestion_controller_.get()); | 360 module_process_thread_->RegisterModule(congestion_controller_.get(), |
360 pacer_thread_->RegisterModule(congestion_controller_->pacer()); | 361 RTC_FROM_HERE); |
| 362 pacer_thread_->RegisterModule(congestion_controller_->pacer(), RTC_FROM_HERE); |
361 pacer_thread_->RegisterModule( | 363 pacer_thread_->RegisterModule( |
362 congestion_controller_->GetRemoteBitrateEstimator(true)); | 364 congestion_controller_->GetRemoteBitrateEstimator(true), RTC_FROM_HERE); |
363 pacer_thread_->Start(); | 365 pacer_thread_->Start(); |
364 } | 366 } |
365 | 367 |
366 Call::~Call() { | 368 Call::~Call() { |
367 RTC_DCHECK(!remb_.InUse()); | 369 RTC_DCHECK(!remb_.InUse()); |
368 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 370 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
369 | 371 |
370 RTC_CHECK(audio_send_ssrcs_.empty()); | 372 RTC_CHECK(audio_send_ssrcs_.empty()); |
371 RTC_CHECK(video_send_ssrcs_.empty()); | 373 RTC_CHECK(video_send_ssrcs_.empty()); |
372 RTC_CHECK(video_send_streams_.empty()); | 374 RTC_CHECK(video_send_streams_.empty()); |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1285 if (media_type != MediaType::AUDIO || | 1287 if (media_type != MediaType::AUDIO || |
1286 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { | 1288 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { |
1287 congestion_controller_->OnReceivedPacket( | 1289 congestion_controller_->OnReceivedPacket( |
1288 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), | 1290 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), |
1289 header); | 1291 header); |
1290 } | 1292 } |
1291 } | 1293 } |
1292 | 1294 |
1293 } // namespace internal | 1295 } // namespace internal |
1294 } // namespace webrtc | 1296 } // namespace webrtc |
OLD | NEW |