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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2710493008: Recreate WebrtcVideoSendStream if screen content setting is changed. (Closed)
Patch Set: Removed diff not intended to be part of this cl Created 3 years, 10 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 10
(...skipping 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1605 rtc::VideoSourceInterface<webrtc::VideoFrame>* source) { 1605 rtc::VideoSourceInterface<webrtc::VideoFrame>* source) {
1606 TRACE_EVENT0("webrtc", "WebRtcVideoSendStream::SetVideoSend"); 1606 TRACE_EVENT0("webrtc", "WebRtcVideoSendStream::SetVideoSend");
1607 RTC_DCHECK_RUN_ON(&thread_checker_); 1607 RTC_DCHECK_RUN_ON(&thread_checker_);
1608 1608
1609 // Ignore |options| pointer if |enable| is false. 1609 // Ignore |options| pointer if |enable| is false.
1610 bool options_present = enable && options; 1610 bool options_present = enable && options;
1611 1611
1612 if (options_present) { 1612 if (options_present) {
1613 VideoOptions old_options = parameters_.options; 1613 VideoOptions old_options = parameters_.options;
1614 parameters_.options.SetAll(*options); 1614 parameters_.options.SetAll(*options);
1615 if (parameters_.options != old_options) { 1615 if (parameters_.options.is_screencast.value_or(false) !=
1616 old_options.is_screencast.value_or(false)) {
1617 // If screen content settings change, we may need to recreate the
1618 // stream so that the correct encoder is created.
pthatcher1 2017/02/21 23:00:34 This could use a little more detail about why it's
1619 RecreateWebRtcStream();
1620 } else {
pthatcher1 2017/02/21 23:00:34 Shouldn't this be "else if (parameters_.options !=
Taylor Brandstetter 2017/02/22 00:27:24 +1
sprang_webrtc 2017/02/22 15:53:04 Yes, I screwed up copy/paste from a chromium check
1616 ReconfigureEncoder(); 1621 ReconfigureEncoder();
1617 } 1622 }
1618 } 1623 }
1619 1624
1620 if (source_ && stream_) { 1625 if (source_ && stream_) {
1621 stream_->SetSource( 1626 stream_->SetSource(
1622 nullptr, webrtc::VideoSendStream::DegradationPreference::kBalanced); 1627 nullptr, webrtc::VideoSendStream::DegradationPreference::kBalanced);
1623 } 1628 }
1624 // Switch to the new source. 1629 // Switch to the new source.
1625 source_ = source; 1630 source_ = source;
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 rtx_mapping[video_codecs[i].codec.id] != 2532 rtx_mapping[video_codecs[i].codec.id] !=
2528 ulpfec_config.red_payload_type) { 2533 ulpfec_config.red_payload_type) {
2529 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2534 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2530 } 2535 }
2531 } 2536 }
2532 2537
2533 return video_codecs; 2538 return video_codecs;
2534 } 2539 }
2535 2540
2536 } // namespace cricket 2541 } // namespace cricket
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