| 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 #include "webrtc/video/video_send_stream.h" | 10 #include "webrtc/video/video_send_stream.h" | 
| 11 | 11 | 
| 12 #include <algorithm> | 12 #include <algorithm> | 
| 13 #include <cmath> | 13 #include <cmath> | 
| 14 #include <sstream> | 14 #include <sstream> | 
| 15 #include <string> | 15 #include <string> | 
| 16 #include <utility> | 16 #include <utility> | 
| 17 #include <vector> | 17 #include <vector> | 
| 18 | 18 | 
| 19 #include "webrtc/common_types.h" |  | 
| 20 #include "webrtc/common_video/include/video_bitrate_allocator.h" |  | 
| 21 #include "webrtc/base/checks.h" | 19 #include "webrtc/base/checks.h" | 
| 22 #include "webrtc/base/file.h" | 20 #include "webrtc/base/file.h" | 
|  | 21 #include "webrtc/base/location.h" | 
| 23 #include "webrtc/base/logging.h" | 22 #include "webrtc/base/logging.h" | 
| 24 #include "webrtc/base/trace_event.h" | 23 #include "webrtc/base/trace_event.h" | 
| 25 #include "webrtc/base/weak_ptr.h" | 24 #include "webrtc/base/weak_ptr.h" | 
|  | 25 #include "webrtc/common_types.h" | 
|  | 26 #include "webrtc/common_video/include/video_bitrate_allocator.h" | 
| 26 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 27 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" | 
| 27 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" | 28 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" | 
| 28 #include "webrtc/modules/pacing/packet_router.h" | 29 #include "webrtc/modules/pacing/packet_router.h" | 
| 29 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 30 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" | 
| 30 #include "webrtc/modules/utility/include/process_thread.h" | 31 #include "webrtc/modules/utility/include/process_thread.h" | 
| 31 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h" | 32 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h" | 
| 32 #include "webrtc/system_wrappers/include/field_trial.h" | 33 #include "webrtc/system_wrappers/include/field_trial.h" | 
| 33 #include "webrtc/video/call_stats.h" | 34 #include "webrtc/video/call_stats.h" | 
| 34 #include "webrtc/video/vie_remb.h" | 35 #include "webrtc/video/vie_remb.h" | 
| 35 #include "webrtc/video_send_stream.h" | 36 #include "webrtc/video_send_stream.h" | 
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 876   vie_encoder_->SetSink(this, rotation_applied); | 877   vie_encoder_->SetSink(this, rotation_applied); | 
| 877 } | 878 } | 
| 878 | 879 | 
| 879 void VideoSendStreamImpl::RegisterProcessThread( | 880 void VideoSendStreamImpl::RegisterProcessThread( | 
| 880     ProcessThread* module_process_thread) { | 881     ProcessThread* module_process_thread) { | 
| 881   RTC_DCHECK_RUN_ON(&module_process_thread_checker_); | 882   RTC_DCHECK_RUN_ON(&module_process_thread_checker_); | 
| 882   RTC_DCHECK(!module_process_thread_); | 883   RTC_DCHECK(!module_process_thread_); | 
| 883   module_process_thread_ = module_process_thread; | 884   module_process_thread_ = module_process_thread; | 
| 884 | 885 | 
| 885   for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 886   for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 
| 886     module_process_thread_->RegisterModule(rtp_rtcp); | 887     module_process_thread_->RegisterModule(rtp_rtcp, RTC_FROM_HERE); | 
| 887 } | 888 } | 
| 888 | 889 | 
| 889 void VideoSendStreamImpl::DeRegisterProcessThread() { | 890 void VideoSendStreamImpl::DeRegisterProcessThread() { | 
| 890   RTC_DCHECK_RUN_ON(&module_process_thread_checker_); | 891   RTC_DCHECK_RUN_ON(&module_process_thread_checker_); | 
| 891   for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 892   for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 
| 892     module_process_thread_->DeRegisterModule(rtp_rtcp); | 893     module_process_thread_->DeRegisterModule(rtp_rtcp); | 
| 893 } | 894 } | 
| 894 | 895 | 
| 895 VideoSendStreamImpl::~VideoSendStreamImpl() { | 896 VideoSendStreamImpl::~VideoSendStreamImpl() { | 
| 896   RTC_DCHECK_RUN_ON(worker_queue_); | 897   RTC_DCHECK_RUN_ON(worker_queue_); | 
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1337       std::min(config_->rtp.max_packet_size, | 1338       std::min(config_->rtp.max_packet_size, | 
| 1338                kPathMTU - transport_overhead_bytes_per_packet_); | 1339                kPathMTU - transport_overhead_bytes_per_packet_); | 
| 1339 | 1340 | 
| 1340   for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1341   for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 
| 1341     rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 1342     rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 
| 1342   } | 1343   } | 
| 1343 } | 1344 } | 
| 1344 | 1345 | 
| 1345 }  // namespace internal | 1346 }  // namespace internal | 
| 1346 }  // namespace webrtc | 1347 }  // namespace webrtc | 
| OLD | NEW | 
|---|