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" |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 const std::map<uint32_t, RtpState>& suspended_ssrcs) | 627 const std::map<uint32_t, RtpState>& suspended_ssrcs) |
628 : worker_queue_(worker_queue), | 628 : worker_queue_(worker_queue), |
629 thread_sync_event_(false /* manual_reset */, false), | 629 thread_sync_event_(false /* manual_reset */, false), |
630 stats_proxy_(Clock::GetRealTimeClock(), | 630 stats_proxy_(Clock::GetRealTimeClock(), |
631 config, | 631 config, |
632 encoder_config.content_type), | 632 encoder_config.content_type), |
633 config_(std::move(config)), | 633 config_(std::move(config)), |
634 content_type_(encoder_config.content_type) { | 634 content_type_(encoder_config.content_type) { |
635 vie_encoder_.reset(new ViEEncoder( | 635 vie_encoder_.reset(new ViEEncoder( |
636 num_cpu_cores, &stats_proxy_, config_.encoder_settings, | 636 num_cpu_cores, &stats_proxy_, config_.encoder_settings, |
637 config_.pre_encode_callback, config_.post_encode_callback)); | 637 config_.pre_encode_callback, config_.post_encode_callback, |
| 638 content_type_)); |
638 worker_queue_->PostTask(std::unique_ptr<rtc::QueuedTask>(new ConstructionTask( | 639 worker_queue_->PostTask(std::unique_ptr<rtc::QueuedTask>(new ConstructionTask( |
639 &send_stream_, &thread_sync_event_, &stats_proxy_, vie_encoder_.get(), | 640 &send_stream_, &thread_sync_event_, &stats_proxy_, vie_encoder_.get(), |
640 module_process_thread, call_stats, congestion_controller, packet_router, | 641 module_process_thread, call_stats, congestion_controller, packet_router, |
641 bitrate_allocator, send_delay_stats, remb, event_log, &config_, | 642 bitrate_allocator, send_delay_stats, remb, event_log, &config_, |
642 encoder_config.max_bitrate_bps, suspended_ssrcs))); | 643 encoder_config.max_bitrate_bps, suspended_ssrcs))); |
643 | 644 |
644 // Wait for ConstructionTask to complete so that |send_stream_| can be used. | 645 // Wait for ConstructionTask to complete so that |send_stream_| can be used. |
645 // |module_process_thread| must be registered and deregistered on the thread | 646 // |module_process_thread| must be registered and deregistered on the thread |
646 // it was created on. | 647 // it was created on. |
647 thread_sync_event_.Wait(rtc::Event::kForever); | 648 thread_sync_event_.Wait(rtc::Event::kForever); |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 std::min(config_->rtp.max_packet_size, | 1342 std::min(config_->rtp.max_packet_size, |
1342 kPathMTU - transport_overhead_bytes_per_packet_); | 1343 kPathMTU - transport_overhead_bytes_per_packet_); |
1343 | 1344 |
1344 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { | 1345 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
1345 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); | 1346 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); |
1346 } | 1347 } |
1347 } | 1348 } |
1348 | 1349 |
1349 } // namespace internal | 1350 } // namespace internal |
1350 } // namespace webrtc | 1351 } // namespace webrtc |
OLD | NEW |