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

Issue 1711763003: New flag is_screencast in VideoOptions. (Closed)

Created:
4 years, 10 months ago by nisse-webrtc
Modified:
4 years, 9 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

New flag is_screencast in VideoOptions. This cl copies the value of cricket::VideoCapturer::IsScreencast into a flag in VideoOptions. It is passed on via the chain VideortpSender::SetVideoSend WebRtcVideoChannel2::SetVideoSend WebRtcVideoChannel2::SetOptions WebRtcVideoChannel2::WebRtcVideoSendStream::SetOptions Where it's used, in WebRtcVideoChannel2::WebRtcVideoSendStream::OnFrame, we can look it up in parameters_, instead of calling capturer_->IsScreencast(). Doesn't touch screencast logic related to cpu adaptation, since that code is in flux in a different cl. Also drop the is_screencast flag from the Dimensions struct, and drop separate options argument from ConfigureVideoEncoderSettings and SetCodecAndOptions, instead always using the options recorded in VideoSendStreamParameters::options. In the tests, changed FakeVideoCapturer::is_screencast to be a construction time flag. Generally, unittests of screencast have to both use a capturer configured for screencast, and set the screencast flag using SetSendParameters. Since the automatic connection via VideoSource and VideoRtpSender isn't involved in the unit tests. Note that using SetSendParameters to set the screencast flag doesn't make sense, since it's not per-stream. SetVideoSend would be more appropriate. That should be fixed if/when we drop VideoOptions from SetSendParameters. BUG=webrtc:5426 R=pbos@webrtc.org, perkj@webrtc.org, pthatcher@webrtc.org Committed: https://crrev.com/60653ba3cc58aecdff594a1f72cfaefbad9c407b Cr-Commit-Position: refs/heads/master@{#11837}

Patch Set 1 #

Patch Set 2 : Drop is_screencast from Dimensions struct and ConfigureVideoEncoderSettings arg list. #

Patch Set 3 : Fix tests. Drop separate option argument from ConfigureVideoEncoderSettings and SetCodecAndOptions. #

Patch Set 4 : Fix use-after-free of FakeVideoSendStream. #

Total comments: 11

Patch Set 5 : In WebRtcVideoSendStream::SetOptions, modify only options specified by the caller. #

Total comments: 2

Patch Set 6 : Rename testcode capture init methods. #

Total comments: 6

Patch Set 7 : Address pbos' comments.' #

Total comments: 4

Patch Set 8 : Don't recreate send stream on SetOptions. #

Total comments: 2

Patch Set 9 : Rebase. Delete capturer_is_screencast_ flag.' #

Patch Set 10 : Rebase, on top of suspend_below_min_bitrate change. #

Total comments: 6

