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

Issue 2710493008: Recreate WebrtcVideoSendStream if screen content setting is changed. (Closed)

Created:
3 years, 10 months ago by sprang_webrtc
Modified:
3 years, 9 months ago
CC:
webrtc-reviews_webrtc.org, video-team_agora.io, zhengzhonghou_agora.io, stefan-webrtc, tterriberry_mozilla.com, the sun, mflodman
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Recreate WebrtcVideoSendStream if screen content setting is changed. This avoids the situation where an encoder, not supporting certain screen content settings, is created for a config where screencast is off, and later ReconfigureEncoder() is called updating the configuration but not the encoder instance, causing an inconsistency in the encoder's InitEncode() call. TBR=pthatcher@webrtc.org BUG=webrtc:4172 Review-Url: https://codereview.webrtc.org/2710493008 Cr-Commit-Position: refs/heads/master@{#16921} Committed: https://chromium.googlesource.com/external/webrtc/+/f24a06406a5e0863fee82d6470bb655d3b4ac2af

Patch Set 1 #

Patch Set 2 : Removed diff not intended to be part of this cl #

Total comments: 4

Patch Set 3 : updated tests, SetCodec() instead of Recreate... #

Patch Set 4 : Fix uses of incorrect stream #

Total comments: 28

Patch Set 5 : Updated tests #

Total comments: 4

Patch Set 6 : Comments, add forced codec allocation param #

Patch Set 7 : Fixed race in test, formatting #

Total comments: 6

Patch Set 8 : readability #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -86 lines) Patch
M webrtc/media/engine/fakewebrtcvideoengine.h View 1 2 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.h View 1 2 3 4 5 1 chunk +7 lines, -2 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 1 2 3 4 5 6 7 5 chunks +25 lines, -7 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2_unittest.cc View 1 2 3 4 5 6 chunks +85 lines, -63 lines 0 comments Download
M webrtc/video/video_send_stream.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/video/video_send_stream.cc View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M webrtc/video/video_send_stream_tests.cc View 1 2 3 4 5 6 10 chunks +58 lines, -11 lines 0 comments Download

Messages

