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

Issue 1836043004: Cleanup the VideoAdapter (Closed)

Created:
4 years, 8 months ago by perkj_webrtc
Modified:
4 years, 8 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

This cl do a major cleanup of the VideoAdapter and make sure it does care about the VideoSinkWants.max_pixel_count and VideoSinkWants.max_pixel_count_step_up. Unit tests are updated to test that screen share is not adapted but it does not change the VideoSinkWants in WebRtcVideoEngine2::SendStream due to a switch to screen share. The reason is that it works anyway and sprang is looking into how to do adaptation based on frame rate as well and use the adapter for screen share as well. BUG=webrtc:5688, webrtc:5426 R=nisse@webrtc.org, pbos@webrtc.org, sprang@google.com Committed: https://chromium.googlesource.com/external/webrtc/+/766ad3b9899f0d7a61e9de13ac070ca44f9dcc49

Patch Set 1 #

Patch Set 2 : Fix test. Reset wants when setting options. #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 16

Patch Set 5 : Addressed comments. #

Total comments: 2

Patch Set 6 : Removed scale size 0. #

Total comments: 6

Patch Set 7 : Addressed nits. #

Total comments: 7

Patch Set 8 : Addressed sprangs comments. #

Total comments: 20

Patch Set 9 : Addressed pbos comments #

Total comments: 5

Patch Set 10 : Addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+497 lines, -1715 lines) Patch
M webrtc/api/androidvideocapturer.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M webrtc/media/base/videoadapter.h View 1 2 3 4 5 6 7 8 9 1 chunk +31 lines, -147 lines 0 comments Download
M webrtc/media/base/videoadapter.cc View 1 2 3 4 5 6 7 8 9 5 chunks +126 lines, -581 lines 0 comments Download
M webrtc/media/base/videoadapter_unittest.cc View 1 2 3 4 5 6 7 8 17 chunks +207 lines, -952 lines 0 comments Download
M webrtc/media/base/videocapturer.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -4 lines 0 comments Download
M webrtc/media/base/videocapturer.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/media/base/videocapturer_unittest.cc View 1 2 3 4 3 chunks +16 lines, -3 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 1 2 3 4 5 6 7 5 chunks +18 lines, -7 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2_unittest.cc View 1 2 3 4 5 6 7 8 10 chunks +83 lines, -16 lines 0 comments Download

Messages

