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

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

Issue 2625893004: Signal target bitrate only for screenshare streams (Closed)
Patch Set: Renamed parameter Created 3 years, 11 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/end_to_end_tests.cc ('k') | no next file » | 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 &send_stream_, &thread_sync_event_, &stats_proxy_, vie_encoder_.get(), 610 &send_stream_, &thread_sync_event_, &stats_proxy_, vie_encoder_.get(),
611 module_process_thread, call_stats, congestion_controller, packet_router, 611 module_process_thread, call_stats, congestion_controller, packet_router,
612 bitrate_allocator, send_delay_stats, remb, event_log, &config_, 612 bitrate_allocator, send_delay_stats, remb, event_log, &config_,
613 encoder_config.max_bitrate_bps, suspended_ssrcs))); 613 encoder_config.max_bitrate_bps, suspended_ssrcs)));
614 614
615 // Wait for ConstructionTask to complete so that |send_stream_| can be used. 615 // Wait for ConstructionTask to complete so that |send_stream_| can be used.
616 // |module_process_thread| must be registered and deregistered on the thread 616 // |module_process_thread| must be registered and deregistered on the thread
617 // it was created on. 617 // it was created on.
618 thread_sync_event_.Wait(rtc::Event::kForever); 618 thread_sync_event_.Wait(rtc::Event::kForever);
619 send_stream_->RegisterProcessThread(module_process_thread); 619 send_stream_->RegisterProcessThread(module_process_thread);
620 vie_encoder_->SetBitrateObserver(send_stream_.get()); 620 // TODO(sprang): Enable this also for regular video calls if it works well.
621 if (encoder_config.content_type == VideoEncoderConfig::ContentType::kScreen) {
622 // Only signal target bitrate for screenshare streams, for now.
623 vie_encoder_->SetBitrateObserver(send_stream_.get());
624 }
621 vie_encoder_->RegisterProcessThread(module_process_thread); 625 vie_encoder_->RegisterProcessThread(module_process_thread);
622 626
623 ReconfigureVideoEncoder(std::move(encoder_config)); 627 ReconfigureVideoEncoder(std::move(encoder_config));
624 } 628 }
625 629
626 VideoSendStream::~VideoSendStream() { 630 VideoSendStream::~VideoSendStream() {
627 RTC_DCHECK_RUN_ON(&thread_checker_); 631 RTC_DCHECK_RUN_ON(&thread_checker_);
628 RTC_DCHECK(!send_stream_); 632 RTC_DCHECK(!send_stream_);
629 } 633 }
630 634
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 std::min(config_->rtp.max_packet_size, 1298 std::min(config_->rtp.max_packet_size,
1295 kPathMTU - transport_overhead_bytes_per_packet_); 1299 kPathMTU - transport_overhead_bytes_per_packet_);
1296 1300
1297 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1301 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1298 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1302 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1299 } 1303 }
1300 } 1304 }
1301 1305
1302 } // namespace internal 1306 } // namespace internal
1303 } // namespace webrtc 1307 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698