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

Issue 2946413002: Report timing frames info in GetStats. (Closed)

Created:
3 years, 6 months ago by ilnik
Modified:
3 years, 5 months ago
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, video-team_agora.io, danilchap, yujie_mao (webrtc), kwiberg-webrtc, zhuangzesen_agora.io, zhengzhonghou_agora.io, tterriberry_mozilla.com, qiang.lu, niklas.enbom, peah-webrtc, the sun, mflodman
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Report timing frames info in GetStats. Some frames are already marked as 'timing frames' via video-timing RTP header extension. Timestamps along full WebRTC pipeline are gathered for these frames. This CL implements reporting of these timestamps for a single timing frame since the last GetStats(). The frame with the longest end-to-end delay between two consecutive GetStats calls is reported. The purpose of this timing information is not to provide a realtime statistics but to provide debugging information as it will help identify problematic places in video pipeline for outliers (frames which took longest to process). BUG=webrtc:7594 Review-Url: https://codereview.webrtc.org/2946413002 Cr-Commit-Position: refs/heads/master@{#18909} Committed: https://chromium.googlesource.com/external/webrtc/+/2edc6845ac12a7216aeb84d9ad9da8260e2bb434

Patch Set 1 #

Total comments: 22

Patch Set 2 : Implement Deadbeef@ comments #

Total comments: 32

Patch Set 3 : Implement Hbos@ comments #

Total comments: 7

Patch Set 4 : Implement some of Sprang@ comments #

Patch Set 5 : Fix CE #

Patch Set 6 : Adding tests #

Total comments: 2

Patch Set 7 : Move getting timingframeinfo to separate method in recieve stats proxy #

Patch Set 8 : rebase #

Total comments: 4

