Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 2918143003: Set overuse detector max frame interval based on target frame rate. (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/overuse_frame_detector_unittest.cc ('k') | webrtc/video/vie_encoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 VideoSendStream::Config config, 625 VideoSendStream::Config config,
626 VideoEncoderConfig encoder_config, 626 VideoEncoderConfig encoder_config,
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(
636 num_cpu_cores, &stats_proxy_, config_.encoder_settings, 636 new ViEEncoder(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 std::unique_ptr<OveruseFrameDetector>()));
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, transport, bitrate_allocator, 641 module_process_thread, call_stats, transport, bitrate_allocator,
641 send_delay_stats, event_log, &config_, 642 send_delay_stats, 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 std::min(config_->rtp.max_packet_size, 1341 std::min(config_->rtp.max_packet_size,
1341 kPathMTU - transport_overhead_bytes_per_packet_); 1342 kPathMTU - transport_overhead_bytes_per_packet_);
1342 1343
1343 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1344 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1344 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1345 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1345 } 1346 }
1346 } 1347 }
1347 1348
1348 } // namespace internal 1349 } // namespace internal
1349 } // namespace webrtc 1350 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/overuse_frame_detector_unittest.cc ('k') | webrtc/video/vie_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698