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

Issue 1827023002: Get VideoCapturer stats via VideoTrackSourceInterface in StatsCollector, (Closed)

Created:
4 years, 9 months ago by nisse-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

Get VideoCapturer stats via VideoTrackSourceInterface in StatsCollector, without involving the VideoMediaChannel. BUG=webrtc:5426 Committed: https://crrev.com/fcc640f8f6c844211fb91dea49cb3f727dc07a00 Cr-Commit-Position: refs/heads/master@{#12193}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Move StatsReport logic to VideoRtpSender. #

Total comments: 16

Patch Set 3 : Address nits. #

Patch Set 4 : Spacing fix, forgotten in previous upload. #

Patch Set 5 : Move logic back to StatsCollector, with an explicit cast to VideoTrackInterface* #

Total comments: 15

Patch Set 6 : Address comments from Peter and Taylor. #

Total comments: 7

Patch Set 7 : Replace VideoCapturer GetStats by GetInputSize, eliminating a copy. #

Patch Set 8 : Rebase. #

Total comments: 1

Patch Set 9 : Added TODO comments regarding SSRC == 0. #

Total comments: 4

Patch Set 10 : Comment update. #

Patch Set 11 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -29 lines) Patch
M webrtc/api/mediastreaminterface.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +14 lines, -0 lines 0 comments Download
M webrtc/api/rtpsender.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/api/statscollector.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/api/statscollector.cc View 1 2 3 4 5 6 7 8 3 chunks +34 lines, -2 lines 0 comments Download
M webrtc/api/videocapturertracksource.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/api/videocapturertracksource.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/api/videosourceproxy.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/api/videotracksource.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/media/base/mediachannel.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -4 lines 0 comments Download
M webrtc/media/base/videocapturer.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -7 lines 0 comments Download
M webrtc/media/base/videocapturer.cc View 1 2 3 4 5 6 7 3 chunks +13 lines, -9 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine2.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 49 (14 generated)
nisse-webrtc
Hi, this cl moves the capturer->GetStats out of the videoengine. Instead, adding a GetInfo method ...
4 years, 9 months ago (2016-03-24 12:25:54 UTC) #1
nisse-webrtc
4 years, 9 months ago (2016-03-24 12:26:20 UTC) #3
nisse-webrtc
On 2016/03/24 12:25:54, nisse-webrtc wrote: > Hi, this cl moves the capturer->GetStats out of the ...
4 years, 9 months ago (2016-03-24 12:45:58 UTC) #4
perkj_webrtc
On 2016/03/24 12:45:58, nisse-webrtc wrote: > On 2016/03/24 12:25:54, nisse-webrtc wrote: > > Hi, this ...
4 years, 9 months ago (2016-03-24 15:19:23 UTC) #5
pthatcher1
https://codereview.webrtc.org/1827023002/diff/1/webrtc/api/mediastreaminterface.h File webrtc/api/mediastreaminterface.h (right): https://codereview.webrtc.org/1827023002/diff/1/webrtc/api/mediastreaminterface.h#newcode135 webrtc/api/mediastreaminterface.h:135: virtual bool GetInfo(VideoSourceInfo* info) = 0; Why not just ...
4 years, 9 months ago (2016-03-24 18:10:26 UTC) #6
nisse-webrtc
https://codereview.webrtc.org/1827023002/diff/1/webrtc/api/mediastreaminterface.h File webrtc/api/mediastreaminterface.h (right): https://codereview.webrtc.org/1827023002/diff/1/webrtc/api/mediastreaminterface.h#newcode135 webrtc/api/mediastreaminterface.h:135: virtual bool GetInfo(VideoSourceInfo* info) = 0; On 2016/03/24 18:10:25, ...
4 years, 8 months ago (2016-03-29 08:36:32 UTC) #7
perkj_webrtc
https://codereview.webrtc.org/1827023002/diff/20001/webrtc/api/rtpsender.cc File webrtc/api/rtpsender.cc (right): https://codereview.webrtc.org/1827023002/diff/20001/webrtc/api/rtpsender.cc#newcode357 webrtc/api/rtpsender.cc:357: VideoTrackSourceInterface::Stats stats; Why not skip VideoTrackSourceInterface::Stats all together and ...
4 years, 8 months ago (2016-03-29 11:03:39 UTC) #8
perkj_webrtc
On 2016/03/29 11:03:39, perkj_webrtc wrote: > https://codereview.webrtc.org/1827023002/diff/20001/webrtc/api/rtpsender.cc > File webrtc/api/rtpsender.cc (right): > > https://codereview.webrtc.org/1827023002/diff/20001/webrtc/api/rtpsender.cc#newcode357 > ...
4 years, 8 months ago (2016-03-29 11:04:41 UTC) #9
nisse-webrtc
Tommi, do you know the StatsCollector machinery? Do you think it's a good or bad ...
4 years, 8 months ago (2016-03-29 11:37:31 UTC) #11
tommi
let's discuss today https://codereview.webrtc.org/1827023002/diff/20001/webrtc/api/rtpsender.cc File webrtc/api/rtpsender.cc (right): https://codereview.webrtc.org/1827023002/diff/20001/webrtc/api/rtpsender.cc#newcode356 webrtc/api/rtpsender.cc:356: if (track_) { early returns are ...
4 years, 8 months ago (2016-03-30 11:46:45 UTC) #12
nisse-webrtc
https://codereview.webrtc.org/1827023002/diff/20001/webrtc/api/rtpsender.cc File webrtc/api/rtpsender.cc (right): https://codereview.webrtc.org/1827023002/diff/20001/webrtc/api/rtpsender.cc#newcode356 webrtc/api/rtpsender.cc:356: if (track_) { On 2016/03/30 11:46:44, tommi-webrtc wrote: > ...
4 years, 8 months ago (2016-03-30 12:09:31 UTC) #13
nisse-webrtc
New version. Tommi suggested movig the logic back to StatsCollector. Then it needs to check ...
4 years, 8 months ago (2016-03-30 14:42:36 UTC) #14
pthatcher1
lgtm I like the latest decisions. But please follow up on my comments. I'll LG ...
4 years, 8 months ago (2016-03-30 16:48:43 UTC) #17
Taylor Brandstetter
https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc File webrtc/api/statscollector.cc (right): https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc#newcode835 webrtc/api/statscollector.cc:835: if (!track || track->kind() != MediaStreamTrackInterface::kVideoKind) nit: {}s https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc#newcode845 ...
4 years, 8 months ago (2016-03-30 17:42:32 UTC) #18
nisse-webrtc
Thanks for the review. https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc File webrtc/api/statscollector.cc (right): https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc#newcode833 webrtc/api/statscollector.cc:833: for (const auto &sender : ...
4 years, 8 months ago (2016-03-31 06:31:22 UTC) #19
pbos-webrtc
https://codereview.webrtc.org/1827023002/diff/100001/webrtc/api/mediastreaminterface.h File webrtc/api/mediastreaminterface.h (right): https://codereview.webrtc.org/1827023002/diff/100001/webrtc/api/mediastreaminterface.h#newcode139 webrtc/api/mediastreaminterface.h:139: virtual bool GetStats(Stats* stats) = 0; I assume this ...
4 years, 8 months ago (2016-03-31 11:50:46 UTC) #20
perkj_webrtc
lgtm if GetStats return void. https://codereview.webrtc.org/1827023002/diff/100001/webrtc/api/mediastreaminterface.h File webrtc/api/mediastreaminterface.h (right): https://codereview.webrtc.org/1827023002/diff/100001/webrtc/api/mediastreaminterface.h#newcode139 webrtc/api/mediastreaminterface.h:139: virtual bool GetStats(Stats* stats) ...
4 years, 8 months ago (2016-03-31 11:57:30 UTC) #21
nisse-webrtc
https://codereview.webrtc.org/1827023002/diff/100001/webrtc/api/mediastreaminterface.h File webrtc/api/mediastreaminterface.h (right): https://codereview.webrtc.org/1827023002/diff/100001/webrtc/api/mediastreaminterface.h#newcode139 webrtc/api/mediastreaminterface.h:139: virtual bool GetStats(Stats* stats) = 0; On 2016/03/31 11:50:46, ...
4 years, 8 months ago (2016-03-31 12:07:27 UTC) #22
perkj_webrtc
https://codereview.webrtc.org/1827023002/diff/100001/webrtc/api/mediastreaminterface.h File webrtc/api/mediastreaminterface.h (right): https://codereview.webrtc.org/1827023002/diff/100001/webrtc/api/mediastreaminterface.h#newcode139 webrtc/api/mediastreaminterface.h:139: virtual bool GetStats(Stats* stats) = 0; On 2016/03/31 12:07:27, ...
4 years, 8 months ago (2016-03-31 12:13:31 UTC) #23
nisse-webrtc
I've added some comments, did cosmetic reformatting of the statscollector code, and I changed the ...
4 years, 8 months ago (2016-03-31 12:50:11 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1827023002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1827023002/140001
4 years, 8 months ago (2016-03-31 12:52:01 UTC) #26
perkj_webrtc
On 2016/03/31 12:52:01, commit-bot: I haz the power wrote: > Dry run: CQ is trying ...
4 years, 8 months ago (2016-03-31 12:57:54 UTC) #27
pbos-webrtc
lgtm https://codereview.webrtc.org/1827023002/diff/140001/webrtc/api/statscollector.cc File webrtc/api/statscollector.cc (right): https://codereview.webrtc.org/1827023002/diff/140001/webrtc/api/statscollector.cc#newcode834 webrtc/api/statscollector.cc:834: if (!sender->ssrc()) { Since ssrc == 0 is ...
4 years, 8 months ago (2016-03-31 14:35:22 UTC) #28
nisse-webrtc
I intend to land this tomorrow morning (Stockholm time). Taylor, Tommi, if you have any ...
4 years, 8 months ago (2016-03-31 14:46:26 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1827023002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1827023002/160001
4 years, 8 months ago (2016-03-31 14:47:46 UTC) #31
tommi
lgtm https://codereview.webrtc.org/1827023002/diff/160001/webrtc/api/mediastreaminterface.h File webrtc/api/mediastreaminterface.h (right): https://codereview.webrtc.org/1827023002/diff/160001/webrtc/api/mediastreaminterface.h#newcode142 webrtc/api/mediastreaminterface.h:142: // source, or a source which has not ...
4 years, 8 months ago (2016-03-31 14:59:56 UTC) #32
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/1425)
4 years, 8 months ago (2016-03-31 15:47:18 UTC) #34
Taylor Brandstetter
https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc File webrtc/api/statscollector.cc (right): https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc#newcode845 webrtc/api/statscollector.cc:845: rtc::ToString<uint32_t>(sender->ssrc()), On 2016/03/31 06:31:22, nisse-webrtc wrote: > On 2016/03/30 ...
4 years, 8 months ago (2016-03-31 18:25:03 UTC) #35
nisse-webrtc
I'll try to land this now. https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc File webrtc/api/statscollector.cc (right): https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc#newcode845 webrtc/api/statscollector.cc:845: rtc::ToString<uint32_t>(sender->ssrc()), On 2016/03/31 ...
4 years, 8 months ago (2016-04-01 06:28:28 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1827023002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1827023002/180001
4 years, 8 months ago (2016-04-01 06:28:49 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_mips_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_compile_mips_dbg/builds/877) android_compile_x64_dbg on tryserver.webrtc (JOB_FAILED, ...
4 years, 8 months ago (2016-04-01 06:30:00 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1827023002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1827023002/200001
4 years, 8 months ago (2016-04-01 07:14:01 UTC) #44
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 8 months ago (2016-04-01 08:10:48 UTC) #46
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/fcc640f8f6c844211fb91dea49cb3f727dc07a00 Cr-Commit-Position: refs/heads/master@{#12193}
4 years, 8 months ago (2016-04-01 08:10:59 UTC) #48
Taylor Brandstetter
4 years, 8 months ago (2016-04-01 18:28:40 UTC) #49
Message was sent while issue was closed.
https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector.cc
File webrtc/api/statscollector.cc (right):

https://codereview.webrtc.org/1827023002/diff/80001/webrtc/api/statscollector...
webrtc/api/statscollector.cc:845: rtc::ToString<uint32_t>(sender->ssrc()),
On 2016/04/01 06:28:28, nisse-webrtc wrote:
> On 2016/03/31 18:25:03, Taylor Brandstetter wrote:
> > On 2016/03/31 06:31:22, nisse-webrtc wrote:
> > > On 2016/03/30 17:42:32, Taylor Brandstetter wrote:
> > > > It's possible that a sender doesn't have an SSRC (ssrc() == 0), if no
> local
> > > > description has been set yet. In that case it doesn't make sense to
report
> > > these
> > > > stats, since they hinge off an SSRC. So you should add "||
sender->ssrc()
> ==
> > > 0"
> > > > to the above "if" statement.
> > > 
> > > I added it as a separate "if"; no need to fiddle with the track refcount
if
> > > we're not going to use it.
> > > 
> > > My understanding is that ssrc == 0 is technically valid in the webrtc wire
> > > protocols, so this logic is something we'd like to change eventually?
> > 
> > We should change it to an rtc::Optional in that case. It would make things
> more
> > clear anyway. I'll assign a bug to myself to remind myself to do this.
> 
> If possible, it would be even clearer if ssrc is always set, or always set if
a
> track is set. Is it reasonable to attach a track before the ssrc is known?

Yes, it is reasonable. Through the API you can use "addTransceiver" to create a
sender, and then add a track to it, before any SDP negotiation (which decides
SSRCs) has been done.

Powered by Google App Engine
This is Rietveld 408576698