Patch Set 9 : Rename GetTimingFrameInfo to GetAndResetTimingFrameInfo #

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+376 lines, -67 lines) Patch
M webrtc/api/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/api/statstypes.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/api/statstypes.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/api/video/video_timing.h View 1 2 3 4 5 2 chunks +44 lines, -3 lines 0 comments Download
A webrtc/api/video/video_timing.cc View 1 2 3 4 5 1 chunk +52 lines, -0 lines 0 comments Download
M webrtc/common_types.h View 1 2 3 4 5 6 7 2 chunks +1 line, -2 lines 0 comments Download
M webrtc/media/base/mediachannel.h View 1 2 3 chunks +6 lines, -2 lines 0 comments Download
M webrtc/media/engine/fakewebrtccall.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/media/engine/fakewebrtccall.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/media/engine/webrtcvideoengine.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/modules/include/module_common_types.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h View 1 chunk +4 lines, -3 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_header_extensions.cc View 1 chunk +13 lines, -12 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h View 1 chunk +8 lines, -8 lines 0 comments Download
M webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/video_coding/frame_buffer2.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/modules/video_coding/frame_buffer2.cc View 1 2 3 4 5 6 2 chunks +9 lines, -1 line 0 comments Download
M webrtc/modules/video_coding/frame_buffer2_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/modules/video_coding/generic_decoder.cc View 1 2 3 4 5 6 7 8 9 3 chunks +41 lines, -13 lines 0 comments Download
M webrtc/modules/video_coding/include/video_coding_defines.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/modules/video_coding/timing.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M webrtc/modules/video_coding/timing.cc View 1 2 3 2 chunks +26 lines, -15 lines 0 comments Download
M webrtc/pc/statscollector.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M webrtc/test/fuzzers/rtp_packet_fuzzer.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/video/end_to_end_tests.cc View 1 2 3 4 5 6 7 8 9 1 chunk +53 lines, -0 lines 0 comments Download
M webrtc/video/payload_router.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -4 lines 0 comments Download
M webrtc/video/receive_statistics_proxy.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M webrtc/video/receive_statistics_proxy.cc View 1 2 3 4 5 6 7 8 2 chunks +22 lines, -0 lines 0 comments Download
M webrtc/video/receive_statistics_proxy_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +42 lines, -0 lines 0 comments Download
M webrtc/video/video_receive_stream.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/video/video_receive_stream.cc View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M webrtc/video/video_stream_decoder.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M webrtc/video/video_stream_decoder.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M webrtc/video_receive_stream.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 54 (30 generated)
ilnik
3 years, 6 months ago (2017-06-22 10:09:30 UTC) #4
Taylor Brandstetter
+hbos Added some minor comments, but my general concern is that this goes against the ...
3 years, 6 months ago (2017-06-25 20:48:04 UTC) #8
ilnik
On 2017/06/25 20:48:04, Taylor Brandstetter wrote: > +hbos > > Added some minor comments, but ...
3 years, 5 months ago (2017-06-26 08:24:14 UTC) #9
ilnik
https://codereview.webrtc.org/2946413002/diff/1/webrtc/api/statstypes.h File webrtc/api/statstypes.h (right): https://codereview.webrtc.org/2946413002/diff/1/webrtc/api/statstypes.h#newcode213 webrtc/api/statstypes.h:213: kStatsValueNameTimingFrameInfo, On 2017/06/25 20:48:03, Taylor Brandstetter wrote: > Can ...
3 years, 5 months ago (2017-06-26 08:46:38 UTC) #10
Taylor Brandstetter
Thanks for explaining; lgtm for the code I'm an owner of (api, pc, media) https://codereview.webrtc.org/2946413002/diff/1/webrtc/api/video/video_timing.cc ...
3 years, 5 months ago (2017-06-27 07:01:38 UTC) #12
ilnik
+stefan for webrtc/common_types.h, webrtc/test/fuzzerws/rtp_packet_fuzzer.cc and webrtc/video_receive_stream.h Asa, please take a look at modules/ it's mostly ...
3 years, 5 months ago (2017-06-27 07:47:23 UTC) #14
stefan-webrtc
lgtm for my parts.
3 years, 5 months ago (2017-06-27 13:11:03 UTC) #15
hbos
https://codereview.webrtc.org/2946413002/diff/20001/webrtc/api/video/video_timing.cc File webrtc/api/video/video_timing.cc (right): https://codereview.webrtc.org/2946413002/diff/20001/webrtc/api/video/video_timing.cc#newcode12 webrtc/api/video/video_timing.cc:12: #define WEBRTC_API_VIDEO_VIDEO_TIMING_CC_ No need for #ifndef in a .cc ...
3 years, 5 months ago (2017-06-27 14:08:31 UTC) #17
ilnik
https://codereview.webrtc.org/2946413002/diff/1/webrtc/api/video/video_timing.cc File webrtc/api/video/video_timing.cc (right): https://codereview.webrtc.org/2946413002/diff/1/webrtc/api/video/video_timing.cc#newcode34 webrtc/api/video/video_timing.cc:34: render_time_ms(-1) {} On 2017/06/27 07:01:38, Taylor Brandstetter wrote: > ...
3 years, 5 months ago (2017-06-27 15:23:57 UTC) #18
Taylor Brandstetter
https://codereview.webrtc.org/2946413002/diff/20001/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2946413002/diff/20001/webrtc/video/receive_statistics_proxy.cc#newcode446 webrtc/video/receive_statistics_proxy.cc:446: // stored. On 2017/06/27 15:23:56, ilnik wrote: > On ...
3 years, 5 months ago (2017-06-28 07:27:46 UTC) #23
ilnik
On 2017/06/28 07:27:46, Taylor Brandstetter wrote: > https://codereview.webrtc.org/2946413002/diff/20001/webrtc/video/receive_statistics_proxy.cc > File webrtc/video/receive_statistics_proxy.cc (right): > > https://codereview.webrtc.org/2946413002/diff/20001/webrtc/video/receive_statistics_proxy.cc#newcode446 ...
3 years, 5 months ago (2017-06-28 09:45:52 UTC) #24
sprang_webrtc
Overall looks good, but I think you need to improve test coverage. Especially an EndToEndTest, ...
3 years, 5 months ago (2017-06-28 15:31:41 UTC) #26
ilnik
https://codereview.webrtc.org/2946413002/diff/20001/webrtc/modules/video_coding/frame_buffer2.cc File webrtc/modules/video_coding/frame_buffer2.cc (right): https://codereview.webrtc.org/2946413002/diff/20001/webrtc/modules/video_coding/frame_buffer2.cc#newcode539 webrtc/modules/video_coding/frame_buffer2.cc:539: TRACE_EVENT0("webrtc", "FrameBuffer::UpdateTimingFrameInfo"); On 2017/06/28 15:31:40, sprang_webrtc wrote: > Do ...
3 years, 5 months ago (2017-06-29 08:39:56 UTC) #27
ilnik
On 2017/06/28 15:31:41, sprang_webrtc wrote: > Overall looks good, but I think you need to ...
3 years, 5 months ago (2017-06-29 08:41:05 UTC) #28
ilnik
On 2017/06/29 08:41:05, ilnik wrote: > On 2017/06/28 15:31:41, sprang_webrtc wrote: > > Overall looks ...
3 years, 5 months ago (2017-06-30 08:26:29 UTC) #33
sprang_webrtc
https://codereview.webrtc.org/2946413002/diff/40001/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2946413002/diff/40001/webrtc/video/receive_statistics_proxy.cc#newcode378 webrtc/video/receive_statistics_proxy.cc:378: timing_frame_info_.reset(); On 2017/06/29 08:39:56, ilnik wrote: > On 2017/06/28 ...
3 years, 5 months ago (2017-06-30 21:38:21 UTC) #34
ilnik
On 2017/06/30 21:38:21, sprang_webrtc wrote: > I was thinking of direct calls to ReceiveStatisticsProxy from ...
3 years, 5 months ago (2017-07-03 08:13:59 UTC) #35
ilnik
https://codereview.webrtc.org/2946413002/diff/100001/webrtc/modules/video_coding/frame_buffer2.cc File webrtc/modules/video_coding/frame_buffer2.cc (right): https://codereview.webrtc.org/2946413002/diff/100001/webrtc/modules/video_coding/frame_buffer2.cc#newcode541 webrtc/modules/video_coding/frame_buffer2.cc:541: info = timing_->GetTimingFrameInfo(); On 2017/06/30 21:38:21, sprang_webrtc wrote: > ...
3 years, 5 months ago (2017-07-03 13:43:55 UTC) #36
sprang_webrtc
lgtm with nit https://codereview.webrtc.org/2946413002/diff/140001/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2946413002/diff/140001/webrtc/video/receive_statistics_proxy.cc#newcode409 webrtc/video/receive_statistics_proxy.cc:409: rtc::Optional<TimingFrameInfo> ReceiveStatisticsProxy::GetTimingFrameInfo() { nit: Rename this ...
3 years, 5 months ago (2017-07-06 09:13:09 UTC) #41
ilnik
https://codereview.webrtc.org/2946413002/diff/140001/webrtc/video/receive_statistics_proxy.cc File webrtc/video/receive_statistics_proxy.cc (right): https://codereview.webrtc.org/2946413002/diff/140001/webrtc/video/receive_statistics_proxy.cc#newcode409 webrtc/video/receive_statistics_proxy.cc:409: rtc::Optional<TimingFrameInfo> ReceiveStatisticsProxy::GetTimingFrameInfo() { On 2017/07/06 09:13:08, sprang_webrtc wrote: > ...
3 years, 5 months ago (2017-07-06 09:28:37 UTC) #46
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/2946413002/180001
3 years, 5 months ago (2017-07-06 09:31:34 UTC) #49
commit-bot: I haz the power
Committed patchset #10 (id:180001) as https://chromium.googlesource.com/external/webrtc/+/2edc6845ac12a7216aeb84d9ad9da8260e2bb434
3 years, 5 months ago (2017-07-06 10:07:00 UTC) #52
hbos
https://codereview.webrtc.org/2946413002/diff/20001/webrtc/api/video/video_timing.h File webrtc/api/video/video_timing.h (right): https://codereview.webrtc.org/2946413002/diff/20001/webrtc/api/video/video_timing.h#newcode60 webrtc/api/video/video_timing.h:60: int64_t EndToEndDelay() const; On 2017/06/27 15:23:56, ilnik wrote: > ...
3 years, 5 months ago (2017-07-06 13:27:30 UTC) #53
ilnik
3 years, 5 months ago (2017-07-06 14:30:56 UTC) #54
Message was sent while issue was closed.
https://codereview.webrtc.org/2946413002/diff/20001/webrtc/api/video/video_ti...
File webrtc/api/video/video_timing.h (right):