Total messages: 57 (33 generated)
sprang_webrtc
3 years, 10 months ago (2017-02-21 17:47:30 UTC) #4
pthatcher1
Unit test? Also, I think Taylor should review it. https://codereview.webrtc.org/2710493008/diff/20001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/2710493008/diff/20001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1618 webrtc/media/engine/webrtcvideoengine2.cc:1618: ...
3 years, 10 months ago (2017-02-21 23:00:34 UTC) #6
Taylor Brandstetter
I agree that a test would be good, assuming the current fake classes support such ...
3 years, 10 months ago (2017-02-22 00:27:24 UTC) #7
sprang_webrtc
Turns out this worked by accident for me. I actually needed to do SetCodec() rather ...
3 years, 10 months ago (2017-02-22 15:53:04 UTC) #12
sprang_webrtc
Turns out this worked by accident for me. I actually needed to do SetCodec() rather ...
3 years, 10 months ago (2017-02-22 15:53:04 UTC) #13
pthatcher1
https://codereview.webrtc.org/2710493008/diff/60001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/2710493008/diff/60001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1617 webrtc/media/engine/webrtcvideoengine2.cc:1617: parameters_.codec_settings) { This needs to test that all the ...
3 years, 10 months ago (2017-02-22 22:24:14 UTC) #18
Taylor Brandstetter
I'm actually not sure I fully understand the bug that's being fixed here. RequiresEncoderReset returns ...
3 years, 10 months ago (2017-02-23 00:46:49 UTC) #19
sprang_webrtc
> I'm actually not sure I fully understand the bug that's being fixed here. > ...
3 years, 10 months ago (2017-02-23 15:10:15 UTC) #22
pthatcher1
https://codereview.webrtc.org/2710493008/diff/60001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/2710493008/diff/60001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1617 webrtc/media/engine/webrtcvideoengine2.cc:1617: parameters_.codec_settings) { On 2017/02/23 00:46:49, Taylor Brandstetter wrote: > ...
3 years, 10 months ago (2017-02-23 21:05:33 UTC) #25
Taylor Brandstetter
Looks good. Would just be nice if the `params["recreate"]` thing could be avoided. https://codereview.webrtc.org/2710493008/diff/60001/webrtc/media/engine/fakewebrtcvideoengine.h File ...
3 years, 10 months ago (2017-02-24 00:13:55 UTC) #26
sprang_webrtc
https://codereview.webrtc.org/2710493008/diff/60001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/2710493008/diff/60001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1617 webrtc/media/engine/webrtcvideoengine2.cc:1617: parameters_.codec_settings) { On 2017/02/23 21:05:33, pthatcher1 wrote: > On ...
3 years, 9 months ago (2017-02-26 13:41:28 UTC) #29
pthatcher1
Just needs little readability improvement. After that, I'll let Taylor be the final word. https://codereview.webrtc.org/2710493008/diff/120001/webrtc/media/engine/webrtcvideoengine2.cc ...
3 years, 9 months ago (2017-02-27 18:30:38 UTC) #36
sprang_webrtc
https://codereview.webrtc.org/2710493008/diff/120001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/2710493008/diff/120001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1591 webrtc/media/engine/webrtcvideoengine2.cc:1591: SetCodec(*codec_settings, false); On 2017/02/27 18:30:38, pthatcher1 wrote: > This ...
3 years, 9 months ago (2017-02-27 19:37:23 UTC) #37
Taylor Brandstetter
lgtm
3 years, 9 months ago (2017-02-27 23:48:22 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2710493008/140001
3 years, 9 months ago (2017-02-28 08:47:54 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/14213)
3 years, 9 months ago (2017-02-28 08:52:24 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2710493008/140001
3 years, 9 months ago (2017-02-28 09:32:48 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/14220)
3 years, 9 months ago (2017-02-28 09:36:18 UTC) #46
sprang_webrtc
Sounded like a had pthatcher@'s approval, but no official stamp yet. +magjed@, can you stamp ...
3 years, 9 months ago (2017-02-28 09:38:18 UTC) #48
sprang_webrtc
ping pthatcher, any further comment?
3 years, 9 months ago (2017-02-28 16:47:30 UTC) #49
sprang_webrtc
Setting pthatcher@ as tbr, as per https://codereview.webrtc.org/2710493008/#msg36, so we can land this.
3 years, 9 months ago (2017-02-28 21:03:42 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2710493008/140001
3 years, 9 months ago (2017-02-28 21:03:57 UTC) #53
commit-bot: I haz the power
Committed patchset #8 (id:140001) as https://chromium.googlesource.com/external/webrtc/+/f24a06406a5e0863fee82d6470bb655d3b4ac2af
3 years, 9 months ago (2017-02-28 21:23:32 UTC) #56
tommi
3 years, 9 months ago (2017-03-01 13:58:25 UTC) #57
Message was sent while issue was closed.
On 2017/02/28 21:23:32, commit-bot: I haz the power wrote:
> Committed patchset #8 (id:140001) as
>
https://chromium.googlesource.com/external/webrtc/+/f24a06406a5e0863fee82d647...

I'm seeing errors on one of the trybots now.  Could there be a race?

https://build.chromium.org/p/tryserver.webrtc/builders/linux_msan/builds/1832...

[ RUN      ] WebRtcVideoEngine2Test.RecreatesEncoderOnContentTypeChange
...
../../webrtc/media/engine/webrtcvideoengine2_unittest.cc:949: Failure
Value of: encoder_factory.encoders().back()->GetCodecSettings().mode
  Actual: 0
Expected: webrtc::kScreensharing
Which is: 1
...
[  FAILED  ] WebRtcVideoEngine2Test.RecreatesEncoderOnContentTypeChange (74 ms)

Powered by Google App Engine
This is Rietveld 408576698