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

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

Issue 2625893004: Signal target bitrate only for screenshare streams (Closed)
Patch Set: 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 | « no previous file | 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 if (encoder_config.content_type == VideoEncoderConfig::ContentType::kScreen) {
621 // Only signal target bitrate for screenshare streams, for now.
danilchap 2017/01/12 11:27:57 Can you write a TODO when it should be turned on f
sprang_webrtc 2017/01/12 11:52:14 Done.
622 vie_encoder_->SetBitrateObserver(send_stream_.get());
623 }
621 vie_encoder_->RegisterProcessThread(module_process_thread); 624 vie_encoder_->RegisterProcessThread(module_process_thread);
622 625
623 ReconfigureVideoEncoder(std::move(encoder_config)); 626 ReconfigureVideoEncoder(std::move(encoder_config));
624 } 627 }
625 628
626 VideoSendStream::~VideoSendStream() { 629 VideoSendStream::~VideoSendStream() {
627 RTC_DCHECK_RUN_ON(&thread_checker_); 630 RTC_DCHECK_RUN_ON(&thread_checker_);
628 RTC_DCHECK(!send_stream_); 631 RTC_DCHECK(!send_stream_);
629 } 632 }
630 633
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 std::min(config_->rtp.max_packet_size, 1297 std::min(config_->rtp.max_packet_size,
1295 kPathMTU - transport_overhead_bytes_per_packet_); 1298 kPathMTU - transport_overhead_bytes_per_packet_);
1296 1299
1297 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1300 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1298 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1301 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1299 } 1302 }
1300 } 1303 }
1301 1304
1302 } // namespace internal 1305 } // namespace internal
1303 } // namespace webrtc 1306 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698