Total messages: 28 (9 generated)
perkj_webrtc
Can you please take a first pass?
4 years, 8 months ago (2016-03-31 15:13:59 UTC) #3
nisse-webrtc
Lots of deleted code, nice. What was the point of the CoordinatedVideoAdapter? https://codereview.webrtc.org/1836043004/diff/60001/webrtc/media/base/videoadapter.cc File webrtc/media/base/videoadapter.cc ...
4 years, 8 months ago (2016-04-01 07:09:35 UTC) #4
perkj_webrtc
ptal https://codereview.webrtc.org/1836043004/diff/60001/webrtc/media/base/videoadapter.cc File webrtc/media/base/videoadapter.cc (right): https://codereview.webrtc.org/1836043004/diff/60001/webrtc/media/base/videoadapter.cc#newcode43 webrtc/media/base/videoadapter.cc:43: float best_distance = static_cast<float>(INT_MAX); On 2016/04/01 07:09:35, nisse-webrtc ...
4 years, 8 months ago (2016-04-01 11:56:27 UTC) #5
nisse-webrtc
https://codereview.webrtc.org/1836043004/diff/80001/webrtc/media/base/videoadapter.cc File webrtc/media/base/videoadapter.cc (right): https://codereview.webrtc.org/1836043004/diff/80001/webrtc/media/base/videoadapter.cc#newcode31 webrtc/media/base/videoadapter.cc:31: 0.f // Still don't understand why 0 needs to ...
4 years, 8 months ago (2016-04-01 12:11:07 UTC) #6
perkj_webrtc
ptal https://codereview.webrtc.org/1836043004/diff/80001/webrtc/media/base/videoadapter.cc File webrtc/media/base/videoadapter.cc (right): https://codereview.webrtc.org/1836043004/diff/80001/webrtc/media/base/videoadapter.cc#newcode31 webrtc/media/base/videoadapter.cc:31: 0.f // On 2016/04/01 12:11:07, nisse-webrtc wrote: > ...
4 years, 8 months ago (2016-04-04 06:14:05 UTC) #8
nisse-webrtc
lgtm with some nits addressed. https://codereview.webrtc.org/1836043004/diff/120001/webrtc/media/base/videoadapter.cc File webrtc/media/base/videoadapter.cc (right): https://codereview.webrtc.org/1836043004/diff/120001/webrtc/media/base/videoadapter.cc#newcode82 webrtc/media/base/videoadapter.cc:82: if (resulting_number_of_pixels) { resulting_number_if_pixels ...
4 years, 8 months ago (2016-04-04 06:54:18 UTC) #9
perkj_webrtc
pbos, sprang can you please take a look as well? https://codereview.webrtc.org/1836043004/diff/120001/webrtc/media/base/videoadapter.cc File webrtc/media/base/videoadapter.cc (right): https://codereview.webrtc.org/1836043004/diff/120001/webrtc/media/base/videoadapter.cc#newcode82 ...
4 years, 8 months ago (2016-04-04 07:13:26 UTC) #12
sprang
Did I get it right that this is just a cleanup refactoring, it doesn't change ...
4 years, 8 months ago (2016-04-04 09:02:10 UTC) #14
perkj_webrtc
The idea is to clean it up and actually care about the VideoSinkWants. Previously, it ...
4 years, 8 months ago (2016-04-05 07:25:42 UTC) #16
sprang
On 2016/04/05 07:25:42, perkj_webrtc wrote: > The idea is to clean it up and actually ...
4 years, 8 months ago (2016-04-05 08:28:35 UTC) #17
perkj_webrtc
https://codereview.webrtc.org/1836043004/diff/170001/webrtc/media/base/videocapturer.h File webrtc/media/base/videocapturer.h (right): https://codereview.webrtc.org/1836043004/diff/170001/webrtc/media/base/videocapturer.h#newcode301 webrtc/media/base/videocapturer.h:301: int input_height_ GUARDED_BY(frame_stats_crit_); On 2016/04/05 08:28:35, sprang wrote: > ...
4 years, 8 months ago (2016-04-05 10:03:03 UTC) #18
pbos-webrtc
https://codereview.webrtc.org/1836043004/diff/150001/webrtc/media/base/videocapturer_unittest.cc File webrtc/media/base/videocapturer_unittest.cc (right): https://codereview.webrtc.org/1836043004/diff/150001/webrtc/media/base/videocapturer_unittest.cc#newcode312 webrtc/media/base/videocapturer_unittest.cc:312: // But resetting the wants should reset the resolution ...
4 years, 8 months ago (2016-04-05 10:16:55 UTC) #19
pbos-webrtc
https://codereview.webrtc.org/1836043004/diff/170001/webrtc/media/engine/webrtcvideoengine2.h File webrtc/media/engine/webrtcvideoengine2.h (right): https://codereview.webrtc.org/1836043004/diff/170001/webrtc/media/engine/webrtcvideoengine2.h#newcode181 webrtc/media/engine/webrtcvideoengine2.h:181: enum AdaptReasonEnum { enum AdaptReason should be enough
4 years, 8 months ago (2016-04-05 10:17:41 UTC) #20
pbos-webrtc
https://codereview.webrtc.org/1836043004/diff/170001/webrtc/media/engine/webrtcvideoengine2_unittest.cc File webrtc/media/engine/webrtcvideoengine2_unittest.cc (right): https://codereview.webrtc.org/1836043004/diff/170001/webrtc/media/engine/webrtcvideoengine2_unittest.cc#newcode2046 webrtc/media/engine/webrtcvideoengine2_unittest.cc:2046: TEST_F(WebRtcVideoChannel2Test, AdaptsOnOveruseAndSwitchToScreenShare) { PreviousAdaptationDoesNotApplyToScreenshare?
4 years, 8 months ago (2016-04-05 10:22:32 UTC) #21
perkj_webrtc
ptal https://codereview.webrtc.org/1836043004/diff/170001/webrtc/media/base/videoadapter.cc File webrtc/media/base/videoadapter.cc (right): https://codereview.webrtc.org/1836043004/diff/170001/webrtc/media/base/videoadapter.cc#newcode91 webrtc/media/base/videoadapter.cc:91: VideoAdapter::VideoAdapter() {} On 2016/04/05 10:16:55, pbos-webrtc wrote: > ...
4 years, 8 months ago (2016-04-05 11:44:45 UTC) #22
pbos-webrtc
lgtm https://codereview.webrtc.org/1836043004/diff/190001/webrtc/media/base/videoadapter.cc File webrtc/media/base/videoadapter.cc (right): https://codereview.webrtc.org/1836043004/diff/190001/webrtc/media/base/videoadapter.cc#newcode192 webrtc/media/base/videoadapter.cc:192: LOG(LS_INFO) << "VAdapt Frame: scaled " << frames_scaled_ ...
4 years, 8 months ago (2016-04-05 13:17:53 UTC) #23
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/766ad3b9899f0d7a61e9de13ac070ca44f9dcc49 Cr-Commit-Position: refs/heads/master@{#12240}
4 years, 8 months ago (2016-04-05 13:24:04 UTC) #26
perkj_webrtc
Committed patchset #10 (id:210001) manually as 766ad3b9899f0d7a61e9de13ac070ca44f9dcc49 (presubmit successful).
4 years, 8 months ago (2016-04-05 13:24:05 UTC) #27
perkj_webrtc
4 years, 8 months ago (2016-04-05 13:24:15 UTC) #28
Message was sent while issue was closed.
https://codereview.webrtc.org/1836043004/diff/190001/webrtc/media/base/videoa...
File webrtc/media/base/videoadapter.cc (right):

https://codereview.webrtc.org/1836043004/diff/190001/webrtc/media/base/videoa...
webrtc/media/base/videoadapter.cc:192: LOG(LS_INFO) << "VAdapt Frame: scaled "
<< frames_scaled_ << " / out "
On 2016/04/05 13:17:53, pbos-webrtc wrote:
> I think this should log "Frame size changed: " instead of "VAdapt Frame: "

Done.

https://codereview.webrtc.org/1836043004/diff/190001/webrtc/media/base/videoa...
webrtc/media/base/videoadapter.cc:251: LOG(LS_INFO) << "Adapt: "
On 2016/04/05 13:17:53, pbos-webrtc wrote:
> Change Adapt: To OnResolutionRequest:
> 
> I think that reads more understandably.

Done.

Powered by Google App Engine
This is Rietveld 408576698