https://codereview.webrtc.org/2946413002/diff/20001/webrtc/api/video/video_ti...
webrtc/api/video/video_timing.h:60: int64_t EndToEndDelay() const;
On 2017/07/06 13:27:29, hbos wrote:
> On 2017/06/27 15:23:56, ilnik wrote:
> > On 2017/06/27 14:08:30, hbos wrote:
> > > Generally speaking, is there any way to know if the timestamps are
> > synchronized?
> > > Is this only useful an application-specific contexts where you know that
> peers
> > > all synchronize to the same NTP servers?
> > 
> > We know when timestamps are synchronised, because they are derived from ntp
> > capture time of a frame, which is estimated from rtp timestamp using
> continious
> > clock synchronization via rtcp messages. We don't in any way rely on how
> system
> > synchronizes its ntp time.
> 
> Is this synchronization method and the video-timing RTP header extension
> standards? Is end-to-end delay possible to calculate through
standard-supported
> means?
> A stat for end-to-end delay was blocked on not being able to calculate this
with
> satisfactory estimates, https://github.com/w3c/webrtc-stats/issues/222.

I don't know about synchronization method standard. We utilize Receiver Reports
to make it. I guess, nothing non-standardized is used. And, yes, it's not very
precise. It just estimates RTT and assumes that packets take RTT/2 to go from
sender to receiver.  The timing frames extension is not standardized at all.
End-to-end delay is already calculated without blatant standards violation, but
reporting timings for all parts of a video pipeline, like i am trying to do, is
impossible with such an extension.

Powered by Google App Engine
This is Rietveld 408576698