Patch Set 11 : Fix OnLoadUpdate is_screencast check. Don't set FakeVideoCapturer into screencast mode in the video… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -198 lines) Patch
M webrtc/api/videosource.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/api/videosource_unittest.cc View 1 2 3 4 5 4 chunks +14 lines, -6 lines 0 comments Download
M webrtc/media/base/fakevideocapturer.h View 1 2 3 4 5 6 7 8 4 chunks +5 lines, -6 lines 0 comments Download
M webrtc/media/base/mediachannel.h View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -1 line 0 comments Download
M webrtc/media/base/videocapturer_unittest.cc View 1 2 3 4 5 6 7 8 45 chunks +135 lines, -128 lines 0 comments Download
M webrtc/media/base/videoengine_unittest.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +8 lines, -5 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.h View 1 2 3 4 5 6 7 8 9 4 chunks +3 lines, -7 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 1 2 3 4 5 6 7 8 9 10 16 chunks +26 lines, -28 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2_unittest.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +62 lines, -15 lines 0 comments Download
M webrtc/video/video_send_stream.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 56 (19 generated)
nisse-webrtc
4 years, 10 months ago (2016-02-19 09:53:44 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711763003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711763003/1
4 years, 10 months ago (2016-02-19 09:56:53 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_ubsan_vptr on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_ubsan_vptr/builds/363) win_x64_rel on ...
4 years, 10 months ago (2016-02-19 10:03:44 UTC) #6
nisse-webrtc
Updated version. I notice that some bots fail, not obvious why on first quick look. ...
4 years, 10 months ago (2016-02-19 10:16:28 UTC) #7
nisse-webrtc
Updated version passes local tests.
4 years, 10 months ago (2016-02-19 15:07:34 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711763003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711763003/40001
4 years, 10 months ago (2016-02-19 15:10:47 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_asan on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_asan/builds/12566)
4 years, 10 months ago (2016-02-19 15:29:21 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711763003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711763003/60001
4 years, 10 months ago (2016-02-19 15:55:18 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-19 18:14:27 UTC) #17
pthatcher1
https://codereview.webrtc.org/1711763003/diff/60001/webrtc/api/videosource_unittest.cc File webrtc/api/videosource_unittest.cc (right): https://codereview.webrtc.org/1711763003/diff/60001/webrtc/api/videosource_unittest.cc#newcode119 webrtc/api/videosource_unittest.cc:119: void InitScreencast(bool is_screencast) { Why isn't this just called ...
4 years, 10 months ago (2016-02-20 08:33:00 UTC) #18
perkj_webrtc
https://codereview.webrtc.org/1711763003/diff/60001/webrtc/api/videosource_unittest.cc File webrtc/api/videosource_unittest.cc (right): https://codereview.webrtc.org/1711763003/diff/60001/webrtc/api/videosource_unittest.cc#newcode119 webrtc/api/videosource_unittest.cc:119: void InitScreencast(bool is_screencast) { On 2016/02/20 08:32:59, pthatcher1 wrote: ...
4 years, 10 months ago (2016-02-21 18:09:06 UTC) #19
nisse-webrtc
https://codereview.webrtc.org/1711763003/diff/60001/webrtc/api/videosource_unittest.cc File webrtc/api/videosource_unittest.cc (right): https://codereview.webrtc.org/1711763003/diff/60001/webrtc/api/videosource_unittest.cc#newcode119 webrtc/api/videosource_unittest.cc:119: void InitScreencast(bool is_screencast) { On 2016/02/20 08:32:59, pthatcher1 wrote: ...
4 years, 10 months ago (2016-02-22 07:52:34 UTC) #20
nisse-webrtc
https://codereview.webrtc.org/1711763003/diff/60001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/60001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1670 webrtc/media/engine/webrtcvideoengine2.cc:1670: parameters_.options = options; On 2016/02/22 07:52:34, nisse-webrtc wrote: > ...
4 years, 10 months ago (2016-02-23 13:13:59 UTC) #21
pthatcher1
lgtm But I'd like to see a different name there :). https://codereview.webrtc.org/1711763003/diff/80001/webrtc/api/videosource_unittest.cc File webrtc/api/videosource_unittest.cc (right): ...
4 years, 10 months ago (2016-02-25 06:57:06 UTC) #22
nisse-webrtc
https://codereview.webrtc.org/1711763003/diff/80001/webrtc/api/videosource_unittest.cc File webrtc/api/videosource_unittest.cc (right): https://codereview.webrtc.org/1711763003/diff/80001/webrtc/api/videosource_unittest.cc#newcode119 webrtc/api/videosource_unittest.cc:119: void InitScreencast(bool is_screencast) { On 2016/02/25 06:57:06, pthatcher1 wrote: ...
4 years, 10 months ago (2016-02-25 08:59:35 UTC) #23
perkj_webrtc
lgtm
4 years, 10 months ago (2016-02-25 13:26:24 UTC) #24
pbos-webrtc
lgtm https://codereview.webrtc.org/1711763003/diff/100001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/100001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1731 webrtc/media/engine/webrtcvideoengine2.cc:1731: void WebRtcVideoChannel2::WebRtcVideoSendStream::SetCodecAndOptions( Should this be SetCodecAndApplyOptions or something? ...
4 years, 10 months ago (2016-02-25 14:23:28 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711763003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711763003/100001
4 years, 10 months ago (2016-02-25 14:24:16 UTC) #28
nisse-webrtc
https://codereview.webrtc.org/1711763003/diff/100001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/100001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1731 webrtc/media/engine/webrtcvideoengine2.cc:1731: void WebRtcVideoChannel2::WebRtcVideoSendStream::SetCodecAndOptions( On 2016/02/25 14:23:28, pbos-webrtc wrote: > Should ...
4 years, 10 months ago (2016-02-25 14:56:10 UTC) #30
pbos-webrtc
https://codereview.webrtc.org/1711763003/diff/120001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/120001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1770 webrtc/media/engine/webrtcvideoengine2.cc:1770: << "RecreateWebRtcStream (send) because of SetCodecAndApplyOptions; options=" git cl ...
4 years, 10 months ago (2016-02-25 15:26:28 UTC) #31
nisse-webrtc
https://codereview.webrtc.org/1711763003/diff/120001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/120001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1893 webrtc/media/engine/webrtcvideoengine2.cc:1893: int height) { On 2016/02/25 15:26:28, pbos-webrtc wrote: > ...
4 years, 10 months ago (2016-02-25 16:07:38 UTC) #32
nisse-webrtc
New version. Please have a look at the new testcase, WebRtcVideoChannel2Test.NoRecreateStreamForScreencast, I'm not sure I'm ...
4 years, 10 months ago (2016-02-26 12:28:30 UTC) #33
pbos-webrtc
https://codereview.webrtc.org/1711763003/diff/140001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/140001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1763 webrtc/media/engine/webrtcvideoengine2.cc:1763: parameters_.options.suspend_below_min_bitrate.value_or(false); This one is now ignored through SetOptions currently, ...
4 years, 10 months ago (2016-02-26 13:06:57 UTC) #34
nisse-webrtc
https://codereview.webrtc.org/1711763003/diff/140001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/140001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1763 webrtc/media/engine/webrtcvideoengine2.cc:1763: parameters_.options.suspend_below_min_bitrate.value_or(false); On 2016/02/26 13:06:57, pbos-webrtc wrote: > This one ...
4 years, 10 months ago (2016-02-26 14:36:47 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711763003/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711763003/160001
4 years, 9 months ago (2016-03-01 09:15:44 UTC) #37
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-01 10:46:42 UTC) #39
nisse-webrtc
Please have another look. It's now rebased on top of https://codereview.webrtc.org/1745003002/, which was landed earlier ...
4 years, 9 months ago (2016-03-01 13:24:40 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711763003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711763003/180001
4 years, 9 months ago (2016-03-01 15:24:16 UTC) #42
pbos-webrtc
https://codereview.webrtc.org/1711763003/diff/180001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/180001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1925 webrtc/media/engine/webrtcvideoengine2.cc:1925: if (parameters_.options.is_screencast) This only checks if the optional is ...
4 years, 9 months ago (2016-03-01 16:11:36 UTC) #43
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL) ...
4 years, 9 months ago (2016-03-01 17:24:58 UTC) #45
nisse-webrtc
https://codereview.webrtc.org/1711763003/diff/180001/webrtc/media/engine/webrtcvideoengine2.cc File webrtc/media/engine/webrtcvideoengine2.cc (right): https://codereview.webrtc.org/1711763003/diff/180001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1925 webrtc/media/engine/webrtcvideoengine2.cc:1925: if (parameters_.options.is_screencast) On 2016/03/01 16:11:36, pbos-webrtc wrote: > This ...
4 years, 9 months ago (2016-03-02 08:09:51 UTC) #46
71Clapp
On 2016/03/02 08:09:51, nisse-webrtc wrote: > https://codereview.webrtc.org/1711763003/diff/180001/webrtc/media/engine/webrtcvideoengine2.cc > File webrtc/media/engine/webrtcvideoengine2.cc (right): > > https://codereview.webrtc.org/1711763003/diff/180001/webrtc/media/engine/webrtcvideoengine2.cc#newcode1925 > ...
4 years, 9 months ago (2016-03-02 08:24:00 UTC) #47
nisse-webrtc
I've fixed the OnLoadUpdate bug spotted by pbos. In the tests, videoengine-related tests no longer ...
4 years, 9 months ago (2016-03-02 09:28:35 UTC) #48
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1711763003/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1711763003/200001
4 years, 9 months ago (2016-03-02 09:29:14 UTC) #50
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_libfuzzer_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_libfuzzer_rel/builds/1380)
4 years, 9 months ago (2016-03-02 10:38:28 UTC) #52
nisse-webrtc
Committed patchset #11 (id:200001) manually as 60653ba3cc58aecdff594a1f72cfaefbad9c407b (presubmit successful).
4 years, 9 months ago (2016-03-02 10:41:56 UTC) #54
commit-bot: I haz the power
4 years, 9 months ago (2016-03-02 10:41:57 UTC) #56
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/60653ba3cc58aecdff594a1f72cfaefbad9c407b
Cr-Commit-Position: refs/heads/master@{#11837}

Powered by Google App Engine
This is Rietveld 408576698