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

Issue 2602033002: RTCMediaStreamTrackStats.frameWidth/Height,framesPerSecond,framesDecoded (Closed)

Created:
3 years, 11 months ago by hbos
Modified:
3 years, 11 months ago
CC:
webrtc-reviews_webrtc.org, the sun, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

RTCMediaStreamTrackStats.frameWidth/Height,framesPerSecond,framesDecoded - frameWidth/Height previously corresponded to the input width/height, now it corresponds to the size sent/received. - framesPerSecond added, which is the framerate sent/outputed. - framesDecoded added. BUG=webrtc:6757, chromium:659137, chromium:627816

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -27 lines) Patch
M webrtc/api/rtcstats_integrationtest.cc View 1 chunk +7 lines, -2 lines 0 comments Download
M webrtc/api/rtcstatscollector.cc View 2 chunks +13 lines, -9 lines 9 comments Download
M webrtc/api/rtcstatscollector_unittest.cc View 5 chunks +14 lines, -14 lines 0 comments Download
M webrtc/api/stats/rtcstats_objects.h View 1 chunk +0 lines, -2 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 12 (6 generated)
hbos
Please take a look, hta and deadbeef. https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector.cc File webrtc/api/rtcstatscollector.cc (left): https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector.cc#oldcode467 webrtc/api/rtcstatscollector.cc:467: video_track_source_stats.input_height); These ...
3 years, 11 months ago (2016-12-29 12:45:41 UTC) #7
hbos
https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector.cc File webrtc/api/rtcstatscollector.cc (left): https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector.cc#oldcode467 webrtc/api/rtcstatscollector.cc:467: video_track_source_stats.input_height); On 2016/12/29 12:45:41, hbos wrote: > These sizes ...
3 years, 11 months ago (2016-12-29 14:24:48 UTC) #8
hbos
https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector.cc File webrtc/api/rtcstatscollector.cc (right): https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector.cc#newcode468 webrtc/api/rtcstatscollector.cc:468: video_track_stats->frames_decoded = receiver_info->frames_decoded; Uhm, this is the same as ...
3 years, 11 months ago (2016-12-29 15:29:28 UTC) #9
hta-webrtc
On third thought, I think this needs another think about "decoded frames" before we merge ...
3 years, 11 months ago (2017-01-02 16:06:42 UTC) #10
Taylor Brandstetter
I think some questions still need to be answered. We need to be clear about ...
3 years, 11 months ago (2017-01-04 23:25:24 UTC) #11
hbos
3 years, 11 months ago (2017-01-18 14:03:50 UTC) #12
On 2017/01/04 23:25:24, Taylor Brandstetter wrote:
> I think some questions still need to be answered. We need to be clear about
> which rate "framesPerSecond" is intended to represent, for both local and
remote
> tracks. Harald, can you take a look at my comments below?
> 
>
https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector.cc
> File webrtc/api/rtcstatscollector.cc (right):
> 
>
https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector....
> webrtc/api/rtcstatscollector.cc:454: sender_info->framerate_sent);
> On 2016/12/29 12:45:41, hbos wrote:
> > Alternatively, VideoSenderInfo has framerate_input too.
> 
> I'm not completely sure that framerate_sent (or framerate_input) are correct.
> Suppose the source framerate is 60fps, the target encode framerate is 30fps,
and
> the actual number of frames encoded during the last second is 29 (because one
> had to be dropped). Should frames_per_second be 60 (framerate_input), 29
> (framerate_sent), or 30 (which might be this?
>
https://cs.chromium.org/chromium/src/third_party/webrtc/modules/video_coding/...).
> 
> We probably should loop in someone more familiar with the video pipeline.
> 
>
https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector....
> webrtc/api/rtcstatscollector.cc:467: receiver_info->framerate_output);
> On 2016/12/29 12:45:41, hbos wrote:
> > Alternatively, VideoReceiverInfo also has framerate_rcvd, framerate_decoded,
> > framerate_render_input and framerate_render_output.
> 
> I'm also not sure that this is completely right. For codecs that store the
> framerate in the bitstream (such as H.264), should this be the framerate from
> the bitstream, or the framerate received?
> 
> Here's where the former would be for H.264:
>
https://cs.chromium.org/chromium/src/third_party/ffmpeg/libavcodec/avcodec.h?...
> 
> It looks like we don't currently do anything with it. So for now,
framerate_rcvd
> may be the best we can do.
> 
>
https://codereview.webrtc.org/2602033002/diff/1/webrtc/api/rtcstatscollector....
> webrtc/api/rtcstatscollector.cc:468: video_track_stats->frames_decoded =
> receiver_info->frames_decoded;
> On 2017/01/02 16:06:42, hta-webrtc wrote:
> > On 2016/12/29 15:29:28, hbos wrote:
> > > Uhm, this is the same as RTCInboundRTPStreamStats.framesDecoded added in
> > >
> >
>
https://codereview.webrtc.org/2588373005/diff/20001/webrtc/api/rtcstatscollec....
> > > 
> > > That can't be right, duplicate stats?
> > 
> > Add a TODO to count the frames delivered to the track instead. I think this
> > needs some redesign, since in the case where we switch what SSRC we take
input
> > from (simulcast), we need to keep the count correct over the switch, which
> > requires saving the number at the moment of the switch for both the track
and
> > for the SSRC we switch to, which requires having memory for that in the
> > statscollector.
> > 
> > This needs deadbeef or video team input: When we have incoming simulcast, do
> we
> > switch SSRCs, or does the switch mux everything into a single SSRC? If
> separate
> > SSRCs, do we even decode the ones that aren't being shown?
> 
> I believe this already does count the frames delivered to the track. When
using
> simulcast, the entire simulcast group is represented by a single
VideoSenderInfo
> with multiple SSRCs (again, using the first one for identification). Which
means
> that we're not currently collecting per-simulcast-layer stats, which (if they
> existed) would go in SsrcSenderInfo.

Closing this due to https://codereview.webrtc.org/2602033002 replacing a lot of
this code. Will add the framesPerSecond/framesDecoded stats in tiny separate
follow-up CLs to it.

Powered by Google App Engine
This is Rietveld 408576698