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

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: Addressed comments, fixed last adaptation fps, fixed unit tests 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
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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 std::min(config_->rtp.max_packet_size, 1337 std::min(config_->rtp.max_packet_size,
1337 kPathMTU - transport_overhead_bytes_per_packet_); 1338 kPathMTU - transport_overhead_bytes_per_packet_);
1338 1339
1339 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1340 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1340 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1341 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1341 } 1342 }
1342 } 1343 }
1343 1344
1344 } // namespace internal 1345 } // namespace internal
1345 } // namespace webrtc 1